Class RTCPExtendedReport


  • public class RTCPExtendedReport
    extends net.sf.fmj.media.rtp.RTCPPacket
    Represents an RTP Control Protocol Extended Report (RTCP XR) packet in the terms of FMJ i.e. as an RTCPPacket sub-class.
    Author:
    Lyubomir Marinov
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String SDP_ATTRIBUTE  
      static int XR
      The packet type (PT) constant 207 which identifies RTCP XR packets.
      • Fields inherited from class net.sf.fmj.media.rtp.RTCPPacket

        APP, base, BYE, COMPOUND, RR, SDES, SR, type
      • Fields inherited from class net.sf.fmj.media.rtp.util.Packet

        data, flags, length, offset, receiptTime, received
    • Constructor Summary

      Constructors 
      Constructor Description
      RTCPExtendedReport()
      Initializes a new RTCPExtendedReport instance.
      RTCPExtendedReport​(byte[] buf, int off, int len)
      Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a byte array.
      RTCPExtendedReport​(int b0, int pt, int length, DataInputStream datainputstream)
      Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation of part of the packet from a DataInputStream, and taking the values found in the first 4 bytes of the binary representation as arguments.
      RTCPExtendedReport​(DataInputStream datainputstream)
      Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a DataInputStream.
    • Constructor Detail

      • RTCPExtendedReport

        public RTCPExtendedReport()
        Initializes a new RTCPExtendedReport instance.
      • RTCPExtendedReport

        public RTCPExtendedReport​(byte[] buf,
                                  int off,
                                  int len)
                           throws IOException
        Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a byte array.
        Parameters:
        buf - the binary representation from which the new instance is to be initialized
        off - the offset in buf at which the binary representation starts
        len - the number of bytes in buf starting at off which comprise the binary representation
        Throws:
        IOException - if an input/output error occurs while deserializing/reading the new instance from buf or the binary representation does not parse into an RTCPExtendedReport instance
      • RTCPExtendedReport

        public RTCPExtendedReport​(DataInputStream datainputstream)
                           throws IOException
        Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation from a DataInputStream.
        Parameters:
        datainputstream - the binary representation from which the new instance is to be initialized.
        Throws:
        IOException - if an input/output error occurs while deserializing/reading the new instance from datainputstream or the binary representation does not parse into an RTCPExtendedReport instance.
      • RTCPExtendedReport

        public RTCPExtendedReport​(int b0,
                                  int pt,
                                  int length,
                                  DataInputStream datainputstream)
                           throws IOException
        Initializes a new RTCPExtendedReport instance by deserializing/reading a binary representation of part of the packet from a DataInputStream, and taking the values found in the first 4 bytes of the binary representation as arguments.
        Parameters:
        b0 - the first byte of the binary representation.
        pt - the value of the packet type field.
        length - the value of the length field.
        datainputstream - the binary representation from which the new instance is to be initialized, excluding the first 4 bytes.
        Throws:
        IOException - if an input/output error occurs while deserializing/reading the new instance from datainputstream or the binary representation does not parse into an RTCPExtendedReport instance.
    • Method Detail

      • addReportBlock

        public boolean addReportBlock​(RTCPExtendedReport.ReportBlock reportBlock)
        Adds an extended report block to this extended report.
        Parameters:
        reportBlock - the extended report block to add to this extended report
        Returns:
        true if the list of extended report blocks carried by this extended report changed because of the method invocation; otherwise, false
        Throws:
        NullPointerException - if reportBlock is null
      • calcLength

        public int calcLength()
        Specified by:
        calcLength in class net.sf.fmj.media.rtp.RTCPPacket
      • getReportBlockCount

        public int getReportBlockCount()
        Gets the number of the extended report blocks carried by this RTCPExtendedReport.
        Returns:
        the number of the extended report blocks carried by this RTCPExtendedReport
      • getReportBlocks

        public List<RTCPExtendedReport.ReportBlock> getReportBlocks()
        Gets a list of the extended report blocks carried by this RTCPExtendedReport.
        Returns:
        a list of the extended repot blocks carried by this RTCPExtendedReport
      • getSSRC

        public int getSSRC()
        Gets the synchronization source identifier (SSRC) of the originator of this XR packet.
        Returns:
        the synchronization source identifier (SSRC) of the originator of this XR packet
      • getSystemTimeStamp

        public long getSystemTimeStamp()
        Gets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.
        Returns:
        the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint
      • removeReportBlock

        public boolean removeReportBlock​(RTCPExtendedReport.ReportBlock reportBlock)
        Removes an extended report block from this extended report.
        Parameters:
        reportBlock - the extended report block to remove from this extended report
        Returns:
        true if the list of extended report blocks carried by this extended report changed because of the method invocation; otherwise, false
      • setSSRC

        public void setSSRC​(int ssrc)
        Sets the synchronization source identifier (SSRC) of the originator of this XR packet.
        Parameters:
        ssrc - the synchronization source identifier (SSRC) of the originator of this XR packet
      • setSystemTimeStamp

        public void setSystemTimeStamp​(long systemTimeStamp)
        Sets the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint.
        Parameters:
        systemTimeStamp - the System time in milliseconds at which this RTCPExtendedReport has been received or sent by the local endpoint
      • toString

        public String toString()
        Overrides:
        toString in class net.sf.fmj.media.rtp.util.Packet