public class RTPEncodingDesc
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
SUSPENDED_INDEX
The quality that is used to represent that forwarding is suspended.
|
Constructor and Description |
---|
RTPEncodingDesc(MediaStreamTrackDesc track,
int idx,
long primarySSRC,
int tid,
int sid,
int height,
double frameRate,
RTPEncodingDesc[] dependencyEncodings)
Ctor.
|
RTPEncodingDesc(MediaStreamTrackDesc track,
long primarySSRC)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSecondarySsrc(long ssrc,
java.lang.String type) |
void |
decrReceivers()
Atomically decrements the number of receivers of this encoding.
|
(package private) FrameDesc |
findFrameDesc(long timestamp)
Finds the
FrameDesc that matches the RTP packet specified
in the buffer passed in as an argument. |
RTPEncodingDesc |
getBaseLayer()
Gets the root
RTPEncodingDesc of the dependencies DAG. |
RTPEncodingDesc[] |
getDependencyEncodings()
Gets the
RTPEncodingDesc on which this layer depends. |
double |
getFrameRate()
Gets the max frame rate (in fps) of the bitstream that this instance
represents.
|
int |
getHeight()
Gets the max height of the bitstream that this instance represents.
|
int |
getIndex()
Gets the subjective quality index of this instance.
|
(package private) FrameDesc |
getLastReceivedFrame()
Gets the last frame from this encoding that has been received.
|
long |
getLastStableBitrateBps()
Gets the last stable bitrate (in bps) for this instance.
|
MediaStreamTrackDesc |
getMediaStreamTrack()
Gets the
MediaStreamTrackDesc that this instance belongs to. |
long |
getPrimarySSRC()
Gets the primary SSRC for this layering/encoding.
|
long |
getSecondarySsrc(java.lang.String type)
Get the secondary ssrc for this stream that corresponds to the given
type
|
void |
incrReceivers()
Atomically increments the number of receivers of this encoding.
|
boolean |
isActive(long nowMs)
Gets a boolean value indicating whether or not this instance is
streaming.
|
boolean |
isReceived()
Gets the number of receivers for this encoding.
|
boolean |
matches(long ssrc)
Gets a boolean indicating whether or not the SSRC specified in the
arguments matches this encoding or not.
|
(package private) boolean |
matches(RawPacket pkt)
Gets a boolean indicating whether or not the specified packet matches
this encoding or not.
|
boolean |
requires(int idx)
Returns a boolean that indicates whether or not this
RTPEncodingDesc depends on the subjective quality index that is
passed as an argument. |
java.lang.String |
toString() |
(package private) void |
update(RawPacket pkt,
long nowMs) |
public static final int SUSPENDED_INDEX
public RTPEncodingDesc(MediaStreamTrackDesc track, long primarySSRC)
track
- the MediaStreamTrackDesc
that this instance
belongs to.primarySSRC
- The primary SSRC for this layering/encoding.public RTPEncodingDesc(MediaStreamTrackDesc track, int idx, long primarySSRC, int tid, int sid, int height, double frameRate, RTPEncodingDesc[] dependencyEncodings)
track
- the MediaStreamTrackDesc
that this instance belongs
to.idx
- the subjective quality index for this
layering/encoding.primarySSRC
- The primary SSRC for this layering/encoding.tid
- temporal layer ID for this layering/encoding.sid
- spatial layer ID for this layering/encoding.height
- the max height of this encodingframeRate
- the max frame rate (in fps) of this encodingdependencyEncodings
- The RTPEncodingDesc
on which this
layer depends.public void addSecondarySsrc(long ssrc, java.lang.String type)
public long getLastStableBitrateBps()
public long getPrimarySSRC()
public long getSecondarySsrc(java.lang.String type)
type
- the type of the secondary ssrc (e.g. RTX)public boolean isActive(long nowMs)
public java.lang.String toString()
toString
in class java.lang.Object
public MediaStreamTrackDesc getMediaStreamTrack()
MediaStreamTrackDesc
that this instance belongs to.MediaStreamTrackDesc
that this instance belongs to.public int getIndex()
public boolean requires(int idx)
RTPEncodingDesc
depends on the subjective quality index that is
passed as an argument.idx
- the index of this instance in the track encodings array.RTPEncodingDesc
depends on the subjective
quality index that is passed as an argument, false otherwise.boolean matches(RawPacket pkt)
pkt
- the RTP packet.public boolean matches(long ssrc)
ssrc
- the SSRC to match.void update(RawPacket pkt, long nowMs)
pkt
- nowMs
- FrameDesc findFrameDesc(long timestamp)
FrameDesc
that matches the RTP packet specified
in the buffer passed in as an argument.FrameDesc getLastReceivedFrame()
public RTPEncodingDesc getBaseLayer()
RTPEncodingDesc
of the dependencies DAG. Useful for
simulcast handling.RTPEncodingDesc
of the dependencies DAG. Useful for
simulcast handling.public RTPEncodingDesc[] getDependencyEncodings()
RTPEncodingDesc
on which this layer depends.RTPEncodingDesc
on which this layer depends.public int getHeight()
public double getFrameRate()
public boolean isReceived()
public void incrReceivers()
public void decrReceivers()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.