pub enum RtpCodecCapability {
Audio {
mime_type: MimeTypeAudio,
preferred_payload_type: Option<u8>,
clock_rate: NonZero<u32>,
channels: NonZero<u8>,
parameters: RtpCodecParametersParameters,
rtcp_feedback: Vec<RtcpFeedback>,
},
Video {
mime_type: MimeTypeVideo,
preferred_payload_type: Option<u8>,
clock_rate: NonZero<u32>,
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-modeandprofile-level-idvalues. - Multiple VP9 codecs, each with their own distinct
profile-idvalue.
RtpCodecCapability entries in the media_codecs vector of
RouterOptions
(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: MimeTypeAudioThe codec MIME media type/subtype (e.g. ‘audio/opus’).
channels: NonZero<u8>The number of channels supported (e.g. two for stereo). Just for audio. Default 1.
parameters: RtpCodecParametersParametersCodec 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: MimeTypeVideoThe codec MIME media type/subtype (e.g. ‘video/VP8’).
parameters: RtpCodecParametersParametersCodec 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.
Implementations§
Source§impl RtpCodecCapability
impl RtpCodecCapability
pub fn mime_type(&self) -> MimeType
pub fn parameters(&self) -> &RtpCodecParametersParameters
pub fn parameters_mut(&mut self) -> &mut RtpCodecParametersParameters
pub fn preferred_payload_type(&self) -> Option<u8>
pub fn rtcp_feedback(&self) -> &Vec<RtcpFeedback>
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