close
The Wayback Machine - https://web.archive.org/web/20160520121234/https://developer.android.com/reference/android/media/tv/TvTrackInfo.html
Skip to content

Most visited

Recently visited

navigation
Added in API level 21

TvTrackInfo

public final class TvTrackInfo
extends Object implements Parcelable

java.lang.Object
   ↳ android.media.tv.TvTrackInfo


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.

Inherited constants

BERJAYAFrom 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 CharSequence getDescription()

Returns a user readable description for the current track.

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 float getVideoPixelAspectRatio()

Returns the pixel aspect ratio (the ratio of a pixel's width to its height) of the video.

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.

Inherited methods

BERJAYAFrom class java.lang.Object
BERJAYAFrom interface android.os.Parcelable

Constants

TYPE_AUDIO

Added in API level 21
int TYPE_AUDIO

The type value for audio tracks.

Constant Value: 0 (0x00000000)

TYPE_SUBTITLE

Added in API level 21
int TYPE_SUBTITLE

The type value for subtitle tracks.

Constant Value: 2 (0x00000002)

TYPE_VIDEO

Added in API level 21
int TYPE_VIDEO

The type value for video tracks.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 21
Creator<TvTrackInfo> CREATOR

Public methods

describeContents

Added in API level 21
int describeContents ()

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

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

getAudioChannelCount

Added in API level 21
int getAudioChannelCount ()

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

Returns
int

getAudioSampleRate

Added in API level 21
int getAudioSampleRate ()

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

Returns
int

getDescription

Added in API level 23
CharSequence getDescription ()

Returns a user readable description for the current track.

Returns
CharSequence

getExtra

Added in API level 21
Bundle getExtra ()

Returns the extra information about the current track.

Returns
Bundle

getId

Added in API level 21
String getId ()

Returns the ID of the track.

Returns
String

getLanguage

Added in API level 21
String getLanguage ()

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.

Returns
String

getType

Added in API level 21
int getType ()

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

Returns
int

getVideoFrameRate

Added in API level 21
float getVideoFrameRate ()

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

Returns
float

getVideoHeight

Added in API level 21
int getVideoHeight ()

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

Returns
int

getVideoPixelAspectRatio

Added in API level 23
float getVideoPixelAspectRatio ()

Returns the pixel aspect ratio (the ratio of a pixel's width to its height) of the video. Valid only for TYPE_VIDEO tracks.

Returns
float

getVideoWidth

Added in API level 21
int getVideoWidth ()

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

Returns
int

writeToParcel

Added in API level 21
void writeToParcel (Parcel dest, 
                int flags)

Used to package this object into a Parcel.

Parameters
dest Parcel: The Parcel to be written.
flags int: The flags used for parceling.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.