RtpParameters class
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.
Constructors
-
RtpParameters({String? mid, List<
RtpCodecParameters> codecs = const [], List<RtpHeaderExtensionParameters> headerExtensions = const [], List<RtpEncodingParameters> encodings = const [], RtcpParameters? rtcp}) - RtpParameters.fromMap(Map data)
Properties
-
codecs
↔ List<
RtpCodecParameters> -
Media and RTX codecs in use.
getter/setter pair
-
encodings
↔ List<
RtpEncodingParameters> -
Transmitted RTP streams and their settings.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headerExtensions
↔ List<
RtpHeaderExtensionParameters> -
RTP header extensions in use.
getter/setter pair
- mid ↔ String?
-
The MID RTP extension value as defined in the BUNDLE specification.
getter/setter pair
- rtcp ↔ RtcpParameters?
-
Parameters used for RTCP.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
copy(
RtpParameters old, {String? mid, List< RtpCodecParameters> ? codecs, List<RtpHeaderExtensionParameters> ? headerExtensions, List<RtpEncodingParameters> ? encodings, RtcpParameters? rtcp}) → RtpParameters