The OTVTrackInfo class contains additional information about video tracks, each representing a video Adaptation Set extracted from the stream’s manifest. It provides the following methods:
-
isActive()returnstruefor the selected track, andfalsefor all other video tracks in the list -
getName()provides a string describing the track (which may be simply the language) -
getLanguage()provides the language code string in either way of ISO-639-1 or ISO-639-2 -
getEncodeType()always returns 0 for video tracks - the codecs of the underlying video tracks must be retrieved viaOTVVideoTrackInfo.getCodecs()- a list of the track’s underlyingOTVVideoTrackInfoobjects is retrieved via thegetVideoTrackInfos()method -
getCharacteristics()returns a string of track characteristics as advertised in some HLS streams. -
getMimeType()will return the MIME type for the track -
getAudioChannelCount()will return-1for video tracks -
getVideoTrackInfos()returns a list ofOTVVideoTrackInfoobjects. EachOTVVideoTrackInfoobject corresponds to one of the video Representations belonging to the Adaptation Set for which thisOTVTrackInfoholds information. Each Representation - and therefore eachOTVVideoTrackInfo- may contain data on resolution, bitrate, framerate and aspect ratio.
The OTVVideoTrackInfo class contains the following methods for retrieving data about a Representation:
-
getBitrate()returns the video Representation’s bitrate -
getWidth()returns the video Representation’s width in pixels -
getHeight()returns the video Representation’s height in pixels -
getFrameRate()returns the video Representation’s framerate -
getCodecs()returns a string listing the video Representation’s codecs ornullif unknown -
getPixelWidthHeightRatio()returns the video Representation’s floating-point width-to-height ratio, or 1.0 if unknown