java.lang.Object | |
↳ | android.media.MediaCodecList |
Allows you to enumerate available codecs, each specified as a MediaCodecInfo
object,
find a codec supporting a given format and query the capabilities
of a given codec.
See MediaCodecInfo
for sample usage.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ALL_CODECS |
Use in MediaCodecList(int) to enumerate all codecs, even ones that are
not suitable for regular (buffer-to-buffer) decoding or encoding.
|
|||||||||
int | REGULAR_CODECS |
Use in MediaCodecList(int) to enumerate only codecs that are suitable
for regular (buffer-to-buffer) decoding or encoding.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a list of media-codecs of a specific kind.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Find a decoder supporting a given
MediaFormat in the list
of media-codecs.
| |||||||||||
Find an encoder supporting a given
MediaFormat in the list
of media-codecs.
| |||||||||||
This method was deprecated
in API level 21.
Use
getCodecInfos() instead.
| |||||||||||
This method was deprecated
in API level 21.
Use
getCodecInfos() instead.
| |||||||||||
Returns the list of
MediaCodecInfo objects for the list
of media-codecs.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Use in MediaCodecList(int)
to enumerate all codecs, even ones that are
not suitable for regular (buffer-to-buffer) decoding or encoding. These
include codecs, for example, that only work with special input or output
surfaces, such as secure-only or tunneled-only codecs.
Use in MediaCodecList(int)
to enumerate only codecs that are suitable
for regular (buffer-to-buffer) decoding or encoding.
NOTE: These are the codecs that are returned prior to API 21,
using the now deprecated static methods.
Create a list of media-codecs of a specific kind.
kind | Either REGULAR_CODECS or ALL_CODECS .
|
---|
Find a decoder supporting a given MediaFormat
in the list
of media-codecs.
format | A decoder media format with optional feature directives. |
---|
null
if no such codec has been found.
IllegalArgumentException | if format is not a valid media format. |
---|---|
NullPointerException | if format is null. |
Find an encoder supporting a given MediaFormat
in the list
of media-codecs.
format | An encoder media format with optional feature directives. |
---|
null
if no such codec has been found.
IllegalArgumentException | if format is not a valid media format. |
---|---|
NullPointerException | if format is null. |
This method was deprecated
in API level 21.
Use getCodecInfos()
instead.
Count the number of available (regular) codecs.
This method was deprecated
in API level 21.
Use getCodecInfos()
instead.
Return the MediaCodecInfo
object for the codec at
the given index
in the regular list.
Returns the list of MediaCodecInfo
objects for the list
of media-codecs.