TrackInfo
open class TrackInfo : Parcelable
kotlin.Any | |
↳ | android.media.MediaPlayer.TrackInfo |
Class for MediaPlayer to return each audio/video/subtitle track's metadata.
Summary
Constants | |
---|---|
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int |
Inherited constants | |
---|---|
Public methods | |
---|---|
open Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
open MediaFormat! |
Gets the |
open String! |
Gets the language code of the track. |
open Int |
Gets the track type. |
open String |
toString() |
open Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Constants
MEDIA_TRACK_TYPE_TIMEDTEXT
static val MEDIA_TRACK_TYPE_TIMEDTEXT: Int
Value: 3
Public methods
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int)
, the return value of this method must include the CONTENTS_FILE_DESCRIPTOR
bit.
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 |
getFormat
open fun getFormat(): MediaFormat!
Gets the MediaFormat
of the track. If the format is unknown or could not be determined, null is returned.
getLanguage
open fun getLanguage(): String!
Gets the language code of the track.
Return | |
---|---|
String! |
a language code in either way of ISO-639-1 or ISO-639-2. When the language is unknown or could not be determined, ISO-639-2 language code, "und", is returned. |
getTrackType
open fun getTrackType(): Int
Gets the track type.
Return | |
---|---|
Int |
TrackType which indicates if the track is video, audio, timed text. Value is android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_UNKNOWN , android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_VIDEO , android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_AUDIO , android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_TIMEDTEXT , android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_SUBTITLE , or android.media.MediaPlayer.TrackInfo#MEDIA_TRACK_TYPE_METADATA |
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: The Parcel in which the object should be written. 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 |