Sequenceablepublic final class AVMetadata extends Object implements Sequenceable
You can use this class to obtain metadata information about a media item.
SystemCapability.Multimedia#MEDIA| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
AVMetadata.AVLongKey |
Enumerates the keys for long values in the media metadata.
|
static interface |
AVMetadata.AVPixelMapKey |
Enumerates the keys for
PixelMap values in the media metadata. |
static interface |
AVMetadata.AVTextKey |
Enumerates the keys for text values in the media metadata.
|
static class |
AVMetadata.Builder |
Builder class used to create
AVMetadata objects. |
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<AVMetadata> |
CREATOR |
Indicates a creator to generate an
AVMetadata instance from a Parcel. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
AVDescription |
getAVDescription() |
Obtains the brief description of this
AVMetadata object. |
Set<String> |
getKeysSet() |
Obtains a set of available string keys contained in the media metadata.
|
long |
getLong(String key) |
Obtains the long value of the specified key in the media metadata.
|
PixelMap |
getPixelMap(String key) |
Obtains the
PixelMap value of the specified key in the media metadata. |
String |
getString(String key) |
Obtains the string value of the specified key in the media metadata.
|
CharSequence |
getText(String key) |
Obtains the
CharSequence value of the specified key in the media metadata. |
boolean |
hasKey(String key) |
Checks whether the specified key is contained in the media metadata.
|
boolean |
marshalling(Parcel in) |
Writes an
AVMetadata object from a Parcel. |
boolean |
unmarshalling(Parcel in) |
Restores an
AVMetadata object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<AVMetadata> CREATOR
AVMetadata instance from a Parcel.public boolean hasKey(String key)
key - Indicates the key.true if it exists; returns false otherwise.public CharSequence getText(String key)
CharSequence value of the specified key in the media metadata.key - Indicates the key, which can be one defined in AVMetadata.AVTextKey
or a custom key you have defined.null if the key does not exist.public String getString(String key)
key - Indicates the key, which can be one defined in AVMetadata.AVTextKey
or a custom key you have defined.null if the key does not exist.public long getLong(String key)
key - Indicates the key, which can be one defined in AVMetadata.AVLongKey
or a custom key you have defined.0L if the key does not exist.public Set<String> getKeysSet()
public PixelMap getPixelMap(String key)
PixelMap value of the specified key in the media metadata.key - Indicates the key, which can be one defined in AVMetadata.AVPixelMapKey
or a custom key you have defined.null if the key does not exist.public AVDescription getAVDescription()
AVMetadata object. For details, see AVDescription.public boolean marshalling(Parcel in)
AVMetadata object from a Parcel.marshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the AVMetadata object will be written.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
AVMetadata object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the AVMetadata object has been written.true if the unmarshalling is successful; returns false otherwise.