net.sf.fmj.media.rtp
Class RTCPHeader

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

public class RTCPHeader
extends java.lang.Object

Represents and parses an RTCP header

Version:
1-1-alpha
Author:
Andrew G D Rowley

Field Summary
static int SDES_CNAME
          An SDES CNAME header
static int SDES_EMAIL
          An SDES EMAIL header
static int SDES_LOC
          An SDES LOC header
static int SDES_NAME
          An SDES NAME header
static int SDES_NOTE
          An SDES NOTE header
static int SDES_PHONE
          An SDES PHONE header
static int SDES_SKIP
          The number of bytes to skip for a SDES header
static int SDES_TOOL
          An SDES TOOL header
static int SIZE
          The size of the header in bytes
static int VERSION
          The current RTP version
 
Constructor Summary
RTCPHeader(byte[] data, int offset, int length)
          Creates a new RTCPHeader
RTCPHeader(java.net.DatagramPacket packet)
          Creates a new RTCPHeader
 
Method Summary
 int getFlags()
           
 int getLength()
           
 short getPacketType()
           
 short getPadding()
           
 short getReceptionCount()
           
 long getSsrc()
           
 short getVersion()
           
 void print()
          Displays the header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final int VERSION
The current RTP version

See Also:
Constant Field Values

SDES_SKIP

public static final int SDES_SKIP
The number of bytes to skip for a SDES header

See Also:
Constant Field Values

SDES_CNAME

public static final int SDES_CNAME
An SDES CNAME header

See Also:
Constant Field Values

SDES_NAME

public static final int SDES_NAME
An SDES NAME header

See Also:
Constant Field Values

SDES_EMAIL

public static final int SDES_EMAIL
An SDES EMAIL header

See Also:
Constant Field Values

SDES_PHONE

public static final int SDES_PHONE
An SDES PHONE header

See Also:
Constant Field Values

SDES_LOC

public static final int SDES_LOC
An SDES LOC header

See Also:
Constant Field Values

SDES_TOOL

public static final int SDES_TOOL
An SDES TOOL header

See Also:
Constant Field Values

SDES_NOTE

public static final int SDES_NOTE
An SDES NOTE header

See Also:
Constant Field Values

SIZE

public static final int SIZE
The size of the header in bytes

See Also:
Constant Field Values
Constructor Detail

RTCPHeader

public RTCPHeader(java.net.DatagramPacket packet)
           throws java.io.IOException
Creates a new RTCPHeader

Parameters:
packet - The packet from which to parse the header
Throws:
java.io.IOException

RTCPHeader

public RTCPHeader(byte[] data,
                  int offset,
                  int length)
           throws java.io.IOException
Creates a new RTCPHeader

Parameters:
data - The data to read the header from
offset - The offset in the data to start
length - The length of the data to read
Throws:
java.io.IOException
Method Detail

getFlags

public int getFlags()
Returns:
The header flags

getVersion

public short getVersion()
Returns:
The RTP version implemented

getPadding

public short getPadding()
Returns:
The amount of padding added to the frame

getReceptionCount

public short getReceptionCount()
Returns:
The number of reception blocks in the packet

getPacketType

public short getPacketType()
Returns:
The type of the RTCP packet (SR or RR)

getLength

public int getLength()
Returns:
The length of the RTCP packet

getSsrc

public long getSsrc()
Returns:
The ssrc being described

print

public void print()
Displays the header