jlibrtp
Class RtcpPkt

java.lang.Object
  extended by jlibrtp.RtcpPkt
Direct Known Subclasses:
RtcpPktAPP, RtcpPktBYE, RtcpPktPSFB, RtcpPktRR, RtcpPktRTPFB, RtcpPktSDES, RtcpPktSR

public class RtcpPkt
extends java.lang.Object

Common RTCP packet headers.

Author:
Arne Kepp

Field Summary
protected  int itemCount
          Number of items, e.g.
protected  int length
          The length of the RTCP packet, in 32 bit blocks minus 1.
protected  int packetType
          The type of RTCP packet, 8 bits
protected  int padding
          Padding , 1 bit
protected  int problem
          Whether a problem has been encountered during parsing
protected  byte[] rawPkt
          Contains the actual data (eventually)
protected  boolean received
          Only used for feedback message: Whether this packet was received
protected  long ssrc
          The ssrc that sent this, usually dictated by RTP Session
protected  long time
          Only used for feedback messages: Time message was generated
protected  int version
          The version, always 2, 2 bits
 
Constructor Summary
RtcpPkt()
           
 
Method Summary
protected  boolean check(java.net.InetAddress adr, ParticipantDatabase partDb)
          Check whether this packet came from the source we expected.
protected  void encode()
          This is just a dummy to make Eclipse complain less.
protected  boolean parseHeaders(int start)
          Parses the common header of an RTCP packet
protected  void writeHeaders()
          Writes the common header of RTCP packets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

problem

protected int problem
Whether a problem has been encountered during parsing


version

protected int version
The version, always 2, 2 bits


padding

protected int padding
Padding , 1 bit


itemCount

protected int itemCount
Number of items, e.g. receiver report blocks. Usage may vary. 5 bits


packetType

protected int packetType
The type of RTCP packet, 8 bits


length

protected int length
The length of the RTCP packet, in 32 bit blocks minus 1. 16 bits


ssrc

protected long ssrc
The ssrc that sent this, usually dictated by RTP Session


rawPkt

protected byte[] rawPkt
Contains the actual data (eventually)


time

protected long time
Only used for feedback messages: Time message was generated


received

protected boolean received
Only used for feedback message: Whether this packet was received

Constructor Detail

RtcpPkt

public RtcpPkt()
Method Detail

parseHeaders

protected boolean parseHeaders(int start)
Parses the common header of an RTCP packet

Parameters:
start - where in this.rawPkt the headers start
Returns:
true if parsing succeeded and header cheks

writeHeaders

protected void writeHeaders()
Writes the common header of RTCP packets. The values should be filled in when the packet is initiliazed and this function called at the very end of .encode()


encode

protected void encode()
This is just a dummy to make Eclipse complain less.


check

protected boolean check(java.net.InetAddress adr,
                        ParticipantDatabase partDb)
Check whether this packet came from the source we expected. Not currently used!

Parameters:
adr - address that packet came from
partDb - the participant database for the session
Returns:
true if this packet came from the expected source