<VOCommonPlayerAssetSelection > Protocol Reference

#import <VOCommonPlayerAssetSelection.h>

+ Inheritance diagram for <VOCommonPlayerAssetSelection >:

Instance Methods

(int) - getVideoCount
 Get the number of available video tracks. More...
 
(int) - getAudioCount
 Get the number of available audio tracks. More...
 
(int) - getSubtitleCount
 Get the number of available subtitle tracks. More...
 
(VO_OSMP_RETURN_CODE) - selectVideo:
 Select video track using its index. More...
 
(VO_OSMP_RETURN_CODE) - selectAudio:
 Select audio track using its index. More...
 
(VO_OSMP_RETURN_CODE) - selectSubtitle:
 Select subtitle track using its index. More...
 
(bool) - isVideoAvailable:
 Check if specified video track is available. More...
 
(bool) - isAudioAvailable:
 Check if specified audio track is available. More...
 
(bool) - isSubtitleAvailable:
 Check if specified subtitle track is available. More...
 
(VO_OSMP_RETURN_CODE) - commitSelection
 Commit all current asset selections. More...
 
(VO_OSMP_RETURN_CODE) - clearSelection
 Clear all current uncommitted selections. More...
 
(id< VOOSMPAssetProperty >) - getVideoProperty:
 Get the properties of specified video track. More...
 
(id< VOOSMPAssetProperty >) - getAudioProperty:
 Get the properties of specified audio track. More...
 
(id< VOOSMPAssetProperty >) - getSubtitleProperty:
 Get the properties of specified subtitle track. More...
 
(id< VOOSMPAssetIndex >) - getPlayingAsset
 Get the actual indices of video/audio/subtitle tracks that are being played. More...
 
(id< VOOSMPAssetIndex >) - getCurrentSelection
 Get the current track selection of video/audio/subtitle. More...
 
(VO_OSMP_RETURN_CODE) - setDefaultAudioLanguage:
 Set the default audio language. More...
 
(VO_OSMP_RETURN_CODE) - setDefaultSubtitleLanguage:
 Set the default subtitle language. More...
 
(VO_OSMP_RETURN_CODE) - setPreferredAudioLanguage:
 Set the preferred audio language. More...
 
(VO_OSMP_RETURN_CODE) - setPreferredSubtitleLanguage:
 Set the preferred subtitle language. More...
 

Method Documentation

- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) clearSelection

Clear all current uncommitted selections.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) commitSelection

Commit all current asset selections.

If any asset type is not selected, the player uses the asset type of track that is being played. This operation removes all current selections after being committed.

Returns
VO_OSMP_ERR_NONE if successful
- (int VOCommonPlayerAssetSelection) getAudioCount

Get the number of available audio tracks.

An audio track is referred to as a combination of language and codec type. An audio track may have multiple audio bitrates. The final playback bitrate relies on the selected video track.

Returns
number of available audio tracks; -1 if unsuccessful.
- (id<VOOSMPAssetProperty> VOCommonPlayerAssetSelection) getAudioProperty: (int)  index

Get the properties of specified audio track.

Parameters
index[in] Index of audio track property. This value is valid from 0 to VOOSMPAssetProperty#getPropertyCount - 1.
Returns
a VOOSMPAssetProperty object if successful or nil if failed. Returned object holds a list of key-value pairs where both key and value are of NSString* type. Supported property keys are: "description" @"language" @"codec" @"bitrate" @"channelcount"
- (id<VOOSMPAssetIndex> VOCommonPlayerAssetSelection) getCurrentSelection

Get the current track selection of video/audio/subtitle.

If a track is selected automatically, the corresponding index in VOOSMPAssetIndex is set to VO_OSMP_ASSET_AUTO_SELECTED. If a track is being manually selected, its index is returned through VOOSMPAssetIndex. If no track of a specific type is being selected automatically/manually, the corresponding index in VOOSMPAssetIndex is set to VO_OSMP_ASSET_NOT_SELECTED.

Returns
a VOOSMPAssetIndex object if successful or nil if failed. Returned object holds the current index values of the selected video, audio, and subtitle tracks.
- (id<VOOSMPAssetIndex> VOCommonPlayerAssetSelection) getPlayingAsset

Get the actual indices of video/audio/subtitle tracks that are being played.

If a track is being played, its index is returned through VOOSMPAssetIndex. If no track of a specific type (mostly likely subtitle) is being played, the corresponding index in VOOSMPAssetIndex is set to VO_OSMP_ASSET_NOT_SELECTED.

Returns
a VOOSMPAssetIndex object if successful or nil if failed. Returns the actual indices of video/audio/subtitle tracks that are being played.
- (int VOCommonPlayerAssetSelection) getSubtitleCount

Get the number of available subtitle tracks.

Returns
number of available subtitle tracks; -1 if unsuccessful
- (id<VOOSMPAssetProperty> VOCommonPlayerAssetSelection) getSubtitleProperty: (int)  index

Get the properties of specified subtitle track.

Parameters
index[in] Index of subtitle track property. This value is valid from 0.
Returns
a VOOSMPAssetProperty object if successful or nil if failed. Returned object holds a list of key-value pairs where both key and value are of NSString* type.
Supported property keys are: "description" @"language" @"type"

The value of "type" is one of the following: Undefined, CC608, CC708, TTML, SSTTML, WEBVTT, DVB, SRT, SMI, LRC, SMPTETT, or ENVIVO.

- (int VOCommonPlayerAssetSelection) getVideoCount

Get the number of available video tracks.

A video track is referred to as a combination of bitrate and camera angle (combination of internal stream and video track).

Returns
number of available video tracks; -1 if unsuccessful
- (id<VOOSMPAssetProperty> VOCommonPlayerAssetSelection) getVideoProperty: (int)  index

Get the properties of specified video track.

Parameters
index[in] Index of video track property. This value is valid from 0 to VOOSMPAssetProperty#getPropertyCount - 1.
Returns
a VOOSMPAssetProperty object if successful or nil if failed. Returned object holds a list of key-value pairs where both key and value are of NSString* type.
Supported property keys are: "description" @"codec" @"bitrate" @"width" @"height"
- (bool VOCommonPlayerAssetSelection) isAudioAvailable: (int)  index

Check if specified audio track is available.

Parameters
index[in] Index of audio track. This value is valid from 0 to VOCommonPlayerAssetSelection#getAudioCount - 1. The availability of audio tracks relies on the current selection of uncommitted video and subtitle tracks.
Returns
true if specified video stream is available; false if not
- (bool VOCommonPlayerAssetSelection) isSubtitleAvailable: (int)  index

Check if specified subtitle track is available.

Parameters
index[in] Index of subtitle track. This value is valid from 0 to VOCommonPlayerAssetSelection#getSubtitleCount - 1. The availability of subtitle tracks relies on the current selection of uncommitted video and audio tracks.
Returns
true if specified video stream is available; false if not
- (bool VOCommonPlayerAssetSelection) isVideoAvailable: (int)  index

Check if specified video track is available.

Parameters
index[in] Index of video track. This value is valid from 0 to VOCommonPlayerAssetSelection#getVideoCount - 1. The availability of video track relies on the current selection of uncommitted audio and subtitle tracks.
Returns
true if specified video stream is available; false if not
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) selectAudio: (int)  index

Select audio track using its index.

Parameters
index[in] Index of audio track. This value is valid from 0. The availability of audio tracks relies on the current selection of uncommitted video and subtitle tracks.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) selectSubtitle: (int)  index

Select subtitle track using its index.

Parameters
index[in] Index of subtitle track. This value is valid from 0. The availability of subtitle selections relies on the current selection of uncommitted video and audio selections.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) selectVideo: (int)  index

Select video track using its index.

selectVideo(-1) enables automatic bitrate adaptation.

Parameters
index[in] The index of video track. This value is valid from 0 to VOCommonPlayerAssetSelection#getVideoCount - 1. Use VO_OSMP_ASSET_AUTO_SELECTED to indicate auto-select. The availability of video tracks relies on the current selection of uncommitted audio and subtitle tracks.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) setDefaultAudioLanguage: (NSString *)  type

Set the default audio language.

Parameters
type[in] Language type following definition of ISO 639-2. For example, "fre" represents French.
Returns
VO_OSMP_ERR_NONE if successful
Deprecated:
This method is replaced by VOCommonPlayerAssetSelection#setPreferredAudioLanguage: and will be removed in the future.
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) setDefaultSubtitleLanguage: (NSString *)  type

Set the default subtitle language.

Parameters
type[in] Language type following definition of ISO 639-2. For example, "fre" represents French.
Returns
VO_OSMP_ERR_NONE if successful
Deprecated:
This method is replaced by VOCommonPlayerAssetSelection#setPreferredSubtitleLanguage: and will be removed in the future.
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) setPreferredAudioLanguage: (NSArray *)  languageList

Set the preferred audio language.

Inactive for VOOSMPStreamingDownloader

Parameters
languageList[in] a list of preferred audio language using ISO 639-1 and ISO 639-2 code. For example, "fr" and "fra" represent French. Based on the order of languages specified in the list, the player selects the first available language in the stream. If the list is empty, the player selects it based on the streaming specification.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerAssetSelection) setPreferredSubtitleLanguage: (NSArray *)  languageList

Set the preferred subtitle language.

Inactive for VOOSMPStreamingDownloader

Parameters
languageList[in] a list of preferred subtitle language using ISO 639-2 code. For example, "fre" represents French. Based on the order of languages specified in the list, the player selects the first available language in the stream. If the list is empty, the player selects it based on the streaming specification.
Returns
VO_OSMP_ERR_NONE if successful

The documentation for this protocol was generated from the following file: