|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.media.DynamicPayloadTypeRegistry
public class DynamicPayloadTypeRegistry
The RTP Audio/Video Profile [RFC 3551] specifies a number of static payload types for use with RTP and reserves the 96-127 field for use with dynamic payload types.
Mappings of dynamic payload types are handled with SDP. They are created for a particular session and remain the same for its entire lifetime. They may however change in following sessions.
We use this class as a utility for easily creating and tracking dynamic payload mappings for the lifetime of a particular session. One instance of this registry is supposed to be mapped to one media session. They should have pretty much the same life cycle.
| Constructor Summary | |
|---|---|
DynamicPayloadTypeRegistry()
|
|
| Method Summary | |
|---|---|
void |
addMapping(MediaFormat format,
byte payloadType)
Adds the specified format to payloadType mapping to the list of mappings known to this registry. |
MediaFormat |
findFormat(byte payloadType)
Returns a reference to the MediaFormat with the specified mapping or null if the number specified by payloadType has not been allocated yet. |
Map<MediaFormat,Byte> |
getMappings()
Returns a copy of all mappings currently registered in this registry. |
byte |
obtainPayloadTypeNumber(MediaFormat format)
Returns the dynamic payload type that has been allocated for format. |
void |
setOverridePayloadTypeMappings(Map<Byte,String> mappings)
Sets the override payload type numbers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicPayloadTypeRegistry()
| Method Detail |
|---|
public void setOverridePayloadTypeMappings(Map<Byte,String> mappings)
mappings - the override payload-type mappings.
public byte obtainPayloadTypeNumber(MediaFormat format)
throws IllegalStateException
format - the MediaFormat instance that we'd like to obtain
a payload type number for.
IllegalStateException - if we have already registered more dynamic
formats than allowed for by RTP.
public void addMapping(MediaFormat format,
byte payloadType)
throws IllegalArgumentException
payloadType - the payload type number that we'd like to allocated
to format.format - the MediaFormat that we'd like to create a
dynamic mapping for.
IllegalArgumentException - in case payloadType has
already been assigned to another format.public MediaFormat findFormat(byte payloadType)
payloadType - the number of the payload type that we are trying to
get a format for.
public Map<MediaFormat,Byte> getMappings()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||