fm.liveswitch.sdp.rtp.Media Class Reference

An SDP media description with a transport protocol of "RTP/AVP" or "RTP/SAVP". More...

Public Member Functions

 Media (String mediaType, int transportPort, String transportProtocol, int[] rtpPayloadTypeNumbers)
 Initializes a new instance of the fm.liveswitch.sdp.rtp.Media class. More...
 
- Public Member Functions inherited from fm.liveswitch.sdp.Media
String getFormatDescription ()
 Gets the format description. More...
 
String getMediaType ()
 Gets the media type. More...
 
short getNumberOfPorts ()
 Gets the number of ports. More...
 
int getTransportPort ()
 Gets the transport port. More...
 
String getTransportProtocol ()
 Gets the transport protocol. More...
 
 Media ()
 Initializes a new instance of the fm.liveswitch.sdp.Media class. More...
 
 Media (String mediaType, int transportPort, String transportProtocol)
 Initializes a new instance of the fm.liveswitch.sdp.Media class. More...
 
 Media (String mediaType, int transportPort, String transportProtocol, String formatDescription)
 Initializes a new instance of the fm.liveswitch.sdp.Media class. More...
 
void setFormatDescription (String value)
 Sets the format description. More...
 
void setMediaType (String value)
 Sets the media type. More...
 
void setNumberOfPorts (short value)
 Sets the number of ports. More...
 
void setTransportPort (int value)
 Sets the transport port. More...
 
void setTransportProtocol (String value)
 Sets the transport protocol. More...
 
String toString ()
 Converts this instance to a string. More...
 

Static Public Member Functions

static String generateRtpProfile (fm.liveswitch.StreamType type, boolean rtcpFeedbackSupported, boolean useDtls, boolean useEncryption)
 Generates Rtp Prfile for a given combination of stream type, whjether or not RTCP-based feedback is supported, whether (D)TLS is in use and whether encryption is in use in general. More...
 
static int[] getPayloadTypes (String formatDesciption)
 Gets the payload types. More...
 
static String getRtpAvpfTransportProtocol ()
 Gets the protocol keyword for the extended RTP audio/video profile. More...
 
static String getRtpAvpTransportProtocol ()
 Gets the protocol keyword for the RTP audio/video profile. More...
 
static String getRtpSavpfTransportProtocol ()
 Gets the protocol keyword for the extended Secure RTP audio/video profile. More...
 
static String getRtpSavpTransportProtocol ()
 Gets the protocol keyword for the Secure RTP audio/video profile. More...
 
static String getUdpTlsRtpSavpfTransportProtocol ()
 Gets the protocol keyword for the extended Secure RTP audio/video profile with DTLS key exchange. More...
 
static String getUdpTlsRtpSavpTransportProtocol ()
 Gets the protocol keyword for the Secure RTP audio/video profile with DTLS key exchange. More...
 
static int getWellKnownPayloadClockRate (int payloadType)
 Returns the clockrate of a well-known payload type. More...
 
static String getWellKnownPayloadName (int payloadType)
 Returns the name of a well-known payload type. More...
 
static boolean supportsEncryption (String protocol)
 Returns a value indicating whther a given protocol supports encryption. More...
 
static boolean supportsRtcpBasedFeedback (String protocol)
 Returns a value indicating whther a given protocol supports encryption. More...
 
- Static Public Member Functions inherited from fm.liveswitch.sdp.Media
static fm.liveswitch.sdp.Media parse (String s)
 Creates an fm.liveswitch.sdp.Media instance from a string. More...
 

Detailed Description

An SDP media description with a transport protocol of "RTP/AVP" or "RTP/SAVP".

Constructor & Destructor Documentation

◆ Media()

fm.liveswitch.sdp.rtp.Media.Media ( String  mediaType,
int  transportPort,
String  transportProtocol,
int[]  rtpPayloadTypeNumbers 
)

Initializes a new instance of the fm.liveswitch.sdp.rtp.Media class.

Parameters
mediaTypeThe media type. See fm.liveswitch.sdp.MediaType for possible values.
transportPortThe transport port.
transportProtocolThe transport protocol.
rtpPayloadTypeNumbersThe RTP payload type numbers.

Member Function Documentation

◆ generateRtpProfile()

static String fm.liveswitch.sdp.rtp.Media.generateRtpProfile ( fm.liveswitch.StreamType  type,
boolean  rtcpFeedbackSupported,
boolean  useDtls,
boolean  useEncryption 
)
static

Generates Rtp Prfile for a given combination of stream type, whjether or not RTCP-based feedback is supported, whether (D)TLS is in use and whether encryption is in use in general.

Parameters
typeStream type.
rtcpFeedbackSupportedIndicates whether Rtcp-based feedback is supported.
useDtlsIndicates whether (D)TLS is in use.
useEncryptionIndicates whether encryption is in use.

◆ getPayloadTypes()

static int [] fm.liveswitch.sdp.rtp.Media.getPayloadTypes ( String  formatDesciption)
static

Gets the payload types.

Parameters
formatDesciptionThe media format desciption.

◆ getRtpAvpfTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getRtpAvpfTransportProtocol ( )
static

Gets the protocol keyword for the extended RTP audio/video profile.

◆ getRtpAvpTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getRtpAvpTransportProtocol ( )
static

Gets the protocol keyword for the RTP audio/video profile.

◆ getRtpSavpfTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getRtpSavpfTransportProtocol ( )
static

Gets the protocol keyword for the extended Secure RTP audio/video profile.

◆ getRtpSavpTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getRtpSavpTransportProtocol ( )
static

Gets the protocol keyword for the Secure RTP audio/video profile.

◆ getUdpTlsRtpSavpfTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getUdpTlsRtpSavpfTransportProtocol ( )
static

Gets the protocol keyword for the extended Secure RTP audio/video profile with DTLS key exchange.

◆ getUdpTlsRtpSavpTransportProtocol()

static String fm.liveswitch.sdp.rtp.Media.getUdpTlsRtpSavpTransportProtocol ( )
static

Gets the protocol keyword for the Secure RTP audio/video profile with DTLS key exchange.

◆ getWellKnownPayloadClockRate()

static int fm.liveswitch.sdp.rtp.Media.getWellKnownPayloadClockRate ( int  payloadType)
static

Returns the clockrate of a well-known payload type.

Parameters
payloadTypeThe well-known payload type to get the clockrate of.

◆ getWellKnownPayloadName()

static String fm.liveswitch.sdp.rtp.Media.getWellKnownPayloadName ( int  payloadType)
static

Returns the name of a well-known payload type.

Parameters
payloadTypeThe well-known payload type to get the name of.

◆ supportsEncryption()

static boolean fm.liveswitch.sdp.rtp.Media.supportsEncryption ( String  protocol)
static

Returns a value indicating whther a given protocol supports encryption.

Parameters
protocolProtocol keyword.
Returns
Value indicating whther a given protocol supports encryption.

◆ supportsRtcpBasedFeedback()

static boolean fm.liveswitch.sdp.rtp.Media.supportsRtcpBasedFeedback ( String  protocol)
static

Returns a value indicating whther a given protocol supports encryption.

Parameters
protocolProtocol keyword.
Returns
Value indicating whther a given protocol supports encryption.