net.sf.fmj.media.rtp
Class RTCPReport

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTCPReport
All Implemented Interfaces:
Report
Direct Known Subclasses:
RTCPReceiverReport, RTCPSenderReport

public abstract class RTCPReport
extends java.lang.Object
implements Report

Represents an RTCP Report

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

Field Summary
protected  java.util.Vector feedbackReports
           
protected  RTCPHeader header
           
protected  Participant participant
           
protected  int sdesBytes
           
protected  java.util.Vector sourceDescriptions
           
 
Constructor Summary
RTCPReport(byte[] data, int offset, int length)
          Creates a new RTCPReport
 
Method Summary
 java.lang.String getByeReason()
          Returns the reason for the bye
 java.lang.String getCName()
          Gets the cName of the source of the report
 java.util.Vector getFeedbackReports()
          Returns the feedback reports for this RTCP report.
 Participant getParticipant()
          Returns the participant linked with this RTCP report
 java.util.Vector getSourceDescription()
          Returns the sources descriptions (SDES) in this RTCP report.
 long getSSRC()
          Returns the SSRC announced in this report.
 boolean isByePacket()
          Returns true if a bye packet was added to the report
protected  void readBye(byte[] data, int offset, int length)
          Reads and handles the BYE part of an RTCP report.
protected  void readFeedbackReports(byte[] data, int offset, int length)
          Reads feedback reports from the data
protected  void readSourceDescription(byte[] data, int offset, int length)
          Reads the source description from the data
protected  void setParticipant(RTPParticipant participant)
          Sets the participant linked with this RTCP report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

participant

protected Participant participant

header

protected RTCPHeader header

feedbackReports

protected java.util.Vector feedbackReports

sourceDescriptions

protected java.util.Vector sourceDescriptions

sdesBytes

protected int sdesBytes
Constructor Detail

RTCPReport

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

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

readFeedbackReports

protected void readFeedbackReports(byte[] data,
                                   int offset,
                                   int length)
                            throws java.io.IOException
Reads feedback reports from the data

Parameters:
data - The data to read the feedback reports from
offset - The offset into the data where the reports start
length - The length of the data
Throws:
java.io.IOException - I/O Exception

readSourceDescription

protected void readSourceDescription(byte[] data,
                                     int offset,
                                     int length)
                              throws java.io.IOException
Reads the source description from the data

Parameters:
data - The data to read the source description from
offset - The offset into the data where the SDES packet starts
length - The length of the data
Throws:
java.io.IOException - I/O Exception

readBye

protected void readBye(byte[] data,
                       int offset,
                       int length)
                throws java.io.IOException
Reads and handles the BYE part of an RTCP report.

Parameters:
data - the raw data in which the packet is contained
offset - the offset where the BYE starts
length - the length of the report
Throws:
java.io.IOException - I/O Exception

setParticipant

protected void setParticipant(RTPParticipant participant)
Sets the participant linked with this RTCP report.

Parameters:
participant - the participant identified as linked with this RTCP report

getParticipant

public Participant getParticipant()
Returns the participant linked with this RTCP report

Specified by:
getParticipant in interface Report
Returns:
the participant identified previously as being linked with this RTCP report

getSSRC

public long getSSRC()
Returns the SSRC announced in this report.

Specified by:
getSSRC in interface Report
Returns:
SSRC in this report

getFeedbackReports

public java.util.Vector getFeedbackReports()
Returns the feedback reports for this RTCP report.

Specified by:
getFeedbackReports in interface Report
Returns:
the feedback reports for this RTCP report

getSourceDescription

public java.util.Vector getSourceDescription()
Returns the sources descriptions (SDES) in this RTCP report.

Specified by:
getSourceDescription in interface Report
Returns:
the sources descriptions (SDES) in this RTCP report

getCName

public java.lang.String getCName()
Gets the cName of the source of the report

Returns:
the cName, or null if none sent

isByePacket

public boolean isByePacket()
Returns true if a bye packet was added to the report

Returns:
true if a BYE packet was added to the report

getByeReason

public java.lang.String getByeReason()
Returns the reason for the bye

Returns:
the reason announced for this BYE packet