public static final class AVMetadata.Builder extends Object
AVMetadata objects.| 构造器 | 说明 |
|---|---|
Builder() |
Default constructor used to create a
Builder instance. |
Builder(AVMetadata source) |
A constructor used to create a
Builder instance based on the specified AVMetadata instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
AVMetadata |
build() |
Creates an
AVMetadata instance. |
AVMetadata.Builder |
setLong(String key,
long value) |
Adds a long value to the media metadata.
|
AVMetadata.Builder |
setPixelMap(String key,
PixelMap value) |
Adds a
PixelMap to the media metadata. |
AVMetadata.Builder |
setString(String key,
String value) |
Adds a string value to the media metadata.
|
AVMetadata.Builder |
setText(String key,
CharSequence value) |
Adds a
CharSequence value to the media metadata. |
public Builder()
Builder instance.public Builder(AVMetadata source)
Builder instance based on the specified AVMetadata instance.source - Indicates the AVMetadata instance.public AVMetadata.Builder setText(String key, CharSequence value)
CharSequence value to the media metadata.key - Indicates the key of the value to be added. You can use one defined
in AVMetadata.AVTextKey or a custom key.value - Indicates the string value.Builder instance of this AVMetadata.IllegalArgumentException - Throws this exception if the key is in any of in the following types:
AVMetadata.AVLongKey, AVMetadata.AVPixelMapKey.public AVMetadata.Builder setString(String key, String value)
key - Indicates the key of the value to be added. You can use one defined
in AVMetadata.AVTextKey or a custom key.value - Indicates the string value.Builder instance of this AVMetadata.IllegalArgumentException - Throws this exception if the key is in any of the following types:
AVMetadata.AVLongKey, AVMetadata.AVPixelMapKey.public AVMetadata.Builder setLong(String key, long value)
key - Indicates the key of the value to be added. You can use one defined
in AVMetadata.AVLongKey, or customize a key.value - Indicates the long value.Builder instance of this AVMetadata.IllegalArgumentException - Throws this exception if the key is in any of the following types:
AVMetadata.AVTextKey, AVMetadata.AVPixelMapKey.public AVMetadata.Builder setPixelMap(String key, PixelMap value)
PixelMap to the media metadata.key - Indicates the key of the PixelMap. You can use one defined
in AVMetadata.AVPixelMapKey or a custom key.value - Indicates the PixelMap.Builder instance of this AVMetadata.IllegalArgumentException - Throws this exception if the key is in any of the following types:
AVMetadata.AVLongKey, AVMetadata.AVTextKey.public AVMetadata build()
AVMetadata instance.AVMetadata instance.