net.sf.fmj.media.rtp
Class RTCPSenderInfo

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTCPSenderInfo

public class RTCPSenderInfo
extends java.lang.Object

Represents the sender info part of the RTCP SR Packet

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

Field Summary
static long MSB_1_BASE_TIME
           
static int SIZE
          The size of the sender info
 
Constructor Summary
RTCPSenderInfo(byte[] rtcpPacket, int offset, int length)
          Parses an RTCP Sender Report (SR) packet
 
Method Summary
 long getNtpTimestampLSW()
          Returns the timestamp least significant word
 long getNtpTimestampMSW()
          Returns the timestamp most significant word
 double getNtpTimestampSecs()
          Returns the timestamp value in seconds
 long getOctetCount()
          Returns the octet (cumulative) count.
 long getPacketCount()
          Returns the packet (cumulative) count.
 long getRtpTimestamp()
          Returns the RTP timestamp of this SR packet
 long getTimestamp()
          Returns the timestamp of the information
 java.lang.String toString()
          Returns a String reprensenting the information about the RTCP sender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
The size of the sender info

See Also:
Constant Field Values

MSB_1_BASE_TIME

public static final long MSB_1_BASE_TIME
See Also:
Constant Field Values
Constructor Detail

RTCPSenderInfo

public RTCPSenderInfo(byte[] rtcpPacket,
                      int offset,
                      int length)
               throws java.io.IOException
Parses an RTCP Sender Report (SR) packet

Parameters:
offset - offset after which the RTCP SR starts
length - length of the packet
rtcpPacket - The data of the RTCP packet
Throws:
java.io.IOException - I/O Exception
Method Detail

toString

public java.lang.String toString()
Returns a String reprensenting the information about the RTCP sender

Overrides:
toString in class java.lang.Object
Returns:
a String representing this object
See Also:
Object.toString()

getTimestamp

public long getTimestamp()
Returns the timestamp of the information

Returns:
timestamp of this information

getNtpTimestampSecs

public double getNtpTimestampSecs()
Returns the timestamp value in seconds

Returns:
timestamp in seconds

getNtpTimestampMSW

public long getNtpTimestampMSW()
Returns the timestamp most significant word

Returns:
the timestamp's most significant word

getNtpTimestampLSW

public long getNtpTimestampLSW()
Returns the timestamp least significant word

Returns:
the timestamp's least significant word

getRtpTimestamp

public long getRtpTimestamp()
Returns the RTP timestamp of this SR packet

Returns:
the timestamp of this RTCP packet

getOctetCount

public long getOctetCount()
Returns the octet (cumulative) count. The total number of payload octets (i.e., not including header or padding) transmitted in RTP data packets by the sender since starting transmission up until the time this SR packet was generated. This field can be used to estimate the average payload data rate.

Returns:
the number of bytes sent until now

getPacketCount

public long getPacketCount()
Returns the packet (cumulative) count. The total number of RTP data packets transmitted by the sender since starting transmission up until the time this SR packet was generated.

Returns:
the number of packets sent until now