Added in API level 16

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 MediaFormat of the track.

open String!

Gets the language code of the track.

open Int

Gets the track type.

open String

open Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Constants

MEDIA_TRACK_TYPE_AUDIO

Added in API level 16
static val MEDIA_TRACK_TYPE_AUDIO: Int
Value: 2

MEDIA_TRACK_TYPE_METADATA

Added in API level 23
static val MEDIA_TRACK_TYPE_METADATA: Int
Value: 5

MEDIA_TRACK_TYPE_SUBTITLE

Added in API level 21
static val MEDIA_TRACK_TYPE_SUBTITLE: Int
Value: 4

MEDIA_TRACK_TYPE_TIMEDTEXT

Added in API level 16
static val MEDIA_TRACK_TYPE_TIMEDTEXT: Int
Value: 3

MEDIA_TRACK_TYPE_UNKNOWN

Added in API level 16
static val MEDIA_TRACK_TYPE_UNKNOWN: Int
Value: 0

MEDIA_TRACK_TYPE_VIDEO

Added in API level 16
static val MEDIA_TRACK_TYPE_VIDEO: Int
Value: 1

Public methods

describeContents

Added in API level 16
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

Added in API level 19
open fun getFormat(): MediaFormat!

Gets the MediaFormat of the track. If the format is unknown or could not be determined, null is returned.

getLanguage

Added in API level 16
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.

toString

Added in API level 16
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 16
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