Skip to main content

rtc/rtp_transceiver/rtp_sender/
rtp_encoding_parameters.rs

1use crate::rtp_transceiver::rtp_sender::rtp_codec::RTCRtpCodec;
2use crate::rtp_transceiver::rtp_sender::rtp_coding_parameters::RTCRtpCodingParameters;
3
4/// RTP encoding parameters for individual encodings in a simulcast or layered stream.
5///
6/// This is a subset of the ORTC specification since this implementation
7/// doesn't perform encoding directly.
8///
9/// ## Specifications
10///
11/// * [ORTC](http://draft.ortc.org/#dom-rtcrtpencodingparameters)
12#[derive(Default, Debug, Clone)]
13pub struct RTCRtpEncodingParameters {
14    /// Base coding parameters (RID, SSRC, RTX, FEC)
15    pub rtp_coding_parameters: RTCRtpCodingParameters,
16    /// Whether this encoding is actively being transmitted
17    pub active: bool,
18    /// Codec to use for this encoding
19    pub codec: RTCRtpCodec,
20    /// Maximum bitrate in bits per second
21    pub max_bitrate: u32,
22    /// Maximum framerate in frames per second
23    pub max_framerate: Option<f64>,
24    /// Resolution scaling factor (must be >= 1.0)
25    pub scale_resolution_down_by: Option<f64>,
26}