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 StringAPPLICATION_AITDeprecated.static StringAPPLICATION_CAMERA_MOTIONDeprecated.static StringAPPLICATION_CEA608Deprecated.static StringAPPLICATION_CEA708Deprecated.static StringAPPLICATION_DVBSUBSDeprecated.static StringAPPLICATION_EMSGDeprecated.static StringAPPLICATION_EXIFDeprecated.static StringAPPLICATION_ICYDeprecated.static StringAPPLICATION_ID3Deprecated.static StringAPPLICATION_M3U8Deprecated.static StringAPPLICATION_MATROSKADeprecated.static StringAPPLICATION_MP4Deprecated.static StringAPPLICATION_MP4CEA608Deprecated.static StringAPPLICATION_MP4VTTDeprecated.static StringAPPLICATION_MPDDeprecated.static StringAPPLICATION_PGSDeprecated.static StringAPPLICATION_RAWCCDeprecated.RawCC is a Google-internal subtitle format that isn't supported by this version of Media3.static StringAPPLICATION_RTSPDeprecated.static StringAPPLICATION_SCTE35Deprecated.static StringAPPLICATION_SSDeprecated.static StringAPPLICATION_SUBRIPDeprecated.static StringAPPLICATION_TTMLDeprecated.static StringAPPLICATION_TX3GDeprecated.static StringAPPLICATION_VOBSUBDeprecated.static StringAPPLICATION_WEBMDeprecated.static StringAUDIO_AACDeprecated.static StringAUDIO_AC3Deprecated.static StringAUDIO_AC4Deprecated.static StringAUDIO_ALACDeprecated.static StringAUDIO_ALAWDeprecated.static StringAUDIO_AMRDeprecated.static StringAUDIO_AMR_NBDeprecated.static StringAUDIO_AMR_WBDeprecated.static StringAUDIO_DTSDeprecated.static StringAUDIO_DTS_EXPRESSDeprecated.static StringAUDIO_DTS_HDDeprecated.static StringAUDIO_DTS_XDeprecated.static StringAUDIO_E_AC3Deprecated.static StringAUDIO_E_AC3_JOCDeprecated.static StringAUDIO_EXOPLAYER_MIDIDeprecated.static StringAUDIO_FLACDeprecated.static StringAUDIO_MATROSKADeprecated.static StringAUDIO_MIDIDeprecated.static StringAUDIO_MLAWDeprecated.static StringAUDIO_MP4Deprecated.static StringAUDIO_MPEGDeprecated.static StringAUDIO_MPEG_L1Deprecated.static StringAUDIO_MPEG_L2Deprecated.static StringAUDIO_MPEGH_MHA1Deprecated.static StringAUDIO_MPEGH_MHM1Deprecated.static StringAUDIO_MSGSMDeprecated.static StringAUDIO_OGGDeprecated.static StringAUDIO_OPUSDeprecated.static StringAUDIO_RAWDeprecated.static StringAUDIO_TRUEHDDeprecated.static StringAUDIO_UNKNOWNDeprecated.static StringAUDIO_VORBISDeprecated.static StringAUDIO_WAVDeprecated.static StringAUDIO_WEBMDeprecated.static StringBASE_TYPE_APPLICATIONDeprecated.static StringBASE_TYPE_AUDIODeprecated.static StringBASE_TYPE_IMAGEDeprecated.static StringBASE_TYPE_TEXTDeprecated.static StringBASE_TYPE_VIDEODeprecated.static StringCODEC_E_AC3_JOCDeprecated.A non-standard codec string for E-AC3-JOC.static StringIMAGE_HEICDeprecated.static StringIMAGE_HEIFDeprecated.static StringIMAGE_JPEGDeprecated.static StringIMAGE_PNGDeprecated.static StringIMAGE_WEBPDeprecated.static StringTEXT_EXOPLAYER_CUESDeprecated.static StringTEXT_SSADeprecated.static StringTEXT_UNKNOWNDeprecated.static StringTEXT_VTTDeprecated.static StringVIDEO_AV1Deprecated.static StringVIDEO_AVIDeprecated.static StringVIDEO_DIVXDeprecated.static StringVIDEO_DOLBY_VISIONDeprecated.static StringVIDEO_FLVDeprecated.static StringVIDEO_H263Deprecated.static StringVIDEO_H264Deprecated.static StringVIDEO_H265Deprecated.static StringVIDEO_MATROSKADeprecated.static StringVIDEO_MJPEGDeprecated.static StringVIDEO_MP2TDeprecated.static StringVIDEO_MP4Deprecated.static StringVIDEO_MP42Deprecated.static StringVIDEO_MP43Deprecated.static StringVIDEO_MP4VDeprecated.static StringVIDEO_MPEGDeprecated.static StringVIDEO_MPEG2Deprecated.static StringVIDEO_OGGDeprecated.static StringVIDEO_PSDeprecated.static StringVIDEO_RAWDeprecated.static StringVIDEO_UNKNOWNDeprecated.static StringVIDEO_VC1Deprecated.static StringVIDEO_VP8Deprecated.static StringVIDEO_VP9Deprecated.static StringVIDEO_WEBMDeprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanallSamplesAreSyncSamples(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_FRAMEis guaranteed to be set on every sample).static booleancontainsCodecsCorrespondingToMimeType(String codecs, String mimeType)Deprecated.Returns whether the givencodecsstring contains a codec which corresponds to the givenmimeType.static StringgetAudioMediaMimeType(String codecs)Deprecated.Returns the first audio MIME type derived from an RFC 6381 codecs string.static StringgetCodecsCorrespondingToMimeType(String codecs, String mimeType)Deprecated.Returns a subsequence ofcodecscontaining the codec strings that correspond to the givenmimeType.static @com.google.android.exoplayer2.C.Encoding intgetEncoding(String mimeType, String codec)Deprecated.Returns theC.Encodingconstant corresponding to the specified audio MIME type and RFC 6381 codec string, orC.ENCODING_INVALIDif the correspondingC.Encodingcannot be determined.static StringgetMediaMimeType(String codec)Deprecated.Returns the MIME type corresponding to an RFC 6381 codec string, ornullif it could not be determined.static StringgetMimeTypeFromMp4ObjectType(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 StringgetTextMediaMimeType(String codecs)Deprecated.Returns the first text MIME type derived from an RFC 6381 codecs string.static @com.google.android.exoplayer2.C.TrackType intgetTrackType(String mimeType)Deprecated.Returns thetrack typeconstant corresponding to a specified MIME type, which may beC.TRACK_TYPE_UNKNOWNif it could not be determined.static @com.google.android.exoplayer2.C.TrackType intgetTrackTypeOfCodec(String codec)Deprecated.Equivalent togetTrackType(getMediaMimeType(codec)).static StringgetVideoMediaMimeType(String codecs)Deprecated.Returns the first video MIME type derived from an RFC 6381 codecs string.static booleanisAudio(String mimeType)Deprecated.Returns whether the given string is an audio MIME type.static booleanisImage(String mimeType)Deprecated.Returns whether the given string is an image MIME type.static booleanisMatroska(String mimeType)Deprecated.Returns whether the givenmimeTypeis a Matroska MIME type, including WebM.static booleanisText(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 booleanisVideo(String mimeType)Deprecated.Returns whether the given string is a video MIME type.static StringnormalizeMimeType(String mimeType)Deprecated.Normalizes the MIME type provided so that equivalent MIME types are uniquely represented.static voidregisterCustomMimeType(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 typeassociated with the MIME type. This value is ignored if the top-level type ofmimeTypeis 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_FRAMEis guaranteed to be set on every sample).- Parameters:
mimeType- The MIME type of the stream.codec- The RFC 6381 codec string of the stream, ornullif 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 givencodecsstring 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
codecsstring contains a codec which corresponds to the givenmimeType.
-
getCodecsCorrespondingToMimeType
@Nullable public static String getCodecsCorrespondingToMimeType(@Nullable String codecs, @Nullable String mimeType)
Deprecated.Returns a subsequence ofcodecscontaining the codec strings that correspond to the givenmimeType. Returns null ifmimeTypeis null,codecsis null, orcodecsdoes 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
codecscontaining the codec strings that correspond to the givenmimeType. Returns null ifmimeTypeis null,codecsis null, orcodecsdoes 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, ornullif it could not be determined.- Parameters:
codec- An RFC 6381 codec string.- Returns:
- The corresponding MIME type, or
nullif 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
nullif it could not be determined.
-
getTrackType
public static @com.google.android.exoplayer2.C.TrackType int getTrackType(@Nullable String mimeType)Deprecated.Returns thetrack typeconstant corresponding to a specified MIME type, which may beC.TRACK_TYPE_UNKNOWNif it could not be determined.- Parameters:
mimeType- A MIME type.- Returns:
- The corresponding
track type, which may beC.TRACK_TYPE_UNKNOWNif it could not be determined.
-
getEncoding
public static @com.google.android.exoplayer2.C.Encoding int getEncoding(String mimeType, @Nullable String codec)
Deprecated.Returns theC.Encodingconstant corresponding to the specified audio MIME type and RFC 6381 codec string, orC.ENCODING_INVALIDif the correspondingC.Encodingcannot be determined.- Parameters:
mimeType- A MIME type.codec- An RFC 6381 codec string, ornullif 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_UNKNOWNif 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 givenmimeTypeis a Matroska MIME type, including WebM.
-
-