public class MediaStreamTrackReceiver extends SinglePacketTransformerAdapter implements TransformEngine
MediaStreamTrackDescs for a MediaStream. It
is also part of the MediaStream's transform chain and has the
opportunity to update its MediaStreamTrackDescs with received
packets.
This default implementation does no update the MediaStreamTrackDescs,
it only serves to contain the signalled tracks and encodings.| Constructor and Description |
|---|
MediaStreamTrackReceiver(MediaStreamImpl stream)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
MediaStreamTrackDesc |
findMediaStreamTrackDesc(long ssrc)
Finds the
MediaStreamTrackDesc that corresponds to the SSRC that
is specified in the arguments. |
RTPEncodingDesc |
findRTPEncodingDesc(long ssrc)
Finds the
RTPEncodingDesc that matches ByteArrayBuffer
passed in as a parameter. |
RTPEncodingDesc |
findRTPEncodingDesc(RawPacket pkt)
Finds the
RTPEncodingDesc that matches the RawPacket
passed in as a parameter. |
MediaStreamTrackDesc[] |
getMediaStreamTracks()
Gets the
MediaStreamTrackDescs that this instance is configured
to receive. |
PacketTransformer |
getRTCPTransformer()
Gets the PacketTransformer for RTCP packets.
|
PacketTransformer |
getRTPTransformer()
Gets the PacketTransformer for RTP packets.
|
MediaStreamImpl |
getStream()
Gets the
MediaStream that owns this instance. |
boolean |
setMediaStreamTracks(MediaStreamTrackDesc[] newTracks)
Updates this
MediaStreamTrackReceiver with the new RTP encoding
parameters. |
reverseTransform, transformclose, reverseTransform, transformpublic MediaStreamTrackReceiver(MediaStreamImpl stream)
stream - The MediaStream that this instance receives
MediaStreamTrackDescs from.public RTPEncodingDesc findRTPEncodingDesc(RawPacket pkt)
RTPEncodingDesc that matches the RawPacket
passed in as a parameter. Assumes that the packet is valid.pkt - the packet to match.RTPEncodingDesc that matches the pkt passed in as
a parameter, or null if there is no matching RTPEncodingDesc.public RTPEncodingDesc findRTPEncodingDesc(long ssrc)
RTPEncodingDesc that matches ByteArrayBuffer
passed in as a parameter.ssrc - the SSRC of the RTPEncodingDesc to match. If multiple
encodings share the same SSRC, the first match will be returned.RTPEncodingDesc that matches the pkt passed in as
a parameter, or null if there is no matching RTPEncodingDesc.public PacketTransformer getRTPTransformer()
getRTPTransformer in interface TransformEnginepublic PacketTransformer getRTCPTransformer()
getRTCPTransformer in interface TransformEnginepublic MediaStreamTrackDesc[] getMediaStreamTracks()
MediaStreamTrackDescs that this instance is configured
to receive.MediaStreamTrackDescs that this instance is
configured to receive.public boolean setMediaStreamTracks(MediaStreamTrackDesc[] newTracks)
MediaStreamTrackReceiver with the new RTP encoding
parameters. Note that in order to avoid losing the state of existing
MediaStreamTrackDesc instances, when one of the new instances
matches (i.e. the primary SSRC of its first encoding matches) an old
instance we keep the old instance.
Currently we also keep the old instance's configuration (TODO use the
new configuration).newTracks - the MediaStreamTrackDescs that this instance
will receive. Note that the actual MediaStreamTrackDesc instances
might not match. To get the actual instances call
getMediaStreamTracks().public MediaStreamImpl getStream()
MediaStream that owns this instance.MediaStream that owns this instance.public MediaStreamTrackDesc findMediaStreamTrackDesc(long ssrc)
MediaStreamTrackDesc that corresponds to the SSRC that
is specified in the arguments.ssrc - the SSRC of the MediaStreamTrackDesc to match.MediaStreamTrackDesc that matches the specified SSRC.Copyright © 2021 jitsi.org. All rights reserved.