Class MimeTypes
- java.lang.Object
-
- com.google.android.exoplayer2.util.MimeTypes
-
@Deprecated public final class MimeTypes 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.Defines common MIME types and helper methods.
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION_AIT
Deprecated.static String
APPLICATION_CAMERA_MOTION
Deprecated.static String
APPLICATION_CEA608
Deprecated.static String
APPLICATION_CEA708
Deprecated.static String
APPLICATION_DVBSUBS
Deprecated.static String
APPLICATION_EMSG
Deprecated.static String
APPLICATION_EXIF
Deprecated.static String
APPLICATION_ICY
Deprecated.static String
APPLICATION_ID3
Deprecated.static String
APPLICATION_M3U8
Deprecated.static String
APPLICATION_MATROSKA
Deprecated.static String
APPLICATION_MP4
Deprecated.static String
APPLICATION_MP4CEA608
Deprecated.static String
APPLICATION_MP4VTT
Deprecated.static String
APPLICATION_MPD
Deprecated.static String
APPLICATION_PGS
Deprecated.static String
APPLICATION_RAWCC
Deprecated.RawCC is a Google-internal subtitle format that isn't supported by this version of Media3.static String
APPLICATION_RTSP
Deprecated.static String
APPLICATION_SCTE35
Deprecated.static String
APPLICATION_SS
Deprecated.static String
APPLICATION_SUBRIP
Deprecated.static String
APPLICATION_TTML
Deprecated.static String
APPLICATION_TX3G
Deprecated.static String
APPLICATION_VOBSUB
Deprecated.static String
APPLICATION_WEBM
Deprecated.static String
AUDIO_AAC
Deprecated.static String
AUDIO_AC3
Deprecated.static String
AUDIO_AC4
Deprecated.static String
AUDIO_ALAC
Deprecated.static String
AUDIO_ALAW
Deprecated.static String
AUDIO_AMR
Deprecated.static String
AUDIO_AMR_NB
Deprecated.static String
AUDIO_AMR_WB
Deprecated.static String
AUDIO_DTS
Deprecated.static String
AUDIO_DTS_EXPRESS
Deprecated.static String
AUDIO_DTS_HD
Deprecated.static String
AUDIO_DTS_X
Deprecated.static String
AUDIO_E_AC3
Deprecated.static String
AUDIO_E_AC3_JOC
Deprecated.static String
AUDIO_EXOPLAYER_MIDI
Deprecated.static String
AUDIO_FLAC
Deprecated.static String
AUDIO_MATROSKA
Deprecated.static String
AUDIO_MIDI
Deprecated.static String
AUDIO_MLAW
Deprecated.static String
AUDIO_MP4
Deprecated.static String
AUDIO_MPEG
Deprecated.static String
AUDIO_MPEG_L1
Deprecated.static String
AUDIO_MPEG_L2
Deprecated.static String
AUDIO_MPEGH_MHA1
Deprecated.static String
AUDIO_MPEGH_MHM1
Deprecated.static String
AUDIO_MSGSM
Deprecated.static String
AUDIO_OGG
Deprecated.static String
AUDIO_OPUS
Deprecated.static String
AUDIO_RAW
Deprecated.static String
AUDIO_TRUEHD
Deprecated.static String
AUDIO_UNKNOWN
Deprecated.static String
AUDIO_VORBIS
Deprecated.static String
AUDIO_WAV
Deprecated.static String
AUDIO_WEBM
Deprecated.static String
BASE_TYPE_APPLICATION
Deprecated.static String
BASE_TYPE_AUDIO
Deprecated.static String
BASE_TYPE_IMAGE
Deprecated.static String
BASE_TYPE_TEXT
Deprecated.static String
BASE_TYPE_VIDEO
Deprecated.static String
CODEC_E_AC3_JOC
Deprecated.A non-standard codec string for E-AC3-JOC.static String
IMAGE_HEIC
Deprecated.static String
IMAGE_HEIF
Deprecated.static String
IMAGE_JPEG
Deprecated.static String
IMAGE_PNG
Deprecated.static String
IMAGE_WEBP
Deprecated.static String
TEXT_EXOPLAYER_CUES
Deprecated.static String
TEXT_SSA
Deprecated.static String
TEXT_UNKNOWN
Deprecated.static String
TEXT_VTT
Deprecated.static String
VIDEO_AV1
Deprecated.static String
VIDEO_AVI
Deprecated.static String
VIDEO_DIVX
Deprecated.static String
VIDEO_DOLBY_VISION
Deprecated.static String
VIDEO_FLV
Deprecated.static String
VIDEO_H263
Deprecated.static String
VIDEO_H264
Deprecated.static String
VIDEO_H265
Deprecated.static String
VIDEO_MATROSKA
Deprecated.static String
VIDEO_MJPEG
Deprecated.static String
VIDEO_MP2T
Deprecated.static String
VIDEO_MP4
Deprecated.static String
VIDEO_MP42
Deprecated.static String
VIDEO_MP43
Deprecated.static String
VIDEO_MP4V
Deprecated.static String
VIDEO_MPEG
Deprecated.static String
VIDEO_MPEG2
Deprecated.static String
VIDEO_OGG
Deprecated.static String
VIDEO_PS
Deprecated.static String
VIDEO_RAW
Deprecated.static String
VIDEO_UNKNOWN
Deprecated.static String
VIDEO_VC1
Deprecated.static String
VIDEO_VP8
Deprecated.static String
VIDEO_VP9
Deprecated.static String
VIDEO_WEBM
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
allSamplesAreSyncSamples(String mimeType, String codec)
Deprecated.Returns true if it is known that all samples in a stream of the given MIME type and codec are guaranteed to be sync samples (i.e.,C.BUFFER_FLAG_KEY_FRAME
is guaranteed to be set on every sample).static boolean
containsCodecsCorrespondingToMimeType(String codecs, String mimeType)
Deprecated.Returns whether the givencodecs
string contains a codec which corresponds to the givenmimeType
.static String
getAudioMediaMimeType(String codecs)
Deprecated.Returns the first audio MIME type derived from an RFC 6381 codecs string.static String
getCodecsCorrespondingToMimeType(String codecs, String mimeType)
Deprecated.Returns a subsequence ofcodecs
containing the codec strings that correspond to the givenmimeType
.static @com.google.android.exoplayer2.C.Encoding int
getEncoding(String mimeType, String codec)
Deprecated.Returns theC.Encoding
constant corresponding to the specified audio MIME type and RFC 6381 codec string, orC.ENCODING_INVALID
if the correspondingC.Encoding
cannot be determined.static String
getMediaMimeType(String codec)
Deprecated.Returns the MIME type corresponding to an RFC 6381 codec string, ornull
if it could not be determined.static String
getMimeTypeFromMp4ObjectType(int objectType)
Deprecated.Returns the MIME type corresponding to an MP4 object type identifier, as defined in RFC 6381 and https://mp4ra.org/#/object_types.static String
getTextMediaMimeType(String codecs)
Deprecated.Returns the first text MIME type derived from an RFC 6381 codecs string.static @com.google.android.exoplayer2.C.TrackType int
getTrackType(String mimeType)
Deprecated.Returns thetrack type
constant corresponding to a specified MIME type, which may beC.TRACK_TYPE_UNKNOWN
if it could not be determined.static @com.google.android.exoplayer2.C.TrackType int
getTrackTypeOfCodec(String codec)
Deprecated.Equivalent togetTrackType(getMediaMimeType(codec))
.static String
getVideoMediaMimeType(String codecs)
Deprecated.Returns the first video MIME type derived from an RFC 6381 codecs string.static boolean
isAudio(String mimeType)
Deprecated.Returns whether the given string is an audio MIME type.static boolean
isImage(String mimeType)
Deprecated.Returns whether the given string is an image MIME type.static boolean
isMatroska(String mimeType)
Deprecated.Returns whether the givenmimeType
is a Matroska MIME type, including WebM.static boolean
isText(String mimeType)
Deprecated.Returns whether the given string is a text MIME type, including known text types that use "application" as their base type.static boolean
isVideo(String mimeType)
Deprecated.Returns whether the given string is a video MIME type.static String
normalizeMimeType(String mimeType)
Deprecated.Normalizes the MIME type provided so that equivalent MIME types are uniquely represented.static void
registerCustomMimeType(String mimeType, String codecPrefix, @com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Registers a custom MIME type.
-
-
-
Field Detail
-
BASE_TYPE_VIDEO
public static final String BASE_TYPE_VIDEO
Deprecated.- See Also:
- Constant Field Values
-
BASE_TYPE_AUDIO
public static final String BASE_TYPE_AUDIO
Deprecated.- See Also:
- Constant Field Values
-
BASE_TYPE_TEXT
public static final String BASE_TYPE_TEXT
Deprecated.- See Also:
- Constant Field Values
-
BASE_TYPE_IMAGE
public static final String BASE_TYPE_IMAGE
Deprecated.- See Also:
- Constant Field Values
-
BASE_TYPE_APPLICATION
public static final String BASE_TYPE_APPLICATION
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MP4
public static final String VIDEO_MP4
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MATROSKA
public static final String VIDEO_MATROSKA
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_WEBM
public static final String VIDEO_WEBM
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_H263
public static final String VIDEO_H263
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_H264
public static final String VIDEO_H264
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_H265
public static final String VIDEO_H265
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_VP8
public static final String VIDEO_VP8
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_VP9
public static final String VIDEO_VP9
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_AV1
public static final String VIDEO_AV1
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MP2T
public static final String VIDEO_MP2T
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MP4V
public static final String VIDEO_MP4V
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MPEG
public static final String VIDEO_MPEG
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_PS
public static final String VIDEO_PS
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MPEG2
public static final String VIDEO_MPEG2
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_VC1
public static final String VIDEO_VC1
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_DIVX
public static final String VIDEO_DIVX
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_FLV
public static final String VIDEO_FLV
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_DOLBY_VISION
public static final String VIDEO_DOLBY_VISION
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_OGG
public static final String VIDEO_OGG
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_AVI
public static final String VIDEO_AVI
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MJPEG
public static final String VIDEO_MJPEG
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MP42
public static final String VIDEO_MP42
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_MP43
public static final String VIDEO_MP43
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_RAW
public static final String VIDEO_RAW
Deprecated.- See Also:
- Constant Field Values
-
VIDEO_UNKNOWN
public static final String VIDEO_UNKNOWN
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MP4
public static final String AUDIO_MP4
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AAC
public static final String AUDIO_AAC
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MATROSKA
public static final String AUDIO_MATROSKA
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_WEBM
public static final String AUDIO_WEBM
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MPEG
public static final String AUDIO_MPEG
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MPEG_L1
public static final String AUDIO_MPEG_L1
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MPEG_L2
public static final String AUDIO_MPEG_L2
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MPEGH_MHA1
public static final String AUDIO_MPEGH_MHA1
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MPEGH_MHM1
public static final String AUDIO_MPEGH_MHM1
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_RAW
public static final String AUDIO_RAW
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_ALAW
public static final String AUDIO_ALAW
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MLAW
public static final String AUDIO_MLAW
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AC3
public static final String AUDIO_AC3
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_E_AC3
public static final String AUDIO_E_AC3
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_E_AC3_JOC
public static final String AUDIO_E_AC3_JOC
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AC4
public static final String AUDIO_AC4
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_TRUEHD
public static final String AUDIO_TRUEHD
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_DTS
public static final String AUDIO_DTS
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_DTS_HD
public static final String AUDIO_DTS_HD
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_DTS_EXPRESS
public static final String AUDIO_DTS_EXPRESS
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_DTS_X
public static final String AUDIO_DTS_X
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_VORBIS
public static final String AUDIO_VORBIS
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_OPUS
public static final String AUDIO_OPUS
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AMR
public static final String AUDIO_AMR
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AMR_NB
public static final String AUDIO_AMR_NB
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_AMR_WB
public static final String AUDIO_AMR_WB
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_FLAC
public static final String AUDIO_FLAC
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_ALAC
public static final String AUDIO_ALAC
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MSGSM
public static final String AUDIO_MSGSM
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_OGG
public static final String AUDIO_OGG
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_WAV
public static final String AUDIO_WAV
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_MIDI
public static final String AUDIO_MIDI
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_EXOPLAYER_MIDI
public static final String AUDIO_EXOPLAYER_MIDI
Deprecated.- See Also:
- Constant Field Values
-
AUDIO_UNKNOWN
public static final String AUDIO_UNKNOWN
Deprecated.- See Also:
- Constant Field Values
-
TEXT_VTT
public static final String TEXT_VTT
Deprecated.- See Also:
- Constant Field Values
-
TEXT_SSA
public static final String TEXT_SSA
Deprecated.- See Also:
- Constant Field Values
-
TEXT_EXOPLAYER_CUES
public static final String TEXT_EXOPLAYER_CUES
Deprecated.- See Also:
- Constant Field Values
-
TEXT_UNKNOWN
public static final String TEXT_UNKNOWN
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_MP4
public static final String APPLICATION_MP4
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_WEBM
public static final String APPLICATION_WEBM
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_MATROSKA
public static final String APPLICATION_MATROSKA
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_MPD
public static final String APPLICATION_MPD
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_M3U8
public static final String APPLICATION_M3U8
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_SS
public static final String APPLICATION_SS
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_ID3
public static final String APPLICATION_ID3
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_CEA608
public static final String APPLICATION_CEA608
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_CEA708
public static final String APPLICATION_CEA708
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_SUBRIP
public static final String APPLICATION_SUBRIP
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_TTML
public static final String APPLICATION_TTML
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_TX3G
public static final String APPLICATION_TX3G
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_MP4VTT
public static final String APPLICATION_MP4VTT
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_MP4CEA608
public static final String APPLICATION_MP4CEA608
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_RAWCC
@Deprecated public static final String APPLICATION_RAWCC
Deprecated.RawCC is a Google-internal subtitle format that isn't supported by this version of Media3. There is no replacement for this value.- See Also:
- Constant Field Values
-
APPLICATION_VOBSUB
public static final String APPLICATION_VOBSUB
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_PGS
public static final String APPLICATION_PGS
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_SCTE35
public static final String APPLICATION_SCTE35
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_CAMERA_MOTION
public static final String APPLICATION_CAMERA_MOTION
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_EMSG
public static final String APPLICATION_EMSG
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_DVBSUBS
public static final String APPLICATION_DVBSUBS
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_EXIF
public static final String APPLICATION_EXIF
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_ICY
public static final String APPLICATION_ICY
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_AIT
public static final String APPLICATION_AIT
Deprecated.- See Also:
- Constant Field Values
-
APPLICATION_RTSP
public static final String APPLICATION_RTSP
Deprecated.- See Also:
- Constant Field Values
-
IMAGE_PNG
public static final String IMAGE_PNG
Deprecated.- See Also:
- Constant Field Values
-
IMAGE_WEBP
public static final String IMAGE_WEBP
Deprecated.- See Also:
- Constant Field Values
-
IMAGE_JPEG
public static final String IMAGE_JPEG
Deprecated.- See Also:
- Constant Field Values
-
IMAGE_HEIC
public static final String IMAGE_HEIC
Deprecated.- See Also:
- Constant Field Values
-
IMAGE_HEIF
public static final String IMAGE_HEIF
Deprecated.- See Also:
- Constant Field Values
-
CODEC_E_AC3_JOC
public static final String CODEC_E_AC3_JOC
Deprecated.A non-standard codec string for E-AC3-JOC. Use of this constant allows for disambiguation between regular E-AC3 ("ec-3") and E-AC3-JOC ("ec+3") streams from the codec string alone. The standard is to use "ec-3" for both, as per the MP4RA registered codec types.- See Also:
- Constant Field Values
-
-
Method Detail
-
registerCustomMimeType
public static void registerCustomMimeType(String mimeType, String codecPrefix, @com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Registers a custom MIME type. Most applications do not need to call this method, as handling of standard MIME types is built in. These built-in MIME types take precedence over any registered via this method. If this method is used, it must be called before creating any player(s).- Parameters:
mimeType
- The custom MIME type to register.codecPrefix
- The RFC 6381 codec string prefix associated with the MIME type.trackType
- Thetrack type
associated with the MIME type. This value is ignored if the top-level type ofmimeType
is audio, video or text.
-
isAudio
public static boolean isAudio(@Nullable String mimeType)
Deprecated.Returns whether the given string is an audio MIME type.
-
isVideo
public static boolean isVideo(@Nullable String mimeType)
Deprecated.Returns whether the given string is a video MIME type.
-
isText
public static boolean isText(@Nullable String mimeType)
Deprecated.Returns whether the given string is a text MIME type, including known text types that use "application" as their base type.
-
isImage
public static boolean isImage(@Nullable String mimeType)
Deprecated.Returns whether the given string is an image MIME type.
-
allSamplesAreSyncSamples
public static boolean allSamplesAreSyncSamples(@Nullable String mimeType, @Nullable String codec)
Deprecated.Returns true if it is known that all samples in a stream of the given MIME type and codec are guaranteed to be sync samples (i.e.,C.BUFFER_FLAG_KEY_FRAME
is guaranteed to be set on every sample).- Parameters:
mimeType
- The MIME type of the stream.codec
- The RFC 6381 codec string of the stream, ornull
if unknown.- Returns:
- Whether it is known that all samples in the stream are guaranteed to be sync samples.
-
getVideoMediaMimeType
@Nullable public static String getVideoMediaMimeType(@Nullable String codecs)
Deprecated.Returns the first video MIME type derived from an RFC 6381 codecs string.- Parameters:
codecs
- An RFC 6381 codecs string.- Returns:
- The first derived video MIME type, or
null
.
-
containsCodecsCorrespondingToMimeType
public static boolean containsCodecsCorrespondingToMimeType(@Nullable String codecs, String mimeType)
Deprecated.Returns whether the givencodecs
string contains a codec which corresponds to the givenmimeType
.- Parameters:
codecs
- An RFC 6381 codecs string.mimeType
- A MIME type to look for.- Returns:
- Whether the given
codecs
string contains a codec which corresponds to the givenmimeType
.
-
getCodecsCorrespondingToMimeType
@Nullable public static String getCodecsCorrespondingToMimeType(@Nullable String codecs, @Nullable String mimeType)
Deprecated.Returns a subsequence ofcodecs
containing the codec strings that correspond to the givenmimeType
. Returns null ifmimeType
is null,codecs
is null, orcodecs
does not contain a codec that corresponds tomimeType
.- Parameters:
codecs
- An RFC 6381 codecs string.mimeType
- A MIME type to look for.- Returns:
- A subsequence of
codecs
containing the codec strings that correspond to the givenmimeType
. Returns null ifmimeType
is null,codecs
is null, orcodecs
does not contain a codec that corresponds tomimeType
.
-
getAudioMediaMimeType
@Nullable public static String getAudioMediaMimeType(@Nullable String codecs)
Deprecated.Returns the first audio MIME type derived from an RFC 6381 codecs string.- Parameters:
codecs
- An RFC 6381 codecs string.- Returns:
- The first derived audio MIME type, or
null
.
-
getTextMediaMimeType
@Nullable public static String getTextMediaMimeType(@Nullable String codecs)
Deprecated.Returns the first text MIME type derived from an RFC 6381 codecs string.- Parameters:
codecs
- An RFC 6381 codecs string.- Returns:
- The first derived text MIME type, or
null
.
-
getMediaMimeType
@Nullable public static String getMediaMimeType(@Nullable String codec)
Deprecated.Returns the MIME type corresponding to an RFC 6381 codec string, ornull
if it could not be determined.- Parameters:
codec
- An RFC 6381 codec string.- Returns:
- The corresponding MIME type, or
null
if it could not be determined.
-
getMimeTypeFromMp4ObjectType
@Nullable public static String getMimeTypeFromMp4ObjectType(int objectType)
Deprecated.Returns the MIME type corresponding to an MP4 object type identifier, as defined in RFC 6381 and https://mp4ra.org/#/object_types.- Parameters:
objectType
- An MP4 object type identifier.- Returns:
- The corresponding MIME type, or
null
if it could not be determined.
-
getTrackType
public static @com.google.android.exoplayer2.C.TrackType int getTrackType(@Nullable String mimeType)
Deprecated.Returns thetrack type
constant corresponding to a specified MIME type, which may beC.TRACK_TYPE_UNKNOWN
if it could not be determined.- Parameters:
mimeType
- A MIME type.- Returns:
- The corresponding
track type
, which may beC.TRACK_TYPE_UNKNOWN
if it could not be determined.
-
getEncoding
public static @com.google.android.exoplayer2.C.Encoding int getEncoding(String mimeType, @Nullable String codec)
Deprecated.Returns theC.Encoding
constant corresponding to the specified audio MIME type and RFC 6381 codec string, orC.ENCODING_INVALID
if the correspondingC.Encoding
cannot be determined.- Parameters:
mimeType
- A MIME type.codec
- An RFC 6381 codec string, ornull
if unknown or not applicable.- Returns:
- The corresponding
C.Encoding
, orC.ENCODING_INVALID
.
-
getTrackTypeOfCodec
public static @com.google.android.exoplayer2.C.TrackType int getTrackTypeOfCodec(String codec)
Deprecated.Equivalent togetTrackType(getMediaMimeType(codec))
.- Parameters:
codec
- An RFC 6381 codec string.- Returns:
- The corresponding
track type
, which may beC.TRACK_TYPE_UNKNOWN
if it could not be determined.
-
normalizeMimeType
public static String normalizeMimeType(String mimeType)
Deprecated.Normalizes the MIME type provided so that equivalent MIME types are uniquely represented.- Parameters:
mimeType
- A MIME type to normalize.- Returns:
- The normalized MIME type, or the argument MIME type if its normalized form is unknown.
-
isMatroska
public static boolean isMatroska(@Nullable String mimeType)
Deprecated.Returns whether the givenmimeType
is a Matroska MIME type, including WebM.
-
-