Package org.robolectric.shadows
Class MediaCodecInfoBuilder.CodecCapabilitiesBuilder
java.lang.Object
org.robolectric.shadows.MediaCodecInfoBuilder.CodecCapabilitiesBuilder
- Enclosing class:
- MediaCodecInfoBuilder
public static class MediaCodecInfoBuilder.CodecCapabilitiesBuilder extends Object
Builder for
MediaCodecInfo.CodecCapabilities
.-
Method Summary
Modifier and Type Method Description MediaCodecInfo.CodecCapabilities
build()
static MediaCodecInfoBuilder.CodecCapabilitiesBuilder
newBuilder()
Creates a newMediaCodecInfoBuilder.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.
-
Method Details
-
newBuilder
Creates a newMediaCodecInfoBuilder.CodecCapabilitiesBuilder
. -
setMediaFormat
Sets media format.- Parameters:
mediaFormat
- aMediaFormat
supported by the codec. It is a requirement for mediaFormat to haveMediaFormat.KEY_MIME
set. Other keys are optional.
-
setIsEncoder
Sets codec role.- Parameters:
isEncoder
- a boolean to indicate whether the codec is an encoder or a decoder. Default value is false.
-
setProfileLevels
public MediaCodecInfoBuilder.CodecCapabilitiesBuilder setProfileLevels(MediaCodecInfo.CodecProfileLevel[] profileLevels)Sets profiles and levels.- Parameters:
profileLevels
- an array ofMediaCodecInfo.CodecProfileLevel
supported by the codec.
-
setColorFormats
Sets color formats.- Parameters:
colorFormats
- an array of color formats supported by the video codec. Refer toMediaCodecInfo.CodecCapabilities
for possible values.
-
build
-