Enum mediasoup::rtp_parameters::RtpCodecCapability [−][src]
Provides information on the capabilities of a codec within the RTP capabilities. The list of media codecs supported by mediasoup and their settings is defined in the supported_rtp_capabilities.rs file.
Exactly one RtpCodecCapability will be present for each supported combination of parameters that requires a distinct value of preferred_payload_type. For example:
- Multiple H264 codecs, each with their own distinct
packetization-mode
andprofile-level-id
values. - Multiple VP9 codecs, each with their own distinct
profile-id
value.
RtpCodecCapability entries in the mediaCodecs array of RouterOptions do not require preferred_payload_type field (if unset, mediasoup will choose a random one). If given, make sure it’s in the 96-127 range.
Variants
Audio codec capability
Fields of Audio
mime_type: MimeTypeAudio
The codec MIME media type/subtype (e.g. ‘audio/opus’).
preferred_payload_type: Option<u8>
The preferred RTP payload type.
clock_rate: NonZeroU32
Codec clock rate expressed in Hertz.
channels: NonZeroU8
The number of channels supported (e.g. two for stereo). Just for audio. Default 1.
parameters: RtpCodecParametersParameters
Codec specific parameters. Some parameters (such as packetization-mode
and
profile-level-id
in H264 or profile-id
in VP9) are critical for codec matching.
rtcp_feedback: Vec<RtcpFeedback>
Transport layer and codec-specific feedback messages for this codec.
Video codec capability
Fields of Video
mime_type: MimeTypeVideo
The codec MIME media type/subtype (e.g. ‘video/VP8’).
preferred_payload_type: Option<u8>
The preferred RTP payload type.
clock_rate: NonZeroU32
Codec clock rate expressed in Hertz.
parameters: RtpCodecParametersParameters
Codec specific parameters. Some parameters (such as packetization-mode
and
profile-level-id
in H264 or profile-id
in VP9) are critical for codec matching.
rtcp_feedback: Vec<RtcpFeedback>
Transport layer and codec-specific feedback messages for this codec.
Trait Implementations
impl Clone for RtpCodecCapability
[src]
fn clone(&self) -> RtpCodecCapability
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RtpCodecCapability
[src]
impl<'de> Deserialize<'de> for RtpCodecCapability
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for RtpCodecCapability
[src]
impl Hash for RtpCodecCapability
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for RtpCodecCapability
[src]
fn cmp(&self, other: &RtpCodecCapability) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<RtpCodecCapability> for RtpCodecCapability
[src]
fn eq(&self, other: &RtpCodecCapability) -> bool
[src]
fn ne(&self, other: &RtpCodecCapability) -> bool
[src]
impl PartialOrd<RtpCodecCapability> for RtpCodecCapability
[src]
fn partial_cmp(&self, other: &RtpCodecCapability) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for RtpCodecCapability
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for RtpCodecCapability
[src]
impl StructuralPartialEq for RtpCodecCapability
[src]
Auto Trait Implementations
impl RefUnwindSafe for RtpCodecCapability
impl Send for RtpCodecCapability
impl Sync for RtpCodecCapability
impl Unpin for RtpCodecCapability
impl UnwindSafe for RtpCodecCapability
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,