public
final
class
TvTrackInfo
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.media.tv.TvTrackInfo |
Encapsulates the format of tracks played in TvInputService.
Nested classes | |
|---|---|
class |
TvTrackInfo.Builder
A builder class for creating |
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 |
|---|
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 |
Inherited methods | |
|---|---|
java.lang.Object
| |
android.os.Parcelable
| |
int TYPE_AUDIO
The type value for audio tracks.
Constant Value: 0 (0x00000000)
int TYPE_SUBTITLE
The type value for subtitle tracks.
Constant Value: 2 (0x00000002)
int TYPE_VIDEO
The type value for video tracks.
Constant Value: 1 (0x00000001)
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. |
int getAudioChannelCount ()
Returns the audio channel count. Valid only for TYPE_AUDIO tracks.
| Returns | |
|---|---|
int |
|
int getAudioSampleRate ()
Returns the audio sample rate, in the unit of Hz. Valid only for TYPE_AUDIO tracks.
| Returns | |
|---|---|
int |
|
CharSequence getDescription ()
Returns a user readable description for the current track.
| Returns | |
|---|---|
CharSequence |
|
Bundle getExtra ()
Returns the extra information about the current track.
| Returns | |
|---|---|
Bundle |
|
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 |
|
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 |
|
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 |
|
int getVideoHeight ()
Returns the height of the video, in the unit of pixels. Valid only for TYPE_VIDEO
tracks.
| Returns | |
|---|---|
int |
|
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 |
|
int getVideoWidth ()
Returns the width of the video, in the unit of pixels. Valid only for TYPE_VIDEO
tracks.
| Returns | |
|---|---|
int |
|
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.
|