Class RtpPayloadFormat

  • @Deprecated
    public final class RtpPayloadFormat
    extends Object
    Deprecated. 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)
        Creates a new instance.
        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)
        Gets the MIME type that is associated with the RTP media type.

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

        IllegalArgumentException - When the media type is not supported/recognized.
      • getRawPcmEncodingType

        public static int getRawPcmEncodingType​(String mediaEncoding)
        Returns the PCM encoding type for mediaEncoding.
      • equals

        public boolean equals​(@Nullable
                              Object o)
        equals in class Object
      • hashCode

        public int hashCode()
        hashCode in class Object