Enum mediasoup::rtp_parameters::RtpCodecCapability[][src]

pub enum RtpCodecCapability {
    Audio {
        mime_type: MimeTypeAudio,
        preferred_payload_type: Option<u8>,
        clock_rate: NonZeroU32,
        channels: NonZeroU8,
        parameters: RtpCodecParametersParameters,
        rtcp_feedback: Vec<RtcpFeedback>,
    },
    Video {
        mime_type: MimeTypeVideo,
        preferred_payload_type: Option<u8>,
        clock_rate: NonZeroU32,
        parameters: RtpCodecParametersParameters,
        rtcp_feedback: Vec<RtcpFeedback>,
    },
}

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 and profile-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

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

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]

impl Debug for RtpCodecCapability[src]

impl<'de> Deserialize<'de> for RtpCodecCapability[src]

impl Eq for RtpCodecCapability[src]

impl Hash for RtpCodecCapability[src]

impl Ord for RtpCodecCapability[src]

impl PartialEq<RtpCodecCapability> for RtpCodecCapability[src]

impl PartialOrd<RtpCodecCapability> for RtpCodecCapability[src]

impl Serialize for RtpCodecCapability[src]

impl StructuralEq for RtpCodecCapability[src]

impl StructuralPartialEq for RtpCodecCapability[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.