public class MediaStreamTrackDesc
extends java.lang.Object
RTPEncodingDesc
s that encode the same
media source. This specific implementation provides webrtc simulcast stream
suspension detection.Constructor and Description |
---|
MediaStreamTrackDesc(MediaStreamTrackReceiver mediaStreamTrackReceiver,
RTPEncodingDesc[] rtpEncodings)
Ctor.
|
MediaStreamTrackDesc(MediaStreamTrackReceiver mediaStreamTrackReceiver,
RTPEncodingDesc[] rtpEncodings,
java.lang.String owner)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
FrameDesc |
findFrameDesc(long ssrc,
long timestamp)
Finds the
FrameDesc that corresponds to the given timestamp
for the given stream (identified by its ssrc) |
(package private) RTPEncodingDesc |
findRTPEncodingDesc(long ssrc)
Finds the
RTPEncodingDesc that corresponds to the specified
ssrc . |
(package private) RTPEncodingDesc |
findRTPEncodingDesc(RawPacket pkt)
Finds the
RTPEncodingDesc that corresponds to the packet that is
passed in as an argument. |
long |
getBps(int idx)
Gets the last "stable" bitrate (in bps) of the encoding of the specified
index.
|
MediaStreamTrackReceiver |
getMediaStreamTrackReceiver()
Gets the
MediaStreamTrackReceiver that receives this instance. |
MediaType |
getMediaType() |
java.lang.String |
getOwner() |
RTPEncodingDesc[] |
getRTPEncodings()
Returns an array of all the
RTPEncodingDesc s for this instance,
in subjective quality ascending order. |
boolean |
matches(long ssrc)
FIXME: this should probably check whether the specified SSRC is part
of this track (i.e.
|
public MediaStreamTrackDesc(MediaStreamTrackReceiver mediaStreamTrackReceiver, RTPEncodingDesc[] rtpEncodings)
mediaStreamTrackReceiver
- The MediaStreamTrackReceiver
that
receives this instance.rtpEncodings
- The RTPEncodingDesc
s that this instance
possesses.public MediaStreamTrackDesc(MediaStreamTrackReceiver mediaStreamTrackReceiver, RTPEncodingDesc[] rtpEncodings, java.lang.String owner)
mediaStreamTrackReceiver
- The MediaStreamTrackReceiver
that
receives this instance.rtpEncodings
- The RTPEncodingDesc
s that this instance
possesses.public java.lang.String getOwner()
public MediaType getMediaType()
MediaType
of this MediaStreamTrackDesc
.public RTPEncodingDesc[] getRTPEncodings()
RTPEncodingDesc
s for this instance,
in subjective quality ascending order.RTPEncodingDesc
s for this instance,
in subjective quality ascending order.public MediaStreamTrackReceiver getMediaStreamTrackReceiver()
MediaStreamTrackReceiver
that receives this instance.MediaStreamTrackReceiver
that receives this instance.public long getBps(int idx)
RTPEncodingDesc findRTPEncodingDesc(RawPacket pkt)
RTPEncodingDesc
that corresponds to the packet that is
passed in as an argument. Assumes that the packet is valid.pkt
- the packet to match.RTPEncodingDesc
that corresponds to the packet that is
specified in the buffer passed in as an argument, or null.RTPEncodingDesc findRTPEncodingDesc(long ssrc)
RTPEncodingDesc
that corresponds to the specified
ssrc
.ssrc
- the SSRC of the RTPEncodingDesc
to find. If multiple
encodings share the same SSRC, the first match will be returned.RTPEncodingDesc
that corresponds to the specified
ssrc
.public FrameDesc findFrameDesc(long ssrc, long timestamp)
FrameDesc
that corresponds to the given timestamp
for the given stream (identified by its ssrc)ssrc
- the ssrc of the stream to which this frame belongstimestamp
- the timestamp of the frame the caller is trying to findFrameDesc
that corresponds to the ssrc and timestamp
given, or nullpublic boolean matches(long ssrc)
ssrc
- the SSRC to match.true
if the specified ssrc
is the primary SSRC
for this track.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.