Package org.robolectric.shadows
Class MediaCodecInfoBuilder
java.lang.Object
org.robolectric.shadows.MediaCodecInfoBuilder
Builder for
MediaCodecInfo
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static MediaCodecInfoBuilder
Create a newMediaCodecInfoBuilder
.setCapabilities
(MediaCodecInfo.CodecCapabilities... capabilities) Sets codec capabilities.setIsEncoder
(boolean isEncoder) Sets the codec role.setIsHardwareAccelerated
(boolean isHardwareAccelerated) Sets whether the codec is hardware accelerated or not.setIsSoftwareOnly
(boolean isSoftwareOnly) Sets whether the codec is softwrare only or not.setIsVendor
(boolean isVendor) Sets the codec provider.Sets the codec name.
-
Method Details
-
newBuilder
Create a newMediaCodecInfoBuilder
. -
setName
Sets the codec name.- Parameters:
name
- codec name.- Throws:
NullPointerException
- if name is null.
-
setIsEncoder
Sets the codec role.- Parameters:
isEncoder
- a boolean to indicate whether the codec is an encodertrue
or a decoderfalse
. Default value isfalse
.
-
setIsVendor
Sets the codec provider.- Parameters:
isVendor
- a boolean to indicate whether the codec is provided by the device manufacturertrue
or by the Android platformfalse
. Default value isfalse
.
-
setIsSoftwareOnly
Sets whether the codec is softwrare only or not.- Parameters:
isSoftwareOnly
- a boolean to indicate whether the codec is software onlytrue
or notfalse
. Default value isfalse
.
-
setIsHardwareAccelerated
Sets whether the codec is hardware accelerated or not.- Parameters:
isHardwareAccelerated
- a boolean to indicate whether the codec is hardware acceleratedtrue
or notfalse
. Default value isfalse
.
-
setCapabilities
Sets codec capabilities.Use
MediaCodecInfoBuilder.CodecCapabilitiesBuilder
can be to create an instance ofMediaCodecInfo.CodecCapabilities
.- Parameters:
capabilities
- one or multipleMediaCodecInfo.CodecCapabilities
.- Throws:
NullPointerException
- if capabilities is null.
-
build
-