Class RTCPFeedbackMessagePacket

  • All Implemented Interfaces:
    Payload

    public class RTCPFeedbackMessagePacket
    extends Object
    implements Payload
    Represents an RTCP feedback message packet as described by RFC 4585 "Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)".
    Author:
    Sebastien Vincent, Lyubomir Marinov
    • Constructor Summary

      Constructors 
      Constructor Description
      RTCPFeedbackMessagePacket​(int fmt, int pt, long senderSSRC, long sourceSSRC)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFeedbackMessageType()
      Gets the feedback message type (FMT) of this RTCPFeedbackMessagePacket.
      int getPayloadType()
      Gets the packet type (PT) of this RTCPFeedbackMessagePacket.
      long getSenderSSRC()
      Gets the synchronization source identifier (SSRC) of the originator of this packet.
      int getSequenceNumber()
      Gets the (command) sequence number of this Full Intra Request (FIR) RTCP feedback message as defined by RFC 5104 "Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF)".
      long getSourceSSRC()
      Gets the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to.
      void setFeedbackMessageType​(int fmt)
      Sets the feedback message type (FMT) of this RTCPFeedbackMessagePacket.
      void setPayloadType​(int pt)
      Sets the packet type (PT) of this RTCPFeedbackMessagePacket.
      void setSenderSSRC​(long senderSSRC)
      Sets the synchronization source identifier (SSRC) of the originator of this packet.
      void setSequenceNumber​(int seqNr)
      Sets the (command) sequence number of this Full Intra Request (FIR) RTCP feedback message as defined by RFC 5104 "Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF)".
      void setSourceSSRC​(long sourceSSRC)
      Sets the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to.
      static void writeSSRC​(long ssrc, byte[] buf, int off)
      Writes a specific synchronization source identifier (SSRC) into a specific byte array starting at a specific offset.
      void writeTo​(javax.media.rtp.OutputDataStream out)
      Write the RTCP packet representation of this instance into a specific OutputDataStream.
    • Constructor Detail

      • RTCPFeedbackMessagePacket

        public RTCPFeedbackMessagePacket​(int fmt,
                                         int pt,
                                         long senderSSRC,
                                         long sourceSSRC)
        Constructor.
        Parameters:
        fmt - feedback message type
        pt - packet type
        senderSSRC - SSRC of packet sender
        sourceSSRC - SSRC of media source
    • Method Detail

      • getFeedbackMessageType

        public int getFeedbackMessageType()
        Gets the feedback message type (FMT) of this RTCPFeedbackMessagePacket.
        Returns:
        the feedback message type (FMT) of this RTCPFeedbackMessagePacket
      • getPayloadType

        public int getPayloadType()
        Gets the packet type (PT) of this RTCPFeedbackMessagePacket.
        Returns:
        the packet type (PT) of this RTCPFeedbackMessagePacket
      • getSenderSSRC

        public long getSenderSSRC()
        Gets the synchronization source identifier (SSRC) of the originator of this packet.
        Returns:
        the synchronization source identifier (SSRC) of the originator of this packet
      • getSequenceNumber

        public int getSequenceNumber()
        Gets the (command) sequence number of this Full Intra Request (FIR) RTCP feedback message as defined by RFC 5104 "Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF)". The sequence number space is unique for each pairing of the SSRC of command source and the SSRC of the command target. The sequence number SHALL be increased by 1 modulo 256 for each new command. A repetition SHALL NOT increase the sequence number. The initial value is arbitrary.
        Returns:
        the (command) sequence number of this Full Intra Request (FIR) RTCP feedback message
      • getSourceSSRC

        public long getSourceSSRC()
        Gets the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to.
        Returns:
        the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to
      • setFeedbackMessageType

        public void setFeedbackMessageType​(int fmt)
        Sets the feedback message type (FMT) of this RTCPFeedbackMessagePacket.
        Parameters:
        fmt - the feedback message type (FMT) to set on this RTCPFeedbackMessagePacket
      • setPayloadType

        public void setPayloadType​(int pt)
        Sets the packet type (PT) of this RTCPFeedbackMessagePacket.
        Parameters:
        pt - the packet type (PT) to set on this RTCPFeedbackMessagePacket
      • setSenderSSRC

        public void setSenderSSRC​(long senderSSRC)
        Sets the synchronization source identifier (SSRC) of the originator of this packet.
        Parameters:
        senderSSRC - the synchronization source identifier (SSRC) of the originator of this packet
      • setSequenceNumber

        public void setSequenceNumber​(int seqNr)
        Sets the (command) sequence number of this Full Intra Request (FIR) RTCP feedback message as defined by RFC 5104 "Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF)". The sequence number space is unique for each pairing of the SSRC of command source and the SSRC of the command target. The sequence number SHALL be increased by 1 modulo 256 for each new command.
        Parameters:
        seqNr - the (command) sequence number to set on this Full Intra Request (FIR) RTCP feedback message
      • setSourceSSRC

        public void setSourceSSRC​(long sourceSSRC)
        Sets the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to.
        Parameters:
        sourceSSRC - the synchronization source identifier (SSRC) of the media source that this piece of feedback information is related to
      • writeSSRC

        public static void writeSSRC​(long ssrc,
                                     byte[] buf,
                                     int off)
        Writes a specific synchronization source identifier (SSRC) into a specific byte array starting at a specific offset.
        Parameters:
        ssrc - the synchronization source identifier (SSRC) to write into buf starting at off
        buf - the byte array to write the specified ssrc into starting at off
        off - the offset in buf at which the writing of ssrc is to start
      • writeTo

        public void writeTo​(javax.media.rtp.OutputDataStream out)
        Write the RTCP packet representation of this instance into a specific OutputDataStream.
        Specified by:
        writeTo in interface Payload
        Parameters:
        out - the OutputDataStream into which the RTCP packet representation of this instance is to be written