public class RtpMapAttribute extends AttributeField
m=audio 49230 RTP/AVP 96 97 98
a=rtpmap:96 L8/8000
a=rtpmap:97 L16/8000
a=rtpmap:98 L16/11025/2
This attribute maps from an RTP payload type number (as used in an "m=" line)
to an encoding name denoting the payload format to be used.
It also provides information on the clock rate and encoding parameters. It is
a media-level attribute that is not dependent on charset.
Although an RTP profile may make static assignments of payload type numbers
to payload formats, it is more common for that assignment to be done
dynamically using "a=rtpmap:" attributes.
As an example of a static payload type, consider u-law PCM coded
single-channel audio sampled at 8 kHz. This is completely defined in the RTP
Audio/Video profile as payload type 0, so there is no need for an "a=rtpmap:"
attribute, and the media for such a stream sent to UDP port 49232 can be
specified as:
m=audio 49232 RTP/AVP 0
An example of a dynamic payload type is 16-bit linear encoded stereo audio
sampled at 16 kHz.
If we wish to use the dynamic RTP/AVP payload type 98 for this stream,
additional information is required to decode it:
m=audio 49232 RTP/AVP 98
a=rtpmap:98 L16/16000/2
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_TYPE |
static short |
DEFAULT_CODEC_PARAMS |
ATTRIBUTE_SEPARATOR, BEGIN, BEGIN_LENGTH, builder, FIELD_TYPE, key, valueFIELD_SEPARATOR| Constructor and Description |
|---|
RtpMapAttribute() |
RtpMapAttribute(int payloadType,
String codec,
int clockRate,
int codecParams) |
| Modifier and Type | Method and Description |
|---|---|
int |
getClockRate() |
String |
getCodec() |
int |
getCodecParams() |
FormatParameterAttribute |
getParameters() |
int |
getPayloadType() |
void |
setClockRate(int clockRate) |
void |
setCodec(String codec) |
void |
setCodecParams(int codecParams) |
void |
setParameters(FormatParameterAttribute parameters) |
void |
setPayloadType(int payloadType) |
String |
toString() |
getFieldType, getKey, getValuepublic static final String ATTRIBUTE_TYPE
public static final short DEFAULT_CODEC_PARAMS
public RtpMapAttribute()
public RtpMapAttribute(int payloadType,
String codec,
int clockRate,
int codecParams)
public int getPayloadType()
public void setPayloadType(int payloadType)
public String getCodec()
public void setCodec(String codec)
public int getClockRate()
public void setClockRate(int clockRate)
public int getCodecParams()
public void setCodecParams(int codecParams)
public FormatParameterAttribute getParameters()
public void setParameters(FormatParameterAttribute parameters)
public String toString()
toString in class AttributeFieldCopyright © 2017 TeleStax, Inc.. All Rights Reserved.