public class MediaStreamStatsImpl extends Object implements MediaStreamStats
MediaStreamStats2Impl instead, where we can manage the complexity
and consistency better.| Modifier and Type | Class and Description |
|---|---|
static class |
MediaStreamStatsImpl.StreamDirection
Enumeration of the direction (DOWNLOAD or UPLOAD) used for the stats.
|
| Constructor and Description |
|---|
MediaStreamStatsImpl(MediaStreamImpl mediaStreamImpl)
Creates a new instance of stats concerning a MediaStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRTCPPacketListener(RTCPPacketListener listener)
Adds a listener which will be notified when RTCP packets are received.
|
double |
getAvgDownloadJitterMs()
Gets the average of the RTP jitter values reported to us in RTCP reports,
in milliseconds.
|
double |
getAvgUploadJitterMs()
Gets the average of the RTP jitter values reported to us in RTCP reports,
in milliseconds.
|
double |
getDownloadJitterMs()
Returns the jitter average of this download stream.
|
long |
getDownloadNbPacketLost()
Returns the number of lost packets for the receive streams.
|
double |
getDownloadPercentLoss()
Returns the percent loss of the download stream.
|
double |
getDownloadRateKiloBitPerSec()
Returns the bandwidth used by this download stream.
|
Dimension |
getDownloadVideoSize()
Returns the download video size if this stream downloads a video, or
null if not.
|
String |
getEncoding()
Returns the MediaStream enconding.
|
String |
getEncodingClockRate()
Returns the MediaStream enconding rate (in Hz)..
|
static javax.media.control.JitterBufferControl |
getJitterBufferControl(javax.media.rtp.ReceiveStream receiveStream)
Gets the JitterBufferControl of a ReceiveStream.
|
int |
getJitterBufferDelayMs()
Returns the delay in milliseconds introduced by the jitter buffer.
|
int |
getJitterBufferDelayPackets()
Returns the delay in number of packets introduced by the jitter buffer.
|
String |
getLocalIPAddress()
Returns the local IP address of the MediaStream.
|
int |
getLocalPort()
Returns the local port of the MediaStream.
|
double |
getMaxDownloadJitterMs()
Gets the maximum RTP jitter value reported by us in an RTCP report, in
milliseconds.
|
double |
getMaxUploadJitterMs()
Gets the maximum RTP jitter value reported to us in an RTCP report, in
milliseconds.
|
double |
getMinDownloadJitterMs()
Gets the minimum RTP jitter value reported by us in an RTCP report, in
milliseconds.
|
double |
getMinUploadJitterMs()
Gets the minimum RTP jitter value reported to us in an RTCP report, in
milliseconds.
|
long |
getNbDiscarded()
Returns the total number of Protocol Data Units (PDU) discarded by the
FMJ packet queue since the beginning of the session.
|
int |
getNbDiscardedFull()
Returns the number of Protocol Data Units (PDU) discarded by the
FMJ packet queue since the beginning of the session because it was full.
|
int |
getNbDiscardedLate()
Returns the number of Protocol Data Units (PDU) discarded by the
FMJ packet queue since the beginning of the session because they were late.
|
int |
getNbDiscardedReset()
Returns the number of Protocol Data Units (PDU) discarded by the
FMJ packet queue since the beginning of the session during resets.
|
int |
getNbDiscardedShrink()
Returns the number of Protocol Data Units (PDU) discarded by the
FMJ packet queue since the beginning of the session due to shrinking.
|
long |
getNbFec()
Returns the number of packets for which FEC data was decoded.
|
long |
getNbPackets()
Returns the total number of packets that are send or receive for this
stream since the stream is created.
|
long |
getNbPacketsLost()
Returns the number of lost packets for that stream.
|
long |
getNbPacketsReceived()
Returns the number of packets received since the beginning of the
session.
|
long |
getNbPacketsSent()
Returns the number of packets sent since the beginning of the session.
|
long |
getNbReceivedBytes()
Returns the number of received bytes since the beginning of the
session.
|
long |
getNbSentBytes()
Returns the number of sent bytes since the beginning of the
session.
|
int |
getPacketQueueCountPackets()
Returns the number of packets in the first JitterBufferControl
found via getJitterBufferControls.
|
int |
getPacketQueueSize()
Returns the size of the first JitterBufferControl found via
getJitterBufferControls.
|
double |
getPercentDiscarded()
Returns the percent of discarded packets
|
String |
getRemoteIPAddress()
Returns the remote IP address of the MediaStream.
|
int |
getRemotePort()
Returns the remote port of the MediaStream.
|
RTCPReports |
getRTCPReports()
Gets the detailed statistics about the RTCP reports sent and received by
the associated local peer.
|
long |
getRttMs()
Returns the RTT computed with the RTCP feedback (cf.
|
long |
getSendingBitrate()
Gets the rate at which we are currently sending data to the remote
endpoint in bits per second.
|
double |
getUploadJitterMs()
Returns the jitter average of this upload stream.
|
long |
getUploadNbPacketLost()
Returns the total number of sent packets lost.
|
double |
getUploadPercentLoss()
Returns the percent loss of the upload stream.
|
double |
getUploadRateKiloBitPerSec()
Returns the bandwidth used by this download stream.
|
Dimension |
getUploadVideoSize()
Returns the upload video size if this stream uploads a video, or null if
not.
|
boolean |
isAdaptiveBufferEnabled()
Checks whether there is an adaptive jitter buffer enabled for at least
one of the ReceiveStreams of the MediaStreamImpl.
|
void |
nackReceived(NACKPacket nack)
Notifies this instance that an RTCP NACK packet was received.
|
void |
rembReceived(RTCPREMBPacket remb)
Notifies this instance that an RTCP REMB packet was received.
|
void |
removeRTCPPacketListener(RTCPPacketListener listener)
Removes a listener from the list of listeners which will be notified when
RTCP packets are received.
|
void |
srReceived(net.sf.fmj.media.rtp.RTCPSRPacket sr)
Notifies this instance that an RTCP SR packet was received.
|
void |
tccPacketReceived(RTCPTCCPacket tccPacket)
Notifies listeners that a transport-wide-cc packet was received.
|
void |
updateRemoteJitter(long remoteJitter)
Notifies this instance that an RTCP report with the given value for
RTP jitter was received.
|
void |
updateStats()
Computes and updates information for a specific stream.
|
public MediaStreamStatsImpl(MediaStreamImpl mediaStreamImpl)
mediaStreamImpl - The MediaStreamImpl used to compute the stats.public static javax.media.control.JitterBufferControl getJitterBufferControl(javax.media.rtp.ReceiveStream receiveStream)
receiveStream - the ReceiveStream to get the
JitterBufferControl ofpublic double getDownloadJitterMs()
getDownloadJitterMs in interface MediaStreamStatspublic long getDownloadNbPacketLost()
getDownloadNbPacketLost in interface MediaStreamStatspublic long getUploadNbPacketLost()
getUploadNbPacketLost in interface MediaStreamStatspublic double getDownloadPercentLoss()
getDownloadPercentLoss in interface MediaStreamStatspublic double getDownloadRateKiloBitPerSec()
getDownloadRateKiloBitPerSec in interface MediaStreamStatspublic Dimension getDownloadVideoSize()
getDownloadVideoSize in interface MediaStreamStatspublic String getEncoding()
getEncoding in interface MediaStreamStatspublic String getEncodingClockRate()
getEncodingClockRate in interface MediaStreamStatspublic int getJitterBufferDelayMs()
getJitterBufferDelayMs in interface MediaStreamStatspublic int getJitterBufferDelayPackets()
getJitterBufferDelayPackets in interface MediaStreamStatspublic double getMinDownloadJitterMs()
getMinDownloadJitterMs in interface MediaStreamStatspublic double getMaxDownloadJitterMs()
getMaxDownloadJitterMs in interface MediaStreamStatspublic double getMinUploadJitterMs()
getMinUploadJitterMs in interface MediaStreamStatspublic double getMaxUploadJitterMs()
getMaxUploadJitterMs in interface MediaStreamStatspublic double getAvgDownloadJitterMs()
getAvgDownloadJitterMs in interface MediaStreamStatspublic double getAvgUploadJitterMs()
getAvgUploadJitterMs in interface MediaStreamStatspublic void updateRemoteJitter(long remoteJitter)
remoteJitter - the jitter received, in RTP time units.public String getLocalIPAddress()
getLocalIPAddress in interface MediaStreamStatspublic int getLocalPort()
getLocalPort in interface MediaStreamStatspublic long getNbDiscarded()
getNbDiscarded in interface MediaStreamStatspublic int getNbDiscardedFull()
getNbDiscardedFull in interface MediaStreamStatspublic int getNbDiscardedLate()
getNbDiscardedLate in interface MediaStreamStatspublic int getNbDiscardedReset()
getNbDiscardedReset in interface MediaStreamStatspublic int getNbDiscardedShrink()
getNbDiscardedShrink in interface MediaStreamStatspublic long getNbFec()
getNbFec in interface MediaStreamStatsupdateNbFec()public long getNbPackets()
getNbPackets in interface MediaStreamStatspublic long getNbPacketsLost()
getNbPacketsLost in interface MediaStreamStatspublic long getNbPacketsSent()
getNbPacketsSent in interface MediaStreamStatspublic long getNbPacketsReceived()
getNbPacketsReceived in interface MediaStreamStatspublic long getNbReceivedBytes()
MediaStreamStatsgetNbReceivedBytes in interface MediaStreamStatspublic long getNbSentBytes()
MediaStreamStatsgetNbSentBytes in interface MediaStreamStatspublic int getPacketQueueCountPackets()
getPacketQueueCountPackets in interface MediaStreamStatspublic int getPacketQueueSize()
getPacketQueueSize in interface MediaStreamStatspublic double getPercentDiscarded()
getPercentDiscarded in interface MediaStreamStatspublic String getRemoteIPAddress()
getRemoteIPAddress in interface MediaStreamStatspublic int getRemotePort()
getRemotePort in interface MediaStreamStatspublic RTCPReports getRTCPReports()
getRTCPReports in interface MediaStreamStatspublic long getRttMs()
getRttMs in interface MediaStreamStatspublic double getUploadJitterMs()
getUploadJitterMs in interface MediaStreamStatspublic double getUploadPercentLoss()
getUploadPercentLoss in interface MediaStreamStatspublic double getUploadRateKiloBitPerSec()
getUploadRateKiloBitPerSec in interface MediaStreamStatspublic Dimension getUploadVideoSize()
getUploadVideoSize in interface MediaStreamStatspublic boolean isAdaptiveBufferEnabled()
MediaStreamStatsisAdaptiveBufferEnabled in interface MediaStreamStatspublic void updateStats()
updateStats in interface MediaStreamStatspublic void rembReceived(RTCPREMBPacket remb)
remb - the packet.public void nackReceived(NACKPacket nack)
nack - the packet.public void srReceived(net.sf.fmj.media.rtp.RTCPSRPacket sr)
sr - the packet.public void addRTCPPacketListener(RTCPPacketListener listener)
addRTCPPacketListener in interface MediaStreamStatslistener - the listener.public void removeRTCPPacketListener(RTCPPacketListener listener)
removeRTCPPacketListener in interface MediaStreamStatslistener - the listener.public long getSendingBitrate()
MediaStreamStats.getUploadRateKiloBitPerSec(). The duplication is necessary, because
of implementation details.
This method is different from getUploadRateKiloBitPerSec() in
that:
1. It is not necessary for updateStats() to be called
periodically by the user of libjitsi in order for it to return correct
values.
2. The returned value is based on the average bitrate over a fixed
window, as opposed to an EWMA.
3. The measurement is performed after the MediaStream's
transformations, notably after simulcast layers are dropped (i.e. closer
to the network interface).
The return value includes RTP payload and RTP headers, as well as RTCP.getSendingBitrate in interface MediaStreamStatspublic void tccPacketReceived(RTCPTCCPacket tccPacket)
Copyright © 2021 jitsi.org. All rights reserved.