|
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.DynamicRTPExtensionsRegistry
public class DynamicRTPExtensionsRegistry
RFC [RFC 5285] defines a mechanism for attaching multiple extensions to RTP packets. Part of this mechanism consists in negotiating their identifiers using extmap attributes pretty much the same way one would negotiate payload types with rtpmap attributes.
Mappings of extension IDs 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 extension mappings for the lifetime of a particular session. One instance of this registry is supposed to be mapped to one media session and they should have the same life cycle.
| Field Summary | |
|---|---|
static int |
MAX_ONE_BYTE_HEADER_ID
The maximum integer that is allowed for use when mapping extensions using the one-byte header. |
static int |
MAX_TWO_BYTE_HEADER_ID
The maximum integer that is allowed for use when mapping extensions using the two-byte header. |
static int |
MIN_HEADER_ID
The minimum integer that is allowed for use when mapping extensions using the one-byte header. |
| Constructor Summary | |
|---|---|
DynamicRTPExtensionsRegistry()
|
|
| Method Summary | |
|---|---|
void |
addMapping(RTPExtension extension,
byte extID)
Adds the specified extension to extID mapping to the list of mappings known to this registry. |
RTPExtension |
findExtension(byte extID)
Returns a reference to the RTPExtension with the specified mapping or null if the number specified by extID has not been allocated yet. |
byte |
getExtensionMapping(RTPExtension extension)
Returns the ID that has been allocated for extension or -1 if no extension exists. |
Map<RTPExtension,Byte> |
getMappings()
Returns a copy of all mappings currently registered in this registry. |
byte |
obtainExtensionMapping(RTPExtension extension)
Returns the ID that has been allocated for extension. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_HEADER_ID
public static final int MAX_ONE_BYTE_HEADER_ID
public static final int MAX_TWO_BYTE_HEADER_ID
| Constructor Detail |
|---|
public DynamicRTPExtensionsRegistry()
| Method Detail |
|---|
public byte obtainExtensionMapping(RTPExtension extension)
throws IllegalStateException
extension - the RTPExtension instance that we'd like to
obtain a dynamic ID for.
IllegalStateException - if we have already registered more RTP
extensions than allowed for by RTP.public byte getExtensionMapping(RTPExtension extension)
extension - the RTPExtension instance whose ID we'd like to
find.
public void addMapping(RTPExtension extension,
byte extID)
throws IllegalArgumentException
extID - the extension ID that we'd like to allocated to
extension.extension - the RTPExtension that we'd like to create a
dynamic mapping for.
IllegalArgumentException - in case extID has already been
assigned to another RTPExtension.public RTPExtension findExtension(byte extID)
extID - the ID whose RTPExtension we are trying to
discover.
public Map<RTPExtension,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 | |||||||||