Package org.robolectric.shadows
Class MediaCodecInfoBuilder
java.lang.Object
org.robolectric.shadows.MediaCodecInfoBuilder
public class MediaCodecInfoBuilder extends Object
Builder for
MediaCodecInfo.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaCodecInfoBuilder.CodecCapabilitiesBuilderBuilder forMediaCodecInfo.CodecCapabilities. -
Method Summary
Modifier and Type Method Description MediaCodecInfobuild()static MediaCodecInfoBuildernewBuilder()Create a newMediaCodecInfoBuilder.MediaCodecInfoBuildersetCapabilities(MediaCodecInfo.CodecCapabilities... capabilities)Sets codec capabilities.MediaCodecInfoBuildersetIsEncoder(boolean isEncoder)Sets the codec role.MediaCodecInfoBuildersetIsHardwareAccelerated(boolean isHardwareAccelerated)Sets whether the codec is hardware accelerated or not.MediaCodecInfoBuildersetIsSoftwareOnly(boolean isSoftwareOnly)Sets whether the codec is softwrare only or not.MediaCodecInfoBuildersetIsVendor(boolean isVendor)Sets the codec provider.MediaCodecInfoBuildersetName(String name)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 encodertrueor a decoderfalse. Default value isfalse.
-
setIsVendor
Sets the codec provider.- Parameters:
isVendor- a boolean to indicate whether the codec is provided by the device manufacturertrueor 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 onlytrueor 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 acceleratedtrueor notfalse. Default value isfalse.
-
setCapabilities
Sets codec capabilities.Use
MediaCodecInfoBuilder.CodecCapabilitiesBuildercan be to create an instance ofMediaCodecInfo.CodecCapabilities.- Parameters:
capabilities- one or multipleMediaCodecInfo.CodecCapabilities.- Throws:
NullPointerException- if capabilities is null.
-
build
-