Package org.jitsi.service.neomedia
Class RTPExtension
- java.lang.Object
-
- org.jitsi.service.neomedia.RTPExtension
-
public class RTPExtension extends Object
RTP extensions are defined by RFC 5285 and they allow attaching additional information to some or all RTP packets of an RTP stream. This class describes RTP extensions in a way that makes them convenient for use in SDP generation/parsing.- Author:
- Emil Ivov
-
-
Field Summary
Fields Modifier and Type Field Description static StringABS_SEND_TIME_URNThe URN identifying the abs-send-time RTP extension.static StringCSRC_AUDIO_LEVEL_URNThe URN identifying the RTP extension that allows mixers to send to conference participants the audio levels of all contributing sources.static StringFRAME_MARKING_URNThe URN which identifies the framemarking RTP extension defined at draft-ietf-avtext-framemarking-03static StringORIGINAL_HEADER_BLOCK_URNThe URN which identifies the Original Header Block RTP extension defined in draft-ietf-perc-double-02.static StringRTP_STREAM_ID_URNThe URN which identifies the rtp-stream-id extensions in draft-ietf-mmusic-rid-10.static StringSSRC_AUDIO_LEVEL_URNThe URN identifying the RTP extension that allows clients to send to conference mixers the audio level of their packet payload.static StringTOF_URNThe URN which identifies the transmission time-offset extensions in rfc5450.static StringTRANSPORT_CC_URNThe URN which identifies the Transport-Wide Congestion Control RTP extension.static StringVIDEO_CONTENT_TYPE_URNThe URN which identifies the RTP Header Extension for Video Content Type.
-
Constructor Summary
Constructors Constructor Description RTPExtension(URI extensionURI)Creates an RTPExtension instance for the specified extensionURI using a default SENDRECV direction and no extension attributes.RTPExtension(URI extensionURI, String extensionAttributes)Creates an RTPExtension instance for the specified extensionURI using a default SENDRECV direction and extensionAttributes.RTPExtension(URI extensionURI, MediaDirection direction)Creates an RTPExtension instance for the specified extensionURI and direction.RTPExtension(URI extensionURI, MediaDirection direction, String extensionAttributes)Creates an RTPExtension instance for the specified extensionURI and direction and sets the specified extensionAttributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Returns true if and only if o is an instance of RTPExtension and o's URI is equal to this extension's URI.MediaDirectiongetDirection()Returns the direction that the corresponding MediaDevice supports for this extension.StringgetExtensionAttributes()Returns the extension attributes associated with this RTPExtension or null if this extension does not have any.URIgetURI()Returns the URI that identifies the format and meaning of this extension.inthashCode()Returns the hash code of this extension instance which is actually the hash code of the URI that this extension is encapsulating.StringtoString()Returns a String representation of this RTPExtension's URI.
-
-
-
Field Detail
-
CSRC_AUDIO_LEVEL_URN
public static final String CSRC_AUDIO_LEVEL_URN
The URN identifying the RTP extension that allows mixers to send to conference participants the audio levels of all contributing sources. Defined in RFC6465.- See Also:
- Constant Field Values
-
SSRC_AUDIO_LEVEL_URN
public static final String SSRC_AUDIO_LEVEL_URN
The URN identifying the RTP extension that allows clients to send to conference mixers the audio level of their packet payload. Defined in RFC6464.- See Also:
- Constant Field Values
-
ABS_SEND_TIME_URN
public static final String ABS_SEND_TIME_URN
The URN identifying the abs-send-time RTP extension. Defined at abs-send-time- See Also:
- Constant Field Values
-
FRAME_MARKING_URN
public static final String FRAME_MARKING_URN
The URN which identifies the framemarking RTP extension defined at draft-ietf-avtext-framemarking-03- See Also:
- Constant Field Values
-
ORIGINAL_HEADER_BLOCK_URN
public static final String ORIGINAL_HEADER_BLOCK_URN
The URN which identifies the Original Header Block RTP extension defined in draft-ietf-perc-double-02.- See Also:
- Constant Field Values
-
TRANSPORT_CC_URN
public static final String TRANSPORT_CC_URN
The URN which identifies the Transport-Wide Congestion Control RTP extension.- See Also:
- Constant Field Values
-
RTP_STREAM_ID_URN
public static final String RTP_STREAM_ID_URN
The URN which identifies the rtp-stream-id extensions in draft-ietf-mmusic-rid-10.- See Also:
- Constant Field Values
-
TOF_URN
public static final String TOF_URN
The URN which identifies the transmission time-offset extensions in rfc5450.- See Also:
- Constant Field Values
-
VIDEO_CONTENT_TYPE_URN
public static final String VIDEO_CONTENT_TYPE_URN
The URN which identifies the RTP Header Extension for Video Content Type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RTPExtension
public RTPExtension(URI extensionURI)
Creates an RTPExtension instance for the specified extensionURI using a default SENDRECV direction and no extension attributes.- Parameters:
extensionURI- the URI (possibly a URN) of the RTP extension that we'd like to create.
-
RTPExtension
public RTPExtension(URI extensionURI, MediaDirection direction)
Creates an RTPExtension instance for the specified extensionURI and direction.- Parameters:
extensionURI- the URI (possibly a URN) of the RTP extension that we'd like to create.direction- a MediaDirection instance indication how this extension will be transmitted.
-
RTPExtension
public RTPExtension(URI extensionURI, String extensionAttributes)
Creates an RTPExtension instance for the specified extensionURI using a default SENDRECV direction and extensionAttributes.- Parameters:
extensionURI- the URI (possibly a URN) of the RTP extension that we'd like to create.extensionAttributes- any attributes that we'd like to add to this extension.
-
RTPExtension
public RTPExtension(URI extensionURI, MediaDirection direction, String extensionAttributes)
Creates an RTPExtension instance for the specified extensionURI and direction and sets the specified extensionAttributes.- Parameters:
extensionURI- the URI (possibly a URN) of the RTP extension that we'd like to create.direction- a MediaDirection instance indication how this extension will be transmitted.extensionAttributes- any attributes that we'd like to add to this extension.
-
-
Method Detail
-
getDirection
public MediaDirection getDirection()
Returns the direction that the corresponding MediaDevice supports for this extension. By default RTP extension headers inherit the direction of a stream. When explicitly specified SENDONLY direction indicates an ability to attach the extension in outgoing RTP packets; a RECVONLY direction indicates a desire to receive the extension in incoming packets; a SENDRECV direction indicates both. An INACTIVE direction indicates neither, but later re-negotiation may make an extension active.- Returns:
- the direction that the corresponding MediaDevice supports for this extension.
-
getURI
public URI getURI()
Returns the URI that identifies the format and meaning of this extension.- Returns:
- the URI (possibly a URN) that identifies the format and meaning of this extension.
-
getExtensionAttributes
public String getExtensionAttributes()
Returns the extension attributes associated with this RTPExtension or null if this extension does not have any.- Returns:
- A String containing the extension attributes associated with this RTPExtension or null if this extension does not have any.
-
toString
public String toString()
Returns a String representation of this RTPExtension's URI.
-
equals
public boolean equals(Object o)
Returns true if and only if o is an instance of RTPExtension and o's URI is equal to this extension's URI. The method returns false otherwise.
-
hashCode
public int hashCode()
Returns the hash code of this extension instance which is actually the hash code of the URI that this extension is encapsulating.
-
-