MediaItemInfo
class MediaItemInfo : Parcelable
| kotlin.Any | |
| ↳ | android.media.metrics.MediaItemInfo |
Represents information about a piece of media (for example, an audio or video file).
Summary
| Nested classes | |
|---|---|
|
Builder for |
|
| Constants | |
|---|---|
| static Long |
The media item includes audio data. |
| static Long |
The media item includes depth (z-distance) information. |
| static Long |
The media item includes gain map information (for example, an Ultra HDR gain map). |
| static Long |
The media item includes gapless audio metadata. |
| static Long |
The media item includes high dynamic range (HDR) video. |
| static Long |
The media item includes high frame rate video data. |
| static Long |
The media item includes image data. |
| static Long |
The media item includes static media container metadata (for example, capture frame rate or location information). |
| static Long |
The media item includes spatial audio data. |
| static Long |
The media item includes time-dependent speed information (for example, slow motion cue points). |
| static Long |
The media item includes video data. |
| static Int |
The media item came directly from camera capture. |
| static Int |
The media item was output by a previous editing session. |
| static Int |
The media item came from the device gallery. |
| static Int |
The media item was generated by another system. |
| static Int |
The media item is stored on the local device's file system. |
| static Int |
The media item is a remote file (for example, it's loaded from an HTTP server). |
| static Int |
The media item is a remotely-served live stream. |
| static Int |
The media item's source is not known. |
| static Int |
Special value for numerical fields where the value was not specified. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean |
Indicates whether some other object is "equal to" this one. |
| Int |
Returns the number of audio channels, or |
| Long |
Returns the number of audio frames in the item, after clipping (if applicable), or |
| Int |
Returns the sample rate of audio, in Hertz, or |
| Long |
Returns the duration of the clip taken from the media item, in milliseconds, or |
| MutableList<String!> |
Returns the media codec names for codecs that were used as part of encoding/decoding this media item, or an empty list if not known or not applicable. |
| String? |
Returns the MIME type of the media container, or |
| Long |
Returns the data types that are present in the media item. |
| Long |
Returns the duration of the media item, in milliseconds, or |
| MutableList<String!> |
Returns the MIME types of samples stored in the media container, or an empty list if not known. |
| Int |
Returns where the media item came from, or |
| Int |
Returns the data space for video, as a packed integer. |
| Float |
Returns the average video frame rate, in frames per second, or |
| Long |
Returns the number of video frames, aftrer clipping (if applicable), or |
| Size |
Returns the video size, in pixels, or a |
| Int |
hashCode() |
| String |
toString()Returns a string representation of the object. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<MediaItemInfo!> | |
Constants
DATA_TYPE_AUDIO
static val DATA_TYPE_AUDIO: Long
The media item includes audio data.
Value: 4LDATA_TYPE_DEPTH
static val DATA_TYPE_DEPTH: Long
The media item includes depth (z-distance) information.
Value: 16LDATA_TYPE_GAIN_MAP
static val DATA_TYPE_GAIN_MAP: Long
The media item includes gain map information (for example, an Ultra HDR gain map).
Value: 32LDATA_TYPE_GAPLESS
static val DATA_TYPE_GAPLESS: Long
The media item includes gapless audio metadata.
Value: 256LDATA_TYPE_HIGH_DYNAMIC_RANGE_VIDEO
static val DATA_TYPE_HIGH_DYNAMIC_RANGE_VIDEO: Long
The media item includes high dynamic range (HDR) video.
Value: 1024LDATA_TYPE_HIGH_FRAME_RATE
static val DATA_TYPE_HIGH_FRAME_RATE: Long
The media item includes high frame rate video data.
Value: 64LDATA_TYPE_IMAGE
static val DATA_TYPE_IMAGE: Long
The media item includes image data.
Value: 1LDATA_TYPE_METADATA
static val DATA_TYPE_METADATA: Long
The media item includes static media container metadata (for example, capture frame rate or location information).
Value: 8LDATA_TYPE_SPATIAL_AUDIO
static val DATA_TYPE_SPATIAL_AUDIO: Long
The media item includes spatial audio data.
Value: 512LDATA_TYPE_SPEED_SETTING_CUE_POINTS
static val DATA_TYPE_SPEED_SETTING_CUE_POINTS: Long
The media item includes time-dependent speed information (for example, slow motion cue points).
Value: 128LDATA_TYPE_VIDEO
static val DATA_TYPE_VIDEO: Long
The media item includes video data.
Value: 2LSOURCE_TYPE_CAMERA
static val SOURCE_TYPE_CAMERA: Int
The media item came directly from camera capture.
Value: 2SOURCE_TYPE_EDITING_SESSION
static val SOURCE_TYPE_EDITING_SESSION: Int
The media item was output by a previous editing session.
Value: 3SOURCE_TYPE_GALLERY
static val SOURCE_TYPE_GALLERY: Int
The media item came from the device gallery.
Value: 1SOURCE_TYPE_GENERATED
static val SOURCE_TYPE_GENERATED: Int
The media item was generated by another system.
Value: 7SOURCE_TYPE_LOCAL_FILE
static val SOURCE_TYPE_LOCAL_FILE: Int
The media item is stored on the local device's file system.
Value: 4SOURCE_TYPE_REMOTE_FILE
static val SOURCE_TYPE_REMOTE_FILE: Int
The media item is a remote file (for example, it's loaded from an HTTP server).
Value: 5SOURCE_TYPE_REMOTE_LIVE_STREAM
static val SOURCE_TYPE_REMOTE_LIVE_STREAM: Int
The media item is a remotely-served live stream.
Value: 6SOURCE_TYPE_UNSPECIFIED
static val SOURCE_TYPE_UNSPECIFIED: Int
The media item's source is not known.
Value: 0VALUE_UNSPECIFIED
static val VALUE_UNSPECIFIED: Int
Special value for numerical fields where the value was not specified.
Value: -1Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
The equals method implements an equivalence relation on non-null object references:
- It is reflexive: for any non-null reference value
x,x.equals(x)should returntrue. - It is symmetric: for any non-null reference values
xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any non-null reference values
x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue. - It is consistent: for any non-null reference values
xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified. - For any non-null reference value
x,x.equals(null)should returnfalse.
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
o |
This value may be null. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getAudioChannelCount
fun getAudioChannelCount(): Int
Returns the number of audio channels, or VALUE_UNSPECIFIED if not specified.
getAudioSampleCount
fun getAudioSampleCount(): Long
Returns the number of audio frames in the item, after clipping (if applicable), or VALUE_UNSPECIFIED if not specified.
getAudioSampleRateHz
fun getAudioSampleRateHz(): Int
Returns the sample rate of audio, in Hertz, or VALUE_UNSPECIFIED if not specified.
getClipDurationMillis
fun getClipDurationMillis(): Long
Returns the duration of the clip taken from the media item, in milliseconds, or VALUE_UNSPECIFIED if not specified.
getCodecNames
fun getCodecNames(): MutableList<String!>
Returns the media codec names for codecs that were used as part of encoding/decoding this media item, or an empty list if not known or not applicable.
| Return | |
|---|---|
MutableList<String!> |
This value cannot be null. |
getContainerMimeType
fun getContainerMimeType(): String?
Returns the MIME type of the media container, or null if unspecified.
getDataTypes
fun getDataTypes(): Long
Returns the data types that are present in the media item.
getDurationMillis
fun getDurationMillis(): Long
Returns the duration of the media item, in milliseconds, or VALUE_UNSPECIFIED if not specified.
getSampleMimeTypes
fun getSampleMimeTypes(): MutableList<String!>
Returns the MIME types of samples stored in the media container, or an empty list if not known.
| Return | |
|---|---|
MutableList<String!> |
This value cannot be null. |
getSourceType
fun getSourceType(): Int
Returns where the media item came from, or SOURCE_TYPE_UNSPECIFIED if not specified.
getVideoDataSpace
fun getVideoDataSpace(): Int
Returns the data space for video, as a packed integer.
getVideoFrameRate
fun getVideoFrameRate(): Float
Returns the average video frame rate, in frames per second, or VALUE_UNSPECIFIED if not specified.
getVideoSampleCount
fun getVideoSampleCount(): Long
Returns the number of video frames, aftrer clipping (if applicable), or VALUE_UNSPECIFIED if not specified.
getVideoSize
fun getVideoSize(): Size
Returns the video size, in pixels, or a Size with width and height set to VALUE_UNSPECIFIED if not specified.
| Return | |
|---|---|
Size |
This value cannot be null. |
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
This value cannot be null. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |