Class Rtp.PayloadType

  • Enclosing class:
    Rtp

    public static final class Rtp.PayloadType
    extends Object
    The payload type which specifies an encoding that can be used for the RTP stream.
    • Constructor Detail

      • PayloadType

        public PayloadType​(int id)
        Creates a payload type. The id is the only required attribute.
        Parameters:
        id - The id.
      • PayloadType

        public PayloadType​(int id,
                           int channels,
                           long clockRate,
                           String name,
                           long packetTime,
                           long maxPacketTime)
        Creates a payload type with all possible attributes.
        Parameters:
        id - The id.
        channels - The number of channels.
        clockRate - The sampling frequency in Hertz.
        name - The name.
        packetTime - The packet time.
        maxPacketTime - The maximum packet time.
    • Method Detail

      • getName

        public String getName()
        Gets the appropriate subtype of the MIME type.
        Returns:
        The name.
      • getClockRate

        public long getClockRate()
        Gets the sampling frequency in Hertz.
        Returns:
        The sampling frequency.
      • getChannels

        public int getChannels()
        Gets the number of channels.
        Returns:
        The number of channels.
      • getParameters

        public List<Rtp.PayloadType.Parameter> getParameters()
        Gets the parameters. For example, as described in RFC 5574, the "cng", "mode", and "vbr" parameters can be specified in relation to usage of the Speex codec.
        Returns:
        The parameters.
      • getId

        public int getId()
        Gets the payload identifier.
        Returns:
        The payload identifier.
      • getMaxPacketTime

        public long getMaxPacketTime()
        Gets the maximum packet time as specified in RFC 4566
        Returns:
        The maximum packet time.
      • getPacketTime

        public long getPacketTime()
        Gets the packet time as specified in RFC 4566.
        Returns:
        The packet time.