RtpPayloadFormat
@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! |
RTP_MEDIA_AC3 = "AC3" |
const String! |
RTP_MEDIA_AMR = "AMR" |
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! |
RTP_MEDIA_H264 = "H264" |
const String! |
RTP_MEDIA_H265 = "H265" |
const String! |
RTP_MEDIA_MPEG4_GENERIC = "MPEG4-GENERIC" |
const String! |
RTP_MEDIA_MPEG4_LATM_AUDIO = "MP4A-LATM" |
const String! |
RTP_MEDIA_MPEG4_VIDEO = "MP4V-ES" |
const String! |
RTP_MEDIA_OPUS = "OPUS" |
const String! |
RTP_MEDIA_PCMA = "PCMA" |
const String! |
RTP_MEDIA_PCMU = "PCMU" |
const String! |
RTP_MEDIA_PCM_L16 = "L16" |
const String! |
RTP_MEDIA_PCM_L8 = "L8" |
const String! |
RTP_MEDIA_VP8 = "VP8" |
const String! |
RTP_MEDIA_VP9 = "VP9" |
Public constructors |
|---|
RtpPayloadFormat(Creates a new instance. |
Public functions |
|
|---|---|
Boolean |
|
java-static String! |
getMimeTypeFromRtpMediaType(mediaType: String!)Gets the MIME type that is associated with the RTP media type. |
java-static Int |
@C.PcmEncodingReturns the PCM encoding type for |
Int |
hashCode() |
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 |
String! |
The RTP media encoding. |
Int |
The payload type associated with this format. |
Constants
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 |
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
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.
Public properties
fmtpParameters
val fmtpParameters: ImmutableMap<String!, String!>!
The format parameters, mapped from the SDP FMTP attribute (RFC2327 Page 22).