Class RemoteBitrateEstimatorAbsSendTime
- java.lang.Object
-
- org.jitsi.impl.neomedia.rtp.remotebitrateestimator.RemoteBitrateEstimatorAbsSendTime
-
- All Implemented Interfaces:
CallStatsObserver,RemoteBitrateEstimator
public class RemoteBitrateEstimatorAbsSendTime extends Object implements RemoteBitrateEstimator
webrtc.org abs_send_time implementation as of June 26, 2017. commit ID: 23fbd2aa2c81d065b84d17b09b747e75672e1159- Author:
- Julian Chukwu, George Politis
-
-
Field Summary
-
Fields inherited from interface org.jitsi.service.neomedia.rtp.RemoteBitrateEstimator
kBitrateScale, kBitrateWindowMs, kDefaultMinBitrateBps, kProcessIntervalMs, kStreamTimeOutMs
-
-
Constructor Summary
Constructors Constructor Description RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver observer, @NotNull org.jitsi.utils.logging.DiagnosticContext diagnosticContext)Ctor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longconvertMsTo24Bits(long timeMs)Converts rtp timestamps to 24bit timestamp equivalencelonggetLatestEstimate()Returns the estimated payload bitrate in bits per second if a valid estimate exists; otherwise, -1.Collection<Long>getSsrcs()Returns the estimated payload bitrate in bits per second if a valid estimate exists; otherwise, -1.voidincomingPacketInfo(long arrivalTimeMs, long sendTime24bits, int payloadSize, long ssrc)Notifies this instance of an incoming packet.voidonRttUpdate(long avgRttMs, long maxRttMs)voidremoveStream(long ssrc)Removes all data for ssrc.voidsetMinBitrate(int minBitrateBps)Sets the minimum bitrate for this instance.
-
-
-
Constructor Detail
-
RemoteBitrateEstimatorAbsSendTime
public RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver observer, @NotNull @NotNull org.jitsi.utils.logging.DiagnosticContext diagnosticContext)
Ctor.- Parameters:
observer- the observer to notify on bitrate estimation changes.diagnosticContext- theDiagnosticContextof this instance.
-
-
Method Detail
-
incomingPacketInfo
public void incomingPacketInfo(long arrivalTimeMs, long sendTime24bits, int payloadSize, long ssrc)Notifies this instance of an incoming packet.- Specified by:
incomingPacketInfoin interfaceRemoteBitrateEstimator- Parameters:
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.
-
onRttUpdate
public void onRttUpdate(long avgRttMs, long maxRttMs)- Specified by:
onRttUpdatein interfaceCallStatsObserver
-
getLatestEstimate
public long getLatestEstimate()
Returns the estimated payload bitrate in bits per second if a valid estimate exists; otherwise, -1.- Specified by:
getLatestEstimatein interfaceRemoteBitrateEstimator- Returns:
- the estimated payload bitrate in bits per seconds if a valid estimate exists; otherwise, -1
-
getSsrcs
public Collection<Long> getSsrcs()
Returns the estimated payload bitrate in bits per second if a valid estimate exists; otherwise, -1.- Specified by:
getSsrcsin interfaceRemoteBitrateEstimator- Returns:
- the estimated payload bitrate in bits per seconds if a valid estimate exists; otherwise, -1
-
removeStream
public void removeStream(long ssrc)
Removes all data for ssrc.- Specified by:
removeStreamin interfaceRemoteBitrateEstimator
-
setMinBitrate
public void setMinBitrate(int minBitrateBps)
Sets the minimum bitrate for this instance.- Specified by:
setMinBitratein interfaceRemoteBitrateEstimator- Parameters:
minBitrateBps- the minimum bitrate in bps.
-
convertMsTo24Bits
public static long convertMsTo24Bits(long timeMs)
Converts rtp timestamps to 24bit timestamp equivalence- Parameters:
timeMs- is the RTP timestamp e.g System.currentTimeMillis().- Returns:
- time stamp representation in 24 bit representation.
-
-