public static class MediaCodecInfoBuilder.CodecCapabilitiesBuilder extends Object
MediaCodecInfo.CodecCapabilities
.Modifier and Type | Method | Description |
---|---|---|
MediaCodecInfo.CodecCapabilities |
build() |
|
static MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
newBuilder() |
Creates a new
MediaCodecInfoBuilder.CodecCapabilitiesBuilder . |
MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
setColorFormats(int[] colorFormats) |
Sets color formats.
|
MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
setIsEncoder(boolean isEncoder) |
Sets codec role.
|
MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
setMediaFormat(MediaFormat mediaFormat) |
Sets media format.
|
MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
setProfileLevels(MediaCodecInfo.CodecProfileLevel[] profileLevels) |
Sets profiles and levels.
|
public static MediaCodecInfoBuilder.CodecCapabilitiesBuilder newBuilder()
MediaCodecInfoBuilder.CodecCapabilitiesBuilder
.public MediaCodecInfoBuilder.CodecCapabilitiesBuilder setMediaFormat(MediaFormat mediaFormat)
mediaFormat
- a MediaFormat
supported by the codec. It is a requirement for
mediaFormat to have MediaFormat.KEY_MIME
set. Other keys are optional.public MediaCodecInfoBuilder.CodecCapabilitiesBuilder setIsEncoder(boolean isEncoder)
isEncoder
- a boolean to indicate whether the codec is an encoder or a decoder. Default
value is false.public MediaCodecInfoBuilder.CodecCapabilitiesBuilder setProfileLevels(MediaCodecInfo.CodecProfileLevel[] profileLevels)
profileLevels
- an array of MediaCodecInfo.CodecProfileLevel
supported by the
codec.public MediaCodecInfoBuilder.CodecCapabilitiesBuilder setColorFormats(int[] colorFormats)
colorFormats
- an array of color formats supported by the video codec. Refer to MediaCodecInfo.CodecCapabilities
for possible values.public MediaCodecInfo.CodecCapabilities build()