MediaCodecInfo.CodecCapabilities
public
static
final
class
MediaCodecInfo.CodecCapabilities
extends Object
| java.lang.Object | |
| ↳ | android.media.MediaCodecInfo.CodecCapabilities |
Encapsulates the capabilities of a given codec component. For example, what profile/level combinations it supports and what colorspaces it is capable of providing the decoded data in, as well as some codec-type specific capability flags.
You can get an instance for a given MediaCodecInfo object with
getCapabilitiesForType(), passing a MIME type.
Summary
Constants | |
|---|---|
int |
COLOR_Format12bitRGB444
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format16bitARGB1555
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format16bitARGB4444
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format16bitBGR565
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format16bitRGB565
16 bits per pixel RGB color format, with 5-bit red & blue and 6-bit green component. |
int |
COLOR_Format18BitBGR666
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format18bitARGB1665
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format18bitRGB666
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format19bitARGB1666
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format24BitABGR6666
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format24BitARGB6666
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format24bitARGB1887
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format24bitBGR888
24 bits per pixel RGB color format, with 8-bit red, green & blue components. |
int |
COLOR_Format24bitRGB888
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format25bitARGB1888
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format32bitABGR8888
32 bits per pixel RGBA color format, with 8-bit red, green, blue, and alpha components. |
int |
COLOR_Format32bitARGB8888
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format32bitBGRA8888
This constant was deprecated
in API level 23.
Use |
int |
COLOR_Format8bitRGB332
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatCbYCrY
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatCrYCbY
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatL16
16 bits per pixel, little-endian Y color format. |
int |
COLOR_FormatL2
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatL24
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatL32
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatL4
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatL8
8 bits per pixel Y color format. |
int |
COLOR_FormatMonochrome
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatRGBAFlexible
Flexible 32 bits per pixel RGBA color format with 8-bit red, green, blue, and alpha components. |
int |
COLOR_FormatRGBFlexible
Flexible 24 bits per pixel RGB color format with 8-bit red, green and blue components. |
int |
COLOR_FormatRawBayer10bit
SMIA 10-bit Bayer format. |
int |
COLOR_FormatRawBayer8bit
SMIA 8-bit Bayer format. |
int |
COLOR_FormatRawBayer8bitcompressed
SMIA 8-bit compressed Bayer format. |
int |
COLOR_FormatSurface
|
int |
COLOR_FormatYCbYCr
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYCrYCb
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV411PackedPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV411Planar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV420Flexible
Flexible 12 bits per pixel, subsampled YUV color format with 8-bit chroma and luma components. |
int |
COLOR_FormatYUV420PackedPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV420PackedSemiPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV420Planar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV420SemiPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV422Flexible
Flexible 16 bits per pixel, subsampled YUV color format with 8-bit chroma and luma components. |
int |
COLOR_FormatYUV422PackedPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV422PackedSemiPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV422Planar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV422SemiPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_FormatYUV444Flexible
Flexible 24 bits per pixel YUV color format with 8-bit chroma and luma components. |
int |
COLOR_FormatYUV444Interleaved
This constant was deprecated
in API level 23.
Use |
int |
COLOR_QCOM_FormatYUV420SemiPlanar
This constant was deprecated
in API level 23.
Use |
int |
COLOR_TI_FormatYUV420PackedSemiPlanar
This constant was deprecated
in API level 23.
Use |
String |
FEATURE_AdaptivePlayback
video decoder only: codec supports seamless resolution changes. |
String |
FEATURE_IntraRefresh
video encoder only: codec supports intra refresh. |
String |
FEATURE_SecurePlayback
video decoder only: codec supports secure decryption. |
String |
FEATURE_TunneledPlayback
video or audio decoder only: codec supports tunneled playback. |
Fields | |
|---|---|
public
int[] |
colorFormats
Defined in the OpenMAX IL specs, color format values are drawn from OMX_COLOR_FORMATTYPE. |
public
CodecProfileLevel[] |
profileLevels
|
Public constructors | |
|---|---|
MediaCodecInfo.CodecCapabilities()
|
|
Public methods | |
|---|---|
static
MediaCodecInfo.CodecCapabilities
|
createFromProfileLevel(String mime, int profile, int level)
Retrieve the codec capabilities for a certain |
MediaCodecInfo.AudioCapabilities
|
getAudioCapabilities()
Returns the audio capabilities or |
MediaFormat
|
getDefaultFormat()
Returns a MediaFormat object with default values for configurations that have defaults. |
MediaCodecInfo.EncoderCapabilities
|
getEncoderCapabilities()
Returns the encoding capabilities or |
int
|
getMaxSupportedInstances()
Returns the max number of the supported concurrent codec instances. |
String
|
getMimeType()
Returns the mime type for which this codec-capability object was created. |
MediaCodecInfo.VideoCapabilities
|
getVideoCapabilities()
Returns the video capabilities or |
final
boolean
|
isFeatureRequired(String name)
Query codec feature requirements. |
final
boolean
|
isFeatureSupported(String name)
Query codec feature capabilities. |
final
boolean
|
isFormatSupported(MediaFormat format)
Query whether codec supports a given |
Inherited methods | |
|---|---|
java.lang.Object
| |
Constants
COLOR_Format12bitRGB444
int COLOR_Format12bitRGB444
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888.
Constant Value: 3 (0x00000003)
COLOR_Format16bitARGB1555
int COLOR_Format16bitARGB1555
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 5 (0x00000005)
COLOR_Format16bitARGB4444
int COLOR_Format16bitARGB4444
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 4 (0x00000004)
COLOR_Format16bitBGR565
int COLOR_Format16bitBGR565
This constant was deprecated
in API level 23.
Use COLOR_Format16bitRGB565.
Constant Value: 7 (0x00000007)
COLOR_Format16bitRGB565
int COLOR_Format16bitRGB565
16 bits per pixel RGB color format, with 5-bit red & blue and 6-bit green component.
Using 16-bit little-endian representation, colors stored as Red 15:11, Green 10:5, Blue 4:0.
byte byte
<--------- i --------> | <------ i + 1 ------>
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| BLUE | GREEN | RED |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 4 5 7 0 2 3 7
bit
This format corresponds to RGB_565 and
RGB_565.
Constant Value: 6 (0x00000006)
COLOR_Format18BitBGR666
int COLOR_Format18BitBGR666
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888.
Constant Value: 41 (0x00000029)
COLOR_Format18bitARGB1665
int COLOR_Format18bitARGB1665
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 9 (0x00000009)
COLOR_Format18bitRGB666
int COLOR_Format18bitRGB666
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888.
Constant Value: 8 (0x00000008)
COLOR_Format19bitARGB1666
int COLOR_Format19bitARGB1666
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 10 (0x0000000a)
COLOR_Format24BitABGR6666
int COLOR_Format24BitABGR6666
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 43 (0x0000002b)
COLOR_Format24BitARGB6666
int COLOR_Format24BitARGB6666
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 42 (0x0000002a)
COLOR_Format24bitARGB1887
int COLOR_Format24bitARGB1887
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 13 (0x0000000d)
COLOR_Format24bitBGR888
int COLOR_Format24bitBGR888
24 bits per pixel RGB color format, with 8-bit red, green & blue components.
Using 24-bit little-endian representation, colors stored as Red 7:0, Green 15:8, Blue 23:16.
byte byte byte
<------ i -----> | <---- i+1 ----> | <---- i+2 ----->
+-----------------+-----------------+-----------------+
| RED | GREEN | BLUE |
+-----------------+-----------------+-----------------+
This format corresponds to RGB_888, and can also be
represented as a flexible format by COLOR_FormatRGBFlexible.
Constant Value: 12 (0x0000000c)
COLOR_Format24bitRGB888
int COLOR_Format24bitRGB888
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888 or COLOR_FormatRGBFlexible.
Constant Value: 11 (0x0000000b)
COLOR_Format25bitARGB1888
int COLOR_Format25bitARGB1888
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888.
Constant Value: 14 (0x0000000e)
COLOR_Format32bitABGR8888
int COLOR_Format32bitABGR8888
32 bits per pixel RGBA color format, with 8-bit red, green, blue, and alpha components.
Using 32-bit little-endian representation, colors stored as Red 7:0, Green 15:8, Blue 23:16, and Alpha 31:24.
byte byte byte byte
<------ i -----> | <---- i+1 ----> | <---- i+2 ----> | <---- i+3 ----->
+-----------------+-----------------+-----------------+-----------------+
| RED | GREEN | BLUE | ALPHA |
+-----------------+-----------------+-----------------+-----------------+
This corresponds to RGBA_8888.
Constant Value: 2130747392 (0x7f00a000)
COLOR_Format32bitARGB8888
int COLOR_Format32bitARGB8888
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888 Or COLOR_FormatRGBAFlexible.
Constant Value: 16 (0x00000010)
COLOR_Format32bitBGRA8888
int COLOR_Format32bitBGRA8888
This constant was deprecated
in API level 23.
Use COLOR_Format32bitABGR8888 Or COLOR_FormatRGBAFlexible.
Constant Value: 15 (0x0000000f)
COLOR_Format8bitRGB332
int COLOR_Format8bitRGB332
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888.
Constant Value: 2 (0x00000002)
COLOR_FormatCbYCrY
int COLOR_FormatCbYCrY
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 27 (0x0000001b)
COLOR_FormatCrYCbY
int COLOR_FormatCrYCbY
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 28 (0x0000001c)
COLOR_FormatL16
int COLOR_FormatL16
16 bits per pixel, little-endian Y color format.
byte byte
<--------- i --------> | <------ i + 1 ------>
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| Y |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 7 0 7
bit
Constant Value: 36 (0x00000024)
COLOR_FormatL2
int COLOR_FormatL2
This constant was deprecated
in API level 23.
Use COLOR_FormatL8.
Constant Value: 33 (0x00000021)
COLOR_FormatL24
int COLOR_FormatL24
This constant was deprecated
in API level 23.
Use COLOR_FormatL16.
Constant Value: 37 (0x00000025)
COLOR_FormatL32
int COLOR_FormatL32
This constant was deprecated
in API level 23.
Use COLOR_FormatL16.
32 bits per pixel, little-endian Y color format.
byte byte byte byte
<------ i -----> | <---- i+1 ----> | <---- i+2 ----> | <---- i+3 ----->
+-----------------+-----------------+-----------------+-----------------+
| Y |
+-----------------+-----------------+-----------------+-----------------+
0 7 0 7 0 7 0 7
bit
Constant Value: 38 (0x00000026)
COLOR_FormatL4
int COLOR_FormatL4
This constant was deprecated
in API level 23.
Use COLOR_FormatL8.
Constant Value: 34 (0x00000022)
COLOR_FormatL8
int COLOR_FormatL8
8 bits per pixel Y color format.
Each byte contains a single pixel.
This format corresponds to L_8.
Constant Value: 35 (0x00000023)
COLOR_FormatMonochrome
int COLOR_FormatMonochrome
This constant was deprecated
in API level 23.
Use COLOR_Format24bitBGR888.
Constant Value: 1 (0x00000001)
COLOR_FormatRGBAFlexible
int COLOR_FormatRGBAFlexible
Flexible 32 bits per pixel RGBA color format with 8-bit red, green, blue, and alpha components.
Use this format with Image. This format corresponds to
FLEX_RGBA_8888, and can represent
COLOR_Format32bitBGRA8888, COLOR_Format32bitABGR8888 and
COLOR_Format32bitARGB8888 formats.
See also:
Constant Value: 2134288520 (0x7f36a888)
COLOR_FormatRGBFlexible
int COLOR_FormatRGBFlexible
Flexible 24 bits per pixel RGB color format with 8-bit red, green and blue components.
Use this format with Image. This format corresponds to
FLEX_RGB_888, and can represent
COLOR_Format24bitBGR888 and COLOR_Format24bitRGB888 formats.
See also:
Constant Value: 2134292616 (0x7f36b888)
COLOR_FormatRawBayer10bit
int COLOR_FormatRawBayer10bit
SMIA 10-bit Bayer format.
Constant Value: 31 (0x0000001f)
COLOR_FormatRawBayer8bit
int COLOR_FormatRawBayer8bit
SMIA 8-bit Bayer format. Each byte represents the top 8-bits of a 10-bit signal.
Constant Value: 30 (0x0000001e)
COLOR_FormatRawBayer8bitcompressed
int COLOR_FormatRawBayer8bitcompressed
SMIA 8-bit compressed Bayer format. Each byte represents a sample from the 10-bit signal that is compressed into 8-bits using DPCM/PCM compression, as defined by the SMIA Functional Specification.
Constant Value: 32 (0x00000020)
COLOR_FormatSurface
int COLOR_FormatSurface
Constant Value: 2130708361 (0x7f000789)
COLOR_FormatYCbYCr
int COLOR_FormatYCbYCr
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 25 (0x00000019)
COLOR_FormatYCrYCb
int COLOR_FormatYCrYCb
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 26 (0x0000001a)
COLOR_FormatYUV411PackedPlanar
int COLOR_FormatYUV411PackedPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 18 (0x00000012)
COLOR_FormatYUV411Planar
int COLOR_FormatYUV411Planar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 17 (0x00000011)
COLOR_FormatYUV420Flexible
int COLOR_FormatYUV420Flexible
Flexible 12 bits per pixel, subsampled YUV color format with 8-bit chroma and luma components.
Chroma planes are subsampled by 2 both horizontally and vertically.
Use this format with Image.
This format corresponds to YUV_420_888,
and can represent the COLOR_FormatYUV411Planar,
COLOR_FormatYUV411PackedPlanar, COLOR_FormatYUV420Planar,
COLOR_FormatYUV420PackedPlanar, COLOR_FormatYUV420SemiPlanar
and COLOR_FormatYUV420PackedSemiPlanar formats.
See also:
Constant Value: 2135033992 (0x7f420888)
COLOR_FormatYUV420PackedPlanar
int COLOR_FormatYUV420PackedPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 20 (0x00000014)
COLOR_FormatYUV420PackedSemiPlanar
int COLOR_FormatYUV420PackedSemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 39 (0x00000027)
COLOR_FormatYUV420Planar
int COLOR_FormatYUV420Planar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 19 (0x00000013)
COLOR_FormatYUV420SemiPlanar
int COLOR_FormatYUV420SemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 21 (0x00000015)
COLOR_FormatYUV422Flexible
int COLOR_FormatYUV422Flexible
Flexible 16 bits per pixel, subsampled YUV color format with 8-bit chroma and luma components.
Chroma planes are horizontally subsampled by 2. Use this format with Image.
This format corresponds to YUV_422_888,
and can represent the COLOR_FormatYCbYCr, COLOR_FormatYCrYCb,
COLOR_FormatCbYCrY, COLOR_FormatCrYCbY,
COLOR_FormatYUV422Planar, COLOR_FormatYUV422PackedPlanar,
COLOR_FormatYUV422SemiPlanar and COLOR_FormatYUV422PackedSemiPlanar
formats.
See also:
Constant Value: 2135042184 (0x7f422888)
COLOR_FormatYUV422PackedPlanar
int COLOR_FormatYUV422PackedPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 23 (0x00000017)
COLOR_FormatYUV422PackedSemiPlanar
int COLOR_FormatYUV422PackedSemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 40 (0x00000028)
COLOR_FormatYUV422Planar
int COLOR_FormatYUV422Planar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 22 (0x00000016)
COLOR_FormatYUV422SemiPlanar
int COLOR_FormatYUV422SemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV422Flexible.
Constant Value: 24 (0x00000018)
COLOR_FormatYUV444Flexible
int COLOR_FormatYUV444Flexible
Flexible 24 bits per pixel YUV color format with 8-bit chroma and luma components.
Chroma planes are not subsampled. Use this format with Image.
This format corresponds to YUV_444_888,
and can represent the COLOR_FormatYUV444Interleaved format.
See also:
Constant Value: 2135181448 (0x7f444888)
COLOR_FormatYUV444Interleaved
int COLOR_FormatYUV444Interleaved
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV444Flexible.
Constant Value: 29 (0x0000001d)
COLOR_QCOM_FormatYUV420SemiPlanar
int COLOR_QCOM_FormatYUV420SemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 2141391872 (0x7fa30c00)
COLOR_TI_FormatYUV420PackedSemiPlanar
int COLOR_TI_FormatYUV420PackedSemiPlanar
This constant was deprecated
in API level 23.
Use COLOR_FormatYUV420Flexible.
Constant Value: 2130706688 (0x7f000100)
FEATURE_AdaptivePlayback
String FEATURE_AdaptivePlayback
video decoder only: codec supports seamless resolution changes.
Constant Value: "adaptive-playback"
FEATURE_IntraRefresh
String FEATURE_IntraRefresh
video encoder only: codec supports intra refresh.
Constant Value: "intra-refresh"
FEATURE_SecurePlayback
String FEATURE_SecurePlayback
video decoder only: codec supports secure decryption.
Constant Value: "secure-playback"
FEATURE_TunneledPlayback
String FEATURE_TunneledPlayback
video or audio decoder only: codec supports tunneled playback.
Constant Value: "tunneled-playback"
Fields
colorFormats
int[] colorFormats
Defined in the OpenMAX IL specs, color format values are drawn from OMX_COLOR_FORMATTYPE.
Public constructors
Public methods
createFromProfileLevel
MediaCodecInfo.CodecCapabilities createFromProfileLevel (String mime, int profile, int level)
Retrieve the codec capabilities for a certain mime type, profile and level. If the type, or profile-level combination
is not understood by the framework, it returns null.
In M, calling this
method without calling any method of the MediaCodecList class beforehand
results in a NullPointerException.
| Parameters | |
|---|---|
mime |
String
|
profile |
int
|
level |
int
|
| Returns | |
|---|---|
MediaCodecInfo.CodecCapabilities |
|
getAudioCapabilities
MediaCodecInfo.AudioCapabilities getAudioCapabilities ()
Returns the audio capabilities or null if this is not an audio codec.
| Returns | |
|---|---|
MediaCodecInfo.AudioCapabilities |
|
getDefaultFormat
MediaFormat getDefaultFormat ()
Returns a MediaFormat object with default values for configurations that have defaults.
| Returns | |
|---|---|
MediaFormat |
|
getEncoderCapabilities
MediaCodecInfo.EncoderCapabilities getEncoderCapabilities ()
Returns the encoding capabilities or null if this is not an encoder.
| Returns | |
|---|---|
MediaCodecInfo.EncoderCapabilities |
|
getMaxSupportedInstances
int getMaxSupportedInstances ()
Returns the max number of the supported concurrent codec instances.
This is a hint for an upper bound. Applications should not expect to successfully operate more instances than the returned value, but the actual number of concurrently operable instances may be less as it depends on the available resources at time of use.
| Returns | |
|---|---|
int |
|
getMimeType
String getMimeType ()
Returns the mime type for which this codec-capability object was created.
| Returns | |
|---|---|
String |
|
getVideoCapabilities
MediaCodecInfo.VideoCapabilities getVideoCapabilities ()
Returns the video capabilities or null if this is not a video codec.
| Returns | |
|---|---|
MediaCodecInfo.VideoCapabilities |
|
isFeatureRequired
boolean isFeatureRequired (String name)
Query codec feature requirements.
These features are required to be used by the codec, and as such, they are always turned on.
| Parameters | |
|---|---|
name |
String
|
| Returns | |
|---|---|
boolean |
|
isFeatureSupported
boolean isFeatureSupported (String name)
Query codec feature capabilities.
These features are supported to be used by the codec. These include optional features that can be turned on, as well as features that are always on.
| Parameters | |
|---|---|
name |
String
|
| Returns | |
|---|---|
boolean |
|
isFormatSupported
boolean isFormatSupported (MediaFormat format)
Query whether codec supports a given MediaFormat.
Note: On LOLLIPOP,
format must not contain a frame rate. Use
format.setString(MediaFormat.KEY_FRAME_RATE, null)
to clear any existing frame rate setting in the format.
The following table summarizes the format keys considered by this method.
| OS Version(s) | MediaFormat keys considered for
| ||
|---|---|---|---|
| Audio Codecs | Video Codecs | Encoders | |
LOLLIPOP
| KEY_MIME*,KEY_SAMPLE_RATE,KEY_CHANNEL_COUNT, |
KEY_MIME*,FEATURE_AdaptivePlaybackD,FEATURE_SecurePlaybackD,FEATURE_TunneledPlaybackD,KEY_WIDTH,KEY_HEIGHT,no KEY_FRAME_RATE |
KEY_BITRATE_MODE,KEY_PROFILE
(and/or KEY_AAC_PROFILE~),KEY_COMPLEXITY
(and/or KEY_FLAC_COMPRESSION_LEVEL~) |
LOLLIPOP_MR1
| as above, plusKEY_FRAME_RATE |
||
M
| |||
N
| as above, plusKEY_PROFILE,KEY_BIT_RATE |
as above, plusKEY_PROFILE,KEY_LEVEL+,KEY_BIT_RATE,FEATURE_IntraRefreshE |
|
|
Notes: |
|||
| Parameters | |
|---|---|
format |
MediaFormat:
media format with optional feature directives. |
| Returns | |
|---|---|
boolean |
whether the codec capabilities support the given format and feature requests. |
| Throws | |
|---|---|
IllegalArgumentException |
if format is not a valid media format. |
Interfaces
- AudioManager.OnAudioFocusChangeListener
- AudioRecord.OnRecordPositionUpdateListener
- AudioRecord.OnRoutingChangedListener
- AudioRouting
- AudioRouting.OnRoutingChangedListener
- AudioTrack.OnPlaybackPositionUpdateListener
- AudioTrack.OnRoutingChangedListener
- ImageReader.OnImageAvailableListener
- ImageWriter.OnImageReleasedListener
- JetPlayer.OnJetEventListener
- MediaCodec.OnFrameRenderedListener
- MediaDrm.OnEventListener
- MediaDrm.OnExpirationUpdateListener
- MediaDrm.OnKeyStatusChangeListener
- MediaPlayer.OnBufferingUpdateListener
- MediaPlayer.OnCompletionListener
- MediaPlayer.OnErrorListener
- MediaPlayer.OnInfoListener
- MediaPlayer.OnPreparedListener
- MediaPlayer.OnSeekCompleteListener
- MediaPlayer.OnTimedMetaDataAvailableListener
- MediaPlayer.OnTimedTextListener
- MediaPlayer.OnVideoSizeChangedListener
- MediaRecorder.OnErrorListener
- MediaRecorder.OnInfoListener
- MediaScannerConnection.MediaScannerConnectionClient
- MediaScannerConnection.OnScanCompletedListener
- MediaSync.OnErrorListener
- RemoteControlClient.OnGetPlaybackPositionListener
- RemoteControlClient.OnMetadataUpdateListener
- RemoteControlClient.OnPlaybackPositionUpdateListener
- RemoteController.OnClientUpdateListener
- SoundPool.OnLoadCompleteListener
Classes
- AsyncPlayer
- AudioAttributes
- AudioAttributes.Builder
- AudioDeviceCallback
- AudioDeviceInfo
- AudioFormat
- AudioFormat.Builder
- AudioManager
- AudioManager.AudioRecordingCallback
- AudioRecord
- AudioRecord.Builder
- AudioRecordingConfiguration
- AudioTimestamp
- AudioTrack
- AudioTrack.Builder
- CamcorderProfile
- CameraProfile
- DrmInitData
- DrmInitData.SchemeInitData
- ExifInterface
- FaceDetector
- FaceDetector.Face
- Image
- Image.Plane
- ImageReader
- ImageWriter
- JetPlayer
- MediaActionSound
- MediaCodec
- MediaCodec.BufferInfo
- MediaCodec.Callback
- MediaCodec.CryptoInfo
- MediaCodec.CryptoInfo.Pattern
- MediaCodecInfo
- MediaCodecInfo.AudioCapabilities
- MediaCodecInfo.CodecCapabilities
- MediaCodecInfo.CodecProfileLevel
- MediaCodecInfo.EncoderCapabilities
- MediaCodecInfo.VideoCapabilities
- MediaCodecList
- MediaCrypto
- MediaDataSource
- MediaDescription
- MediaDescription.Builder
- MediaDrm
- MediaDrm.CryptoSession
- MediaDrm.KeyRequest
- MediaDrm.KeyStatus
- MediaDrm.ProvisionRequest
- MediaExtractor
- MediaFormat
- MediaMetadata
- MediaMetadata.Builder
- MediaMetadataEditor
- MediaMetadataRetriever
- MediaMuxer
- MediaMuxer.OutputFormat
- MediaPlayer
- MediaPlayer.TrackInfo
- MediaRecorder
- MediaRecorder.AudioEncoder
- MediaRecorder.AudioSource
- MediaRecorder.OutputFormat
- MediaRecorder.VideoEncoder
- MediaRecorder.VideoSource
- MediaRouter
- MediaRouter.Callback
- MediaRouter.RouteCategory
- MediaRouter.RouteGroup
- MediaRouter.RouteInfo
- MediaRouter.SimpleCallback
- MediaRouter.UserRouteInfo
- MediaRouter.VolumeCallback
- MediaScannerConnection
- MediaSync
- MediaSync.Callback
- MediaSyncEvent
- MediaTimestamp
- PlaybackParams
- Rating
- RemoteControlClient
- RemoteControlClient.MetadataEditor
- RemoteController
- RemoteController.MetadataEditor
- Ringtone
- RingtoneManager
- SoundPool
- SoundPool.Builder
- SyncParams
- ThumbnailUtils
- TimedMetaData
- TimedText
- ToneGenerator
- VolumeProvider
Exceptions


