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>,
},
}
Expand description
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 media_codecs
vector 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
mime_type: MimeTypeAudio
The codec MIME media type/subtype (e.g. ‘audio/opus’).
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
mime_type: MimeTypeVideo
The codec MIME media type/subtype (e.g. ‘video/VP8’).
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§
Source§impl Clone for RtpCodecCapability
impl Clone for RtpCodecCapability
Source§fn clone(&self) -> RtpCodecCapability
fn clone(&self) -> RtpCodecCapability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more