Struct webrtc::api::media_engine::MediaEngine
source · [−]pub struct MediaEngine { /* private fields */ }
Expand description
A MediaEngine defines the codecs supported by a PeerConnection, and the configuration of those codecs. A MediaEngine must not be shared between PeerConnections.
Implementations
sourceimpl MediaEngine
impl MediaEngine
sourcepub fn register_default_codecs(&mut self) -> Result<()>
pub fn register_default_codecs(&mut self) -> Result<()>
register_default_codecs registers the default codecs supported by Pion WebRTC. register_default_codecs is not safe for concurrent use.
sourcepub fn register_codec(
&mut self,
codec: RTCRtpCodecParameters,
typ: RTPCodecType
) -> Result<()>
pub fn register_codec(
&mut self,
codec: RTCRtpCodecParameters,
typ: RTPCodecType
) -> Result<()>
register_codec adds codec to the MediaEngine These are the list of codecs supported by this PeerConnection. register_codec is not safe for concurrent use.
sourcepub fn register_header_extension(
&mut self,
extension: RTCRtpHeaderExtensionCapability,
typ: RTPCodecType,
allowed_directions: Vec<RTCRtpTransceiverDirection>
) -> Result<()>
pub fn register_header_extension(
&mut self,
extension: RTCRtpHeaderExtensionCapability,
typ: RTPCodecType,
allowed_directions: Vec<RTCRtpTransceiverDirection>
) -> Result<()>
register_header_extension adds a header extension to the MediaEngine
To determine the negotiated value use [get_header_extension_id
] after signaling is complete
sourcepub fn register_feedback(&mut self, feedback: RTCPFeedback, typ: RTPCodecType)
pub fn register_feedback(&mut self, feedback: RTCPFeedback, typ: RTPCodecType)
register_feedback adds feedback mechanism to already registered codecs.
Trait Implementations
sourceimpl Default for MediaEngine
impl Default for MediaEngine
sourcefn default() -> MediaEngine
fn default() -> MediaEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MediaEngine
impl Send for MediaEngine
impl Sync for MediaEngine
impl Unpin for MediaEngine
impl !UnwindSafe for MediaEngine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more