public class RemoteBitrateEstimatorSingleStream extends java.lang.Object implements RemoteBitrateEstimator
Modifier and Type | Field and Description |
---|---|
(package private) static double |
kTimestampToMs |
kBitrateScale, kBitrateWindowMs, kDefaultMinBitrateBps, kProcessIntervalMs, kStreamTimeOutMs, kTimestampGroupLengthMs
Constructor and Description |
---|
RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver observer,
@NotNull DiagnosticContext diagnosticContext) |
Modifier and Type | Method and Description |
---|---|
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 timestamp,
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.
|
static final double kTimestampToMs
public RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver observer, @NotNull @NotNull DiagnosticContext diagnosticContext)
public long getLatestEstimate()
getLatestEstimate
in interface RemoteBitrateEstimator
public java.util.Collection<java.lang.Long> getSsrcs()
RemoteBitrateEstimator
getSsrcs
in interface RemoteBitrateEstimator
public void incomingPacketInfo(long arrivalTimeMs, long timestamp, int payloadSize, long ssrc_)
incomingPacketInfo
in interface RemoteBitrateEstimator
arrivalTimeMs
- the arrival time of the packet in millis.timestamp
- the RTP timestamp of the packet (RFC3550).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 void removeStream(long ssrc)
removeStream
in interface RemoteBitrateEstimator
public void setMinBitrate(int minBitrateBps)
RemoteBitrateEstimator
setMinBitrate
in interface RemoteBitrateEstimator
minBitrateBps
- the minimum bitrate in bps.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.