net.sf.fmj.media.rtp
Class RTPHeader

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

public class RTPHeader
extends java.lang.Object

Represents the header of an RTP packet

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

Field Summary
static int MAX_PAYLOAD
          The maximum payload type
static int MAX_SEQUENCE
          The maximum RTP sequence
static int SIZE
          The size of the RTP Header
static long UINT_TO_LONG_CONVERT
          Unsigned int to long conversion mask
static int VERSION
          The current RTP Header Version
 
Constructor Summary
RTPHeader(byte[] data, int offset, int length)
          Creates a new RTPHeader
RTPHeader(java.net.DatagramPacket packet)
          Creates a new RTPHeader
 
Method Summary
 int getFlags()
           
 void print()
          Prints 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 Header Version

See Also:
Constant Field Values

MAX_PAYLOAD

public static final int MAX_PAYLOAD
The maximum payload type

See Also:
Constant Field Values

SIZE

public static final int SIZE
The size of the RTP Header

See Also:
Constant Field Values

MAX_SEQUENCE

public static final int MAX_SEQUENCE
The maximum RTP sequence

See Also:
Constant Field Values

UINT_TO_LONG_CONVERT

public static final long UINT_TO_LONG_CONVERT
Unsigned int to long conversion mask

See Also:
Constant Field Values
Constructor Detail

RTPHeader

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

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

RTPHeader

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

Parameters:
data - The packet to parse the header from
Throws:
java.io.IOException
Method Detail

getFlags

public int getFlags()
Returns:
The flags of the header

print

public void print()
Prints the header