Class DtmfRawPacket

  • All Implemented Interfaces:
    org.jitsi.utils.ByteArrayBuffer

    public class DtmfRawPacket
    extends RawPacket
    DtmfRawPacket represent an RTP Packet. You create your DtmfRawPacket by calling the constructor. You specify the DTMF attributes : code=9, end=false, marker=true ... Then you fill the packet using init( ... dtmf attributes ... );
    Author:
    Romain Philibert, Emil Ivov, Damian Minkov
    • Constructor Detail

      • DtmfRawPacket

        public DtmfRawPacket​(byte[] buffer,
                             int offset,
                             int length,
                             byte payload)
        Creates a DtmfRawPacket using the specified buffer.
        Parameters:
        buffer - the byte array that we should use to store packet content
        offset - the index where we should start using the buffer.
        length - Length of the packet's data.
        payload - the payload that has been negotiated for telephone events by our signaling modules.
      • DtmfRawPacket

        public DtmfRawPacket​(RawPacket pkt)
        Used for incoming DTMF packets, creating DtmfRawPacket from RTP one.
        Parameters:
        pkt - the RTP packet.
    • Method Detail

      • init

        public void init​(int code,
                         boolean end,
                         boolean marker,
                         int duration,
                         long timestamp,
                         int volume)
        Initializes DTMF specific values in this packet.
        Parameters:
        code - the DTMF code representing the digit.
        end - the DTMF End flag
        marker - the RTP Marker flag
        duration - the DTMF duration
        timestamp - the RTP timestamp
        volume - the DTMF volume
      • getCode

        public int getCode()
        The event code of the current packet.
        Returns:
        the code
      • isEnd

        public boolean isEnd()
        Is this an end packet.
        Returns:
        the end
      • getDuration

        public int getDuration()
        The duration of the current event.
        Returns:
        the duration
      • getVolume

        public int getVolume()
        The volume of the current event.
        Returns:
        the volume