pub struct RtpParameters {
pub mid: Option<String>,
pub codecs: Vec<RtpCodecParameters>,
pub header_extensions: Vec<RtpHeaderExtensionParameters>,
pub encodings: Vec<RtpEncodingParameters>,
pub rtcp: RtcpParameters,
}
Expand description
The RTP send parameters describe a media stream received by mediasoup from an endpoint through its corresponding mediasoup Producer. These parameters may include a mid value that the mediasoup transport will use to match received RTP packets based on their MID RTP extension value.
mediasoup allows RTP send parameters with a single encoding and with multiple encodings (simulcast). In the latter case, each entry in the encodings array must include a ssrc field or a rid field (the RID RTP extension value). Check the Simulcast and SVC sections for more information.
The RTP receive parameters describe a media stream as sent by mediasoup to an endpoint through its corresponding mediasoup Consumer. The mid value is unset (mediasoup does not include the MID RTP extension into RTP packets being sent to endpoints).
There is a single entry in the encodings array (even if the corresponding producer uses simulcast). The consumer sends a single and continuous RTP stream to the endpoint and spatial/temporal layer selection is possible via consumer.setPreferredLayers().
As an exception, previous bullet is not true when consuming a stream over a
PipeTransport
, in which all RTP streams from the
associated producer are forwarded verbatim through the consumer.
The RTP receive parameters will always have their ssrc values randomly generated for all of its encodings (and optional rtx: { ssrc: XXXX } if the endpoint supports RTX), regardless of the original RTP send parameters in the associated producer. This applies even if the producer’s encodings have rid set.
Fields§
§mid: Option<String>
The MID RTP extension value as defined in the BUNDLE specification.
codecs: Vec<RtpCodecParameters>
Media and RTX codecs in use.
header_extensions: Vec<RtpHeaderExtensionParameters>
RTP header extensions in use.
encodings: Vec<RtpEncodingParameters>
Transmitted RTP streams and their settings.
rtcp: RtcpParameters
Parameters used for RTCP.
Trait Implementations§
Source§impl Clone for RtpParameters
impl Clone for RtpParameters
Source§fn clone(&self) -> RtpParameters
fn clone(&self) -> RtpParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more