Class RemoteBitrateEstimatorAbsSendTime

    • 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 - the DiagnosticContext of 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:
        incomingPacketInfo in interface RemoteBitrateEstimator
        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.
      • getLatestEstimate

        public long getLatestEstimate()
        Returns the estimated payload bitrate in bits per second if a valid estimate exists; otherwise, -1.
        Specified by:
        getLatestEstimate in interface RemoteBitrateEstimator
        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:
        getSsrcs in interface RemoteBitrateEstimator
        Returns:
        the estimated payload bitrate in bits per seconds if a valid estimate exists; otherwise, -1
      • setMinBitrate

        public void setMinBitrate​(int minBitrateBps)
        Sets the minimum bitrate for this instance.
        Specified by:
        setMinBitrate in interface RemoteBitrateEstimator
        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.