@UnstableApi
class RtpPayloadFormat


Represents the payload format used in RTP.

In RTSP playback, the format information is always present in the SessionDescription enclosed in the response of a DESCRIBE request. Within each track's MediaDescription, it is the attributes FMTP and RTPMAP that allows us to recreate the media format.

This class wraps around the Format class, in addition to the instance fields that are specific to RTP.

Summary

Constants

const String!
const String!
const String!
RTP_MEDIA_AMR_WB = "AMR-WB"
const String!
RTP_MEDIA_H263_1998 = "H263-1998"
const String!
RTP_MEDIA_H263_2000 = "H263-2000"
const String!
const String!
const String!
RTP_MEDIA_MPEG4_GENERIC = "MPEG4-GENERIC"
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!

Public constructors

RtpPayloadFormat(
    format: Format!,
    rtpPayloadType: Int,
    clockRate: Int,
    fmtpParameters: (Mutable)Map<String!, String!>!,
    mediaEncoding: String!
)

Creates a new instance.

Public functions

Boolean
equals(o: Any?)
java-static String!

Gets the MIME type that is associated with the RTP media type.

java-static Int

Returns the PCM encoding type for mediaEncoding.

Int

Public properties

Int

The clock rate in Hertz, associated with the format.

ImmutableMap<String!, String!>!

The format parameters, mapped from the SDP FMTP attribute (RFC2327 Page 22).

Format!

The Format of this RTP payload.

String!

The RTP media encoding.

Int

The payload type associated with this format.

Constants

RTP_MEDIA_AC3

const val RTP_MEDIA_AC3 = "AC3": String!

RTP_MEDIA_AMR

const val RTP_MEDIA_AMR = "AMR": String!

RTP_MEDIA_AMR_WB

const val RTP_MEDIA_AMR_WB = "AMR-WB": String!

RTP_MEDIA_H263_1998

const val RTP_MEDIA_H263_1998 = "H263-1998": String!

RTP_MEDIA_H263_2000

const val RTP_MEDIA_H263_2000 = "H263-2000": String!

RTP_MEDIA_H264

const val RTP_MEDIA_H264 = "H264": String!

RTP_MEDIA_H265

const val RTP_MEDIA_H265 = "H265": String!

RTP_MEDIA_MPEG4_GENERIC

const val RTP_MEDIA_MPEG4_GENERIC = "MPEG4-GENERIC": String!

RTP_MEDIA_MPEG4_LATM_AUDIO

const val RTP_MEDIA_MPEG4_LATM_AUDIO = "MP4A-LATM": String!

RTP_MEDIA_MPEG4_VIDEO

const val RTP_MEDIA_MPEG4_VIDEO = "MP4V-ES": String!

RTP_MEDIA_OPUS

const val RTP_MEDIA_OPUS = "OPUS": String!

RTP_MEDIA_PCMA

const val RTP_MEDIA_PCMA = "PCMA": String!

RTP_MEDIA_PCMU

const val RTP_MEDIA_PCMU = "PCMU": String!

RTP_MEDIA_PCM_L16

const val RTP_MEDIA_PCM_L16 = "L16": String!

RTP_MEDIA_PCM_L8

const val RTP_MEDIA_PCM_L8 = "L8": String!

RTP_MEDIA_VP8

const val RTP_MEDIA_VP8 = "VP8": String!

RTP_MEDIA_VP9

const val RTP_MEDIA_VP9 = "VP9": String!

Public constructors

RtpPayloadFormat

RtpPayloadFormat(
    format: Format!,
    rtpPayloadType: Int,
    clockRate: Int,
    fmtpParameters: (Mutable)Map<String!, String!>!,
    mediaEncoding: String!
)

Creates a new instance.

Parameters
format: Format!

The associated media format.

rtpPayloadType: Int

The assigned RTP payload type, from the RTPMAP attribute in .

clockRate: Int

The associated clock rate in hertz.

fmtpParameters: (Mutable)Map<String!, String!>!

The format parameters, from the SDP FMTP attribute (RFC2327 Page 22), empty if unset. The keys and values are specified in the RFCs for specific formats. For instance, RFC3640 Section 4.1 defines keys like profile-level-id and config.

mediaEncoding: String!

The RTP media encoding.

Public functions

equals

fun equals(o: Any?): Boolean

getMimeTypeFromRtpMediaType

java-static fun getMimeTypeFromRtpMediaType(mediaType: String!): String!

Gets the MIME type that is associated with the RTP media type.

For instance, RTP media type "H264" maps to VIDEO_H264.

Throws
java.lang.IllegalArgumentException

When the media type is not supported/recognized.

getRawPcmEncodingType

@C.PcmEncoding
java-static fun getRawPcmEncodingType(mediaEncoding: String!): Int

Returns the PCM encoding type for mediaEncoding.

hashCode

fun hashCode(): Int

Public properties

clockRate

val clockRateInt

The clock rate in Hertz, associated with the format.

fmtpParameters

val fmtpParametersImmutableMap<String!, String!>!

The format parameters, mapped from the SDP FMTP attribute (RFC2327 Page 22).

format

val formatFormat!

The Format of this RTP payload.

mediaEncoding

val mediaEncodingString!

The RTP media encoding.

rtpPayloadType

val rtpPayloadTypeInt

The payload type associated with this format.