Class RtpPayloadFormat


  • @Deprecated
    public final class RtpPayloadFormat
    extends Object
    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.

    • Constructor Detail

      • RtpPayloadFormat

        public RtpPayloadFormat​(Format format,
                                int rtpPayloadType,
                                int clockRate,
                                Map<String,​String> fmtpParameters,
                                String 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 getMimeTypeFromRtpMediaType​(String 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 mediaEncoding)
        Deprecated.
        Returns the PCM encoding type for mediaEncoding.
      • equals

        public boolean equals​(@Nullable
                              Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object