#[non_exhaustive]pub struct ProducerOptions {
pub kind: MediaKind,
pub rtp_parameters: RtpParameters,
pub paused: bool,
pub key_frame_request_delay: u32,
pub app_data: AppData,
/* private fields */
}
Expand description
Producer
options.
§Notes on usage
Check the RTP Parameters and Capabilities section for more details (TypeScript-oriented, but concepts apply here as well).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: MediaKind
Media kind.
rtp_parameters: RtpParameters
RTP parameters defining what the endpoint is sending.
paused: bool
Whether the producer must start in paused mode. Default false.
key_frame_request_delay: u32
Just for video. Time (in ms) before asking the sender for a new key frame after having asked a previous one. If 0 there is no delay.
app_data: AppData
Custom application data.
Implementations§
Source§impl ProducerOptions
impl ProducerOptions
Sourcepub fn new_pipe_transport(
producer_id: ProducerId,
kind: MediaKind,
rtp_parameters: RtpParameters,
) -> Self
pub fn new_pipe_transport( producer_id: ProducerId, kind: MediaKind, rtp_parameters: RtpParameters, ) -> Self
Create producer options that will be used with Pipe transport
Sourcepub fn new(kind: MediaKind, rtp_parameters: RtpParameters) -> Self
pub fn new(kind: MediaKind, rtp_parameters: RtpParameters) -> Self
Create producer options that will be used with non-Pipe transport
Trait Implementations§
Source§impl Clone for ProducerOptions
impl Clone for ProducerOptions
Source§fn clone(&self) -> ProducerOptions
fn clone(&self) -> ProducerOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ProducerOptions
impl !RefUnwindSafe for ProducerOptions
impl Send for ProducerOptions
impl Sync for ProducerOptions
impl Unpin for ProducerOptions
impl !UnwindSafe for ProducerOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more