Back to Exoplayer

RtpPayloadFormat (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/rtsp/RtpPayloadFormat.html

latest13.7 KB
Original Source

Package com.google.android.exoplayer2.source.rtsp

Class RtpPayloadFormat


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classRtpPayloadFormatextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

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.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | int | clockRate | Deprecated.

The clock rate in Hertz, associated with the format. | | ImmutableMap<String,​String> | fmtpParameters | Deprecated.

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

The Format of this RTP payload. | | String | mediaEncoding | Deprecated.

The RTP media encoding. | | static String | RTP_MEDIA_AC3 | Deprecated. | | static String | RTP_MEDIA_AMR | Deprecated. | | static String | RTP_MEDIA_AMR_WB | Deprecated. | | static String | RTP_MEDIA_H263_1998 | Deprecated. | | static String | RTP_MEDIA_H263_2000 | Deprecated. | | static String | RTP_MEDIA_H264 | Deprecated. | | static String | RTP_MEDIA_H265 | Deprecated. | | static String | RTP_MEDIA_MPEG4_GENERIC | Deprecated. | | static String | RTP_MEDIA_MPEG4_LATM_AUDIO | Deprecated. | | static String | RTP_MEDIA_MPEG4_VIDEO | Deprecated. | | static String | RTP_MEDIA_OPUS | Deprecated. | | static String | RTP_MEDIA_PCM_L16 | Deprecated. | | static String | RTP_MEDIA_PCM_L8 | Deprecated. | | static String | RTP_MEDIA_PCMA | Deprecated. | | static String | RTP_MEDIA_PCMU | Deprecated. | | static String | RTP_MEDIA_VP8 | Deprecated. | | static String | RTP_MEDIA_VP9 | Deprecated. | | int | rtpPayloadType | Deprecated.

The payload type associated with this format. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | RtpPayloadFormat​(Format format, int rtpPayloadType, int clockRate, Map<String,​String> fmtpParameters, String mediaEncoding) | Deprecated.

Creates a new instance. |

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | equals​(Object o) | Deprecated. | | static String | getMimeTypeFromRtpMediaType​(String mediaType) | Deprecated.

Gets the MIME type that is associated with the RTP media type. | | static @com.google.android.exoplayer2.C.PcmEncoding int | getRawPcmEncodingType​(String mediaEncoding) | Deprecated.

Returns the PCM encoding type for mediaEncoding. | | int | hashCode() | Deprecated. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

RTP_MEDIA_AC3

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_AC3

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_AMR

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_AMR

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_AMR_WB

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_AMR_WB

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_MPEG4_GENERIC

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_MPEG4_GENERIC

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_MPEG4_LATM_AUDIO

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_MPEG4_LATM_AUDIO

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_MPEG4_VIDEO

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_MPEG4_VIDEO

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_H263_1998

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_H263_1998

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_H263_2000

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_H263_2000

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_H264

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_H264

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_H265

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_H265

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_OPUS

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_OPUS

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_PCM_L8

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_PCM_L8

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_PCM_L16

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_PCM_L16

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_PCMA

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_PCMA

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_PCMU

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_PCMU

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_VP8

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_VP8

Deprecated. See Also:Constant Field Values

- 

RTP_MEDIA_VP9

public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")RTP_MEDIA_VP9

Deprecated. See Also:Constant Field Values

- 

rtpPayloadType

public final int rtpPayloadType

Deprecated.

The payload type associated with this format.

- 

clockRate

public final int clockRate

Deprecated.

The clock rate in Hertz, associated with the format.

- 

format

public final[Format](../../Format.html "class in com.google.android.exoplayer2")format

Deprecated.

The Format of this RTP payload.

- 

fmtpParameters

public final[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang"),​[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> fmtpParameters

Deprecated.

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

- 

mediaEncoding

public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mediaEncoding

Deprecated.

The RTP media encoding.

Constructor Detail

- 

RtpPayloadFormat

public RtpPayloadFormat​([Format](../../Format.html "class in com.google.android.exoplayer2")format,
                        int rtpPayloadType,
                        int clockRate,[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> fmtpParameters,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mediaEncoding)

Deprecated.

Creates a new instance. Parameters:format - The associated media format.rtpPayloadType - The assigned RTP payload type, from the RTPMAP attribute in MediaDescription.clockRate - The associated clock rate in hertz.fmtpParameters - 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 - The RTP media encoding.

Method Detail

- 

getMimeTypeFromRtpMediaType

public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getMimeTypeFromRtpMediaType​([String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")mediaType)

Deprecated.

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

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

Throws:IllegalArgumentException - When the media type is not supported/recognized.

- 

getRawPcmEncodingType

public static @com.google.android.exoplayer2.C.PcmEncoding int getRawPcmEncodingType​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mediaEncoding)

Deprecated.

Returns the PCM encoding type for mediaEncoding.

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)

Deprecated. Overrides:equals in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object