public class RemoteBitrateEstimatorAbsSendTime extends java.lang.Object implements RemoteBitrateEstimator
kBitrateScale, kBitrateWindowMs, kDefaultMinBitrateBps, kProcessIntervalMs, kStreamTimeOutMs
Constructor and Description |
---|
RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver observer,
@NotNull DiagnosticContext diagnosticContext)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
static long |
convertMsTo24Bits(long timeMs)
Converts rtp timestamps to 24bit timestamp equivalence
|
long |
getLatestEstimate()
Returns the estimated payload bitrate in bits per second if a valid
estimate exists; otherwise, -1.
|
java.util.Collection<java.lang.Long> |
getSsrcs()
Returns the estimated payload bitrate in bits per second if a valid
estimate exists; otherwise, -1.
|
void |
incomingPacketInfo(long arrivalTimeMs,
long sendTime24bits,
int payloadSize,
long ssrc)
Notifies this instance of an incoming packet.
|
void |
onRttUpdate(long avgRttMs,
long maxRttMs) |
void |
removeStream(long ssrc)
Removes all data for ssrc.
|
void |
setMinBitrate(int minBitrateBps)
Sets the minimum bitrate for this instance.
|
public RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver observer, @NotNull @NotNull DiagnosticContext diagnosticContext)
observer
- the observer to notify on bitrate estimation changes.diagnosticContext
- the DiagnosticContext
of this instance.public void incomingPacketInfo(long arrivalTimeMs, long sendTime24bits, int payloadSize, long ssrc)
incomingPacketInfo
in interface RemoteBitrateEstimator
arrivalTimeMs
- the arrival time of the packet in millis.sendTime24bits
- the send time of the packet in AST format
(24 bits, 6.18 fixed point).payloadSize
- the payload size of the packet.ssrc
- the SSRC of the packet.public void onRttUpdate(long avgRttMs, long maxRttMs)
onRttUpdate
in interface CallStatsObserver
public long getLatestEstimate()
getLatestEstimate
in interface RemoteBitrateEstimator
public java.util.Collection<java.lang.Long> getSsrcs()
getSsrcs
in interface RemoteBitrateEstimator
public void removeStream(long ssrc)
removeStream
in interface RemoteBitrateEstimator
public void setMinBitrate(int minBitrateBps)
setMinBitrate
in interface RemoteBitrateEstimator
minBitrateBps
- the minimum bitrate in bps.public static long convertMsTo24Bits(long timeMs)
timeMs
- is the RTP timestamp e.g System.currentTimeMillis().
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.