public class MediaCodecInfoBuilder extends Object
MediaCodecInfo
.Modifier and Type | Class | Description |
---|---|---|
static class |
MediaCodecInfoBuilder.CodecCapabilitiesBuilder |
Builder for
MediaCodecInfo.CodecCapabilities . |
Modifier and Type | Method | Description |
---|---|---|
MediaCodecInfo |
build() |
|
static MediaCodecInfoBuilder |
newBuilder() |
Create a new
MediaCodecInfoBuilder . |
MediaCodecInfoBuilder |
setCapabilities(MediaCodecInfo.CodecCapabilities... capabilities) |
Sets codec capabilities.
|
MediaCodecInfoBuilder |
setIsEncoder(boolean isEncoder) |
Sets the codec role.
|
MediaCodecInfoBuilder |
setIsHardwareAccelerated(boolean isHardwareAccelerated) |
Sets whether the codec is hardware accelerated or not.
|
MediaCodecInfoBuilder |
setIsSoftwareOnly(boolean isSoftwareOnly) |
Sets whether the codec is softwrare only or not.
|
MediaCodecInfoBuilder |
setIsVendor(boolean isVendor) |
Sets the codec provider.
|
MediaCodecInfoBuilder |
setName(String name) |
Sets the codec name.
|
public static MediaCodecInfoBuilder newBuilder()
MediaCodecInfoBuilder
.public MediaCodecInfoBuilder setName(String name)
name
- codec name.NullPointerException
- if name is null.public MediaCodecInfoBuilder setIsEncoder(boolean isEncoder)
isEncoder
- a boolean to indicate whether the codec is an encoder true
or a
decoder false
. Default value is false
.public MediaCodecInfoBuilder setIsVendor(boolean isVendor)
isVendor
- a boolean to indicate whether the codec is provided by the device manufacturer
true
or by the Android platform false
. Default value is false
.public MediaCodecInfoBuilder setIsSoftwareOnly(boolean isSoftwareOnly)
isSoftwareOnly
- a boolean to indicate whether the codec is software only true
or
not false
. Default value is false
.public MediaCodecInfoBuilder setIsHardwareAccelerated(boolean isHardwareAccelerated)
isHardwareAccelerated
- a boolean to indicate whether the codec is hardware accelerated
true
or not false
. Default value is false
.public MediaCodecInfoBuilder setCapabilities(MediaCodecInfo.CodecCapabilities... capabilities)
Use MediaCodecInfoBuilder.CodecCapabilitiesBuilder
can be to create an instance of MediaCodecInfo.CodecCapabilities
.
capabilities
- one or multiple MediaCodecInfo.CodecCapabilities
.NullPointerException
- if capabilities is null.public MediaCodecInfo build()