Android OpenTV Player SDK  5.14.1.1626112806
OTVTrackInfo Class Reference

Detailed Description

Class for MediaPlayer to return each audio/video/subtitle track's metadata.

See also
android.media.MediaPlayer::getTrackInfo

Public Member Functions

int getTrackType ()
 Gets the track type. More...
 
int getEncodeType ()
 Gets the track encode type. More...
 
String getName ()
 Gets the name of the track. More...
 
String getLanguage ()
 Gets the language code of the track. More...
 
boolean getActive ()
 Gets the track status. More...
 
boolean isActive ()
 Returns the track status. More...
 
String getCharacteristics ()
 Get the Uniform Type Identifiers(UTI) of the current track which is defined in rfc-8216. More...
 
List< OTVVideoTrackInfo > getVideoTrackInfos ()
 If the track type is MEDIA_TRACK_TYPE_VIDEO, this will return video information for each of the underlying tracks e.g. More...
 
String toString ()
 Returns a string containing a concise, human-readable description of this object. More...
 

Static Public Attributes

static final int MEDIA_TRACK_TYPE_UNKNOWN = 0
 Unknown track type. More...
 
static final int MEDIA_TRACK_TYPE_VIDEO = 1
 Video track type. More...
 
static final int MEDIA_TRACK_TYPE_AUDIO = 2
 Audio track type. More...
 
static final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3
 Timed text track type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_DVB_BITMAP = 0
 DVB bitmap subtitle encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_EIA_608 = 1
 EIA CC608 encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_EIA_708 = 2
 EIA CC708 encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_ID3 = 3
 ID3 subtitle encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_WEBVTT = 4
 Webvtt subtitle encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_SRT = 5
 SRT encoding type. More...
 
static final int SUBTITLE_TRACK_ENCODING_TYPE_SMPTE = 6
 SMPTE encoding type. More...
 
static final int VIDEO_TRACK_ENCODING_TYPE_AVC = 0
 Advanced Video Coding/H.264, as specified by MPEG-4 Part 10 (ISO/IEC 14496-10) More...
 
static final int AUDIO_TRACK_ENCODING_TYPE_AAC = 0
 Advanced Audio Coding, as specified by MPEG-4 Part 3 (ISO/IEC_14496-3) More...
 

Package Functions

void setIndex (int rendererIndex, int groupIndex, int trackIndex)
 Set index for the track. More...
 
int rendererIndex ()
 return the renderer Index of track More...
 
int groupIndex ()
 return the group index of track More...
 
int trackIndex ()
 return the index of track More...
 

Member Function Documentation

◆ getActive()

boolean getActive ( )

Gets the track status.

Returns
whether the track is active or not.
Deprecated:
please use isActive()

◆ getCharacteristics()

String getCharacteristics ( )

Get the Uniform Type Identifiers(UTI) of the current track which is defined in rfc-8216.

For HLS stream, returns the characteristics information of the rendition. For DASH stream, maps stream adaptation accessibility descriptor to UTI, and returns it.

Returns
track characteristics which is defined in rfc-8216, When the characteristics is unknown the empty string is returned.

◆ getEncodeType()

int getEncodeType ( )

Gets the track encode type.

Returns
encode Type which indicates:
  • subtitle track: which encoding type if the subtitle track is dvd bitmap,cc608, cc708, id3, webvtt.
  • audio track: which encoding type if the subtitle track is aac.
  • video track: which encoding type if the subtitle track is avc.

◆ getLanguage()

String getLanguage ( )

Gets the language code of the track.

Returns
a language code in either way of ISO-639-1 or ISO-639-2.
When the language is unknown or could not be determined,
"und", is returned.

◆ getName()

String getName ( )

Gets the name of the track.

Returns
the value of NAME attribute of the track.
When the name is unknown or could not be determined, empty string is returned.

◆ getTrackType()

int getTrackType ( )

Gets the track type.

Returns
TrackType which indicates if the track is video, audio, timed text.

◆ getVideoTrackInfos()

List<OTVVideoTrackInfo> getVideoTrackInfos ( )

If the track type is MEDIA_TRACK_TYPE_VIDEO, this will return video information for each of the underlying tracks e.g.

resolutions, bitrates; otherwise it will return null

Returns
List of OTVVideoTrackInfo objects if track type is MEDIA_TRACK_TYPE_VIDEO; otherwise null

◆ groupIndex()

int groupIndex ( )
package

return the group index of track

◆ isActive()

boolean isActive ( )

Returns the track status.

Returns
whether the track is active or not.

◆ rendererIndex()

int rendererIndex ( )
package

return the renderer Index of track

◆ setIndex()

void setIndex ( int  rendererIndex,
int  groupIndex,
int  trackIndex 
)
package

Set index for the track.

◆ toString()

String toString ( )

Returns a string containing a concise, human-readable description of this object.

◆ trackIndex()

int trackIndex ( )
package

return the index of track

Member Data Documentation

◆ AUDIO_TRACK_ENCODING_TYPE_AAC

final int AUDIO_TRACK_ENCODING_TYPE_AAC = 0
static

Advanced Audio Coding, as specified by MPEG-4 Part 3 (ISO/IEC_14496-3)

◆ MEDIA_TRACK_TYPE_AUDIO

final int MEDIA_TRACK_TYPE_AUDIO = 2
static

Audio track type.

◆ MEDIA_TRACK_TYPE_TIMEDTEXT

final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3
static

Timed text track type.

◆ MEDIA_TRACK_TYPE_UNKNOWN

final int MEDIA_TRACK_TYPE_UNKNOWN = 0
static

Unknown track type.

◆ MEDIA_TRACK_TYPE_VIDEO

final int MEDIA_TRACK_TYPE_VIDEO = 1
static

Video track type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_DVB_BITMAP

final int SUBTITLE_TRACK_ENCODING_TYPE_DVB_BITMAP = 0
static

DVB bitmap subtitle encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_EIA_608

final int SUBTITLE_TRACK_ENCODING_TYPE_EIA_608 = 1
static

EIA CC608 encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_EIA_708

final int SUBTITLE_TRACK_ENCODING_TYPE_EIA_708 = 2
static

EIA CC708 encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_ID3

final int SUBTITLE_TRACK_ENCODING_TYPE_ID3 = 3
static

ID3 subtitle encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_SMPTE

final int SUBTITLE_TRACK_ENCODING_TYPE_SMPTE = 6
static

SMPTE encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_SRT

final int SUBTITLE_TRACK_ENCODING_TYPE_SRT = 5
static

SRT encoding type.

◆ SUBTITLE_TRACK_ENCODING_TYPE_WEBVTT

final int SUBTITLE_TRACK_ENCODING_TYPE_WEBVTT = 4
static

Webvtt subtitle encoding type.

◆ VIDEO_TRACK_ENCODING_TYPE_AVC

final int VIDEO_TRACK_ENCODING_TYPE_AVC = 0
static

Advanced Video Coding/H.264, as specified by MPEG-4 Part 10 (ISO/IEC 14496-10)