net.sf.fmj.media.rtp
Class RTCPFeedback

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTCPFeedback
All Implemented Interfaces:
Feedback

public class RTCPFeedback
extends java.lang.Object
implements Feedback

Represents an RTCP Feedback report

Version:
1-1-alpha3
Author:
Andrew G D Rowley, Christian Vincenot

Field Summary
static int SIZE
          The size of a feedback report in bytes
 
Constructor Summary
RTCPFeedback(byte[] data, int offset, int length)
          Creates a new RTCP Feedback report
 
Method Summary
 long getDLSR()
          Returns the delay since last SR (DLSR).
 int getFractionLost()
          Returns the fraction of RTP data packets from source SSRC_n lost since the previous SR or RR packet was sent
 long getJitter()
          Returns the interarrival jitter An estimate of the statistical variance of the RTP data packet interarrival time, measured in timestamp units and expressed as an unsigned integer.
 long getLSR()
          Returns last SR timestamp (LSR).
 long getNumLost()
          Returns the number of RTP data packets from source SSRC_n lost since the previous SR or RR packet was sent.
 long getSSRC()
          Returns the SSRC corresponding to the feedback.
 long getXtndSeqNum()
          Returns the extended highest sequence number received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
The size of a feedback report in bytes

See Also:
Constant Field Values
Constructor Detail

RTCPFeedback

public RTCPFeedback(byte[] data,
                    int offset,
                    int length)
             throws java.io.IOException
Creates a new RTCP Feedback report

Parameters:
data - The data to read from
offset - The offset into the data where the report starts
length - The length of the report
Throws:
java.io.IOException - I/O Exception
Method Detail

getSSRC

public long getSSRC()
Returns the SSRC corresponding to the feedback.

Specified by:
getSSRC in interface Feedback
Returns:
The SSRC

getFractionLost

public int getFractionLost()
Returns the fraction of RTP data packets from source SSRC_n lost since the previous SR or RR packet was sent

Specified by:
getFractionLost in interface Feedback
Returns:
Returns the fraction of packets lost

getNumLost

public long getNumLost()
Returns the number of RTP data packets from source SSRC_n lost since the previous SR or RR packet was sent. This number is a cumulatative count (like most of the values used in the RFC).

Specified by:
getNumLost in interface Feedback
Returns:
Returns the number of packets lost

getXtndSeqNum

public long getXtndSeqNum()
Returns the extended highest sequence number received. The low 16 bits contain the highest sequence number received in an RTP data packet from source SSRC_n, and the most significant 16 bits extend that sequence number with the corresponding count of sequence number cycles

Specified by:
getXtndSeqNum in interface Feedback
Returns:
the extended highest sequence number received.

getJitter

public long getJitter()
Returns the interarrival jitter An estimate of the statistical variance of the RTP data packet interarrival time, measured in timestamp units and expressed as an unsigned integer.

Specified by:
getJitter in interface Feedback
Returns:
the interarrival jitter

getLSR

public long getLSR()
Returns last SR timestamp (LSR).

Specified by:
getLSR in interface Feedback
Returns:
the last SR timestamp (LSR)

getDLSR

public long getDLSR()
Returns the delay since last SR (DLSR).

Specified by:
getDLSR in interface Feedback
Returns:
the delay since last SR (DLSR)