public static final class Rtp.PayloadType
extends java.lang.Object
The payload type which specifies an encoding that can be used for the RTP stream.
Modifier and Type | Class and Description |
---|---|
static class |
Rtp.PayloadType.Parameter
The parameter for a payload.
|
Constructor and Description |
---|
PayloadType(int id)
Creates a payload type.
|
PayloadType(int id,
int channels,
long clockRate,
java.lang.String name,
long packetTime,
long maxPacketTime)
Creates a payload type with all possible attributes.
|
Modifier and Type | Method and Description |
---|---|
int |
getChannels()
Gets the number of channels.
|
long |
getClockRate()
Gets the sampling frequency in Hertz.
|
int |
getId()
Gets the payload identifier.
|
long |
getMaxPacketTime()
Gets the maximum packet time as specified in RFC 4566
|
java.lang.String |
getName()
Gets the appropriate subtype of the MIME type.
|
long |
getPacketTime()
Gets the packet time as specified in RFC 4566.
|
java.util.List<Rtp.PayloadType.Parameter> |
getParameters()
Gets the parameters.
|
public PayloadType(int id)
Creates a payload type. The id is the only required attribute.
id
- The id.public PayloadType(int id, int channels, long clockRate, java.lang.String name, long packetTime, long maxPacketTime)
Creates a payload type with all possible attributes.
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.public java.lang.String getName()
Gets the appropriate subtype of the MIME type.
public long getClockRate()
Gets the sampling frequency in Hertz.
public int getChannels()
Gets the number of channels.
public java.util.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.
public int getId()
Gets the payload identifier.
public long getMaxPacketTime()
Gets the maximum packet time as specified in RFC 4566
public long getPacketTime()
Gets the packet time as specified in RFC 4566.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.