Android APIs
public final class

TvTrackInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.media.tv.TvTrackInfo

Class Overview

Encapsulates the format of tracks played in TvInputService.

Summary

Nested Classes
class TvTrackInfo.Builder A builder class for creating TvTrackInfo objects. 
Constants
int TYPE_AUDIO The type value for audio tracks.
int TYPE_SUBTITLE The type value for subtitle tracks.
int TYPE_VIDEO The type value for video tracks.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<TvTrackInfo> CREATOR
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
final int getAudioChannelCount()
Returns the audio channel count.
final int getAudioSampleRate()
Returns the audio sample rate, in the unit of Hz.
final Bundle getExtra()
Returns the extra information about the current track.
final String getId()
Returns the ID of the track.
final String getLanguage()
Returns the language information encoded by either ISO 639-1 or ISO 639-2/T.
final int getType()
Returns the type of the track.
final float getVideoFrameRate()
Returns the frame rate of the video, in the unit of fps (frames per second).
final int getVideoHeight()
Returns the height of the video, in the unit of pixels.
final int getVideoWidth()
Returns the width of the video, in the unit of pixels.
void writeToParcel(Parcel dest, int flags)
Used to package this object into a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int TYPE_AUDIO

Added in API level 21

The type value for audio tracks.

Constant Value: 0 (0x00000000)

public static final int TYPE_SUBTITLE

Added in API level 21

The type value for subtitle tracks.

Constant Value: 2 (0x00000002)

public static final int TYPE_VIDEO

Added in API level 21

The type value for video tracks.

Constant Value: 1 (0x00000001)

Fields

public static final Creator<TvTrackInfo> CREATOR

Added in API level 21

Public Methods

public int describeContents ()

Added in API level 21

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public final int getAudioChannelCount ()

Added in API level 21

Returns the audio channel count. Valid only for TYPE_AUDIO tracks.

public final int getAudioSampleRate ()

Added in API level 21

Returns the audio sample rate, in the unit of Hz. Valid only for TYPE_AUDIO tracks.

public final Bundle getExtra ()

Added in API level 21

Returns the extra information about the current track.

public final String getId ()

Added in API level 21

Returns the ID of the track.

public final String getLanguage ()

Added in API level 21

Returns the language information encoded by either ISO 639-1 or ISO 639-2/T. If the language is unknown or could not be determined, the corresponding value will be null.

public final int getType ()

Added in API level 21

Returns the type of the track. The type should be one of the followings: TYPE_AUDIO, TYPE_VIDEO and TYPE_SUBTITLE.

public final float getVideoFrameRate ()

Added in API level 21

Returns the frame rate of the video, in the unit of fps (frames per second). Valid only for TYPE_VIDEO tracks.

public final int getVideoHeight ()

Added in API level 21

Returns the height of the video, in the unit of pixels. Valid only for TYPE_VIDEO tracks.

public final int getVideoWidth ()

Added in API level 21

Returns the width of the video, in the unit of pixels. Valid only for TYPE_VIDEO tracks.

public void writeToParcel (Parcel dest, int flags)

Added in API level 21

Used to package this object into a Parcel.

Parameters
dest The Parcel to be written.
flags The flags used for parceling.