ApplicationMediaCapabilities.Builder
public
static
final
class
ApplicationMediaCapabilities.Builder
extends Object
| java.lang.Object | |
| ↳ | android.media.ApplicationMediaCapabilities.Builder |
Builder class for ApplicationMediaCapabilities objects.
Use this class to configure and create an ApplicationMediaCapabilities instance. Builder
could be created from an existing ApplicationMediaCapabilities object, from a xml file or
MediaCodecList.
//TODO(hkuang): Add xml parsing support to the builder.
Summary
Public constructors | |
|---|---|
Builder()
Constructs a new Builder with all the supports default to false. |
|
Public methods | |
|---|---|
ApplicationMediaCapabilities.Builder
|
addSupportedHdrType(String hdrType)
Adds a supported hdr type. |
ApplicationMediaCapabilities.Builder
|
addSupportedVideoMimeType(String codecMime)
Adds a supported video codec mime type. |
ApplicationMediaCapabilities.Builder
|
addUnsupportedHdrType(String hdrType)
Adds an unsupported hdr type. |
ApplicationMediaCapabilities.Builder
|
addUnsupportedVideoMimeType(String codecMime)
Adds an unsupported video codec mime type. |
ApplicationMediaCapabilities
|
build()
Builds a |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder ()
Constructs a new Builder with all the supports default to false.
Public methods
addSupportedHdrType
public ApplicationMediaCapabilities.Builder addSupportedHdrType (String hdrType)
Adds a supported hdr type.
| Parameters | |
|---|---|
hdrType |
String: Supported hdr type. Must be one of the String defined in
MediaFeature.HdrType.
This value cannot be null.
Value is one of the following: |
| Returns | |
|---|---|
ApplicationMediaCapabilities.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if hdrType is not valid. |
addSupportedVideoMimeType
public ApplicationMediaCapabilities.Builder addSupportedVideoMimeType (String codecMime)
Adds a supported video codec mime type.
| Parameters | |
|---|---|
codecMime |
String: Supported codec mime types. Must be one of the mime type defined
in MediaFormat.
This value cannot be null. |
| Returns | |
|---|---|
ApplicationMediaCapabilities.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if mime type is not valid. |
addUnsupportedHdrType
public ApplicationMediaCapabilities.Builder addUnsupportedHdrType (String hdrType)
Adds an unsupported hdr type.
| Parameters | |
|---|---|
hdrType |
String: Unsupported hdr type. Must be one of the String defined in
MediaFeature.HdrType.
This value cannot be null.
Value is one of the following: |
| Returns | |
|---|---|
ApplicationMediaCapabilities.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if hdrType is not valid. |
addUnsupportedVideoMimeType
public ApplicationMediaCapabilities.Builder addUnsupportedVideoMimeType (String codecMime)
Adds an unsupported video codec mime type.
| Parameters | |
|---|---|
codecMime |
String: Unsupported codec mime type. Must be one of the mime type defined
in MediaFormat.
This value cannot be null. |
| Returns | |
|---|---|
ApplicationMediaCapabilities.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if mime type is not valid. |
build
public ApplicationMediaCapabilities build ()
Builds a ApplicationMediaCapabilities object.
| Returns | |
|---|---|
ApplicationMediaCapabilities |
a new ApplicationMediaCapabilities instance successfully initialized
with all the parameters set on this Builder.
This value cannot be null. |
| Throws | |
|---|---|
UnsupportedOperationException |
if the parameters set on the
Builder were incompatible, or if they
are not supported by the
device. |