<VOCommonPlayerControl > Protocol Reference

#import <VOCommonPlayerControl.h>

+ Inheritance diagram for <VOCommonPlayerControl >:

Instance Methods

(id) - init:initParam:
 Initialize a player instance. More...
 
(VO_OSMP_RETURN_CODE) - setView:
 Set surface view for video playback. More...
 
(VO_OSMP_RETURN_CODE) - setDisplayArea:
 Set the dimensions (rect) of the video display. More...
 
(VO_OSMP_RETURN_CODE) - notifyViewSizeChanged
 Notify the player that the view size has been changed. More...
 
(VO_OSMP_RETURN_CODE) - open:flag:sourceType:openParam:
 Open a media source. More...
 
(VO_OSMP_RETURN_CODE) - openSource:flag:
 Open a media source. More...
 
(VO_OSMP_RETURN_CODE) - close
 Close a media source. More...
 
(VO_OSMP_RETURN_CODE) - start
 Start playback. More...
 
(VO_OSMP_RETURN_CODE) - pause
 Pause playback. More...
 
(VO_OSMP_RETURN_CODE) - stop
 Stop playback. More...
 
(long) - setPosition:
 Perform the seek operation. More...
 
(long long) - setUTCPosition:
 Seek by UTC time. More...
 
(VO_OSMP_RETURN_CODE) - setVolume:
 Set playback volume. More...
 
(VO_OSMP_RETURN_CODE) - mute
 Mute the audio. More...
 
(VO_OSMP_RETURN_CODE) - unmute
 Unmute the audio. More...
 
(VO_OSMP_RETURN_CODE) - suspend:
 Suspend the player. More...
 
(VO_OSMP_RETURN_CODE) - resume
 Resume the player. More...
 
(VO_OSMP_RETURN_CODE) - setVideoAspectRatio:
 Set aspect ratio of video. More...
 
(VO_OSMP_RETURN_CODE) - redrawVideo
 Redraw the video. More...
 
(VO_OSMP_RETURN_CODE) - setOnEventDelegate:
 Set the delegation to handle SDK events. More...
 
(VO_OSMP_RETURN_CODE) - setScreenBrightness:
 Set screen display brightness. More...
 
(VO_OSMP_RETURN_CODE) - startSEINotification:
 Start periodic SEI data notifications. More...
 
(VO_OSMP_RETURN_CODE) - stopSEINotification
 Stop periodic SEI data notifications. More...
 
(id< VOOSMPImageData >) - captureVideoImage
 Capture a video image, only supported by VO_OSMP_VOME2_PLAYER. More...
 
(VO_OSMP_RETURN_CODE) - updateSourceURL:
 Update a media source. More...
 
(VO_OSMP_RETURN_CODE) - startAnalyticsNotification:filter:
 Start periodic analytics data notifications. More...
 
(VO_OSMP_RETURN_CODE) - stopAnalyticsNotification
 Stop periodic analytics data notifications. More...
 
(VO_OSMP_RETURN_CODE) - setPreference:
 Set preference for playback. More...
 
(VO_OSMP_RETURN_CODE) - destroy
 Delete the player instance at the engine level. More...
 

Method Documentation

- (id<VOOSMPImageData> VOCommonPlayerControl) captureVideoImage

Capture a video image, only supported by VO_OSMP_VOME2_PLAYER.

This feature is currently disabled.

Returns
video image data
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) close

Close a media source.

Framework is still available.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) destroy

Delete the player instance at the engine level.

You are required to perform the specific behavior as needed to release the objective-C memory occupied by the player instance.

VO_OSMP_ERR_NONE if successful.

- (id VOCommonPlayerControl) init: (VO_OSMP_PLAYER_ENGINE)  playEngineType
initParam: (VOOSMPInitParam *)  initParam 

Initialize a player instance.

This function must be called first to start a session.
Parameters
playEngineType[in] Refer to VO_OSMP_PLAYER_ENGINE.
initParam[in] Currently unused, should be set to nil.
Returns
player object if successful; nil if unsuccessful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) mute

Mute the audio.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) notifyViewSizeChanged

Notify the player that the view size has been changed.

This API should be called when the change of view size is done.
Returns
VO_OSMP_ERR_NONE if successful.
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) open: (NSString *)  url
flag: (VO_OSMP_SRC_FLAG)  flag
sourceType: (VO_OSMP_SRC_FORMAT)  sourceType
openParam: (VOOSMPOpenParam *)  openParam 

Open a media source.

Parameters
url[in] Source file description (for example, an URL or a file descriptor, etc.)
flag[in] The flag for opening media source. Refer to VO_OSMP_SRC_FLAG.
sourceType[in] Indicates the source format. Refer to VO_OSMP_SRC_FORMAT. Default value is VO_OSMP_SRC_AUTO_DETECT
openParam[in] Parameters for opening a source. Refer to VOOSMPOpenParam. Valid fields depend on the value.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) openSource: (void *)  source
flag: (VO_OSMP_SRC_FLAG)  flag 

Open a media source.

Parameters
source[in] Source pointer, the type depend on the flag.
flag[in] The flag for opening media source. Set as VO_OSMP_FLAG_SRC_PUSH_BUFFER_FUNCTION at present.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) pause

Pause playback.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) redrawVideo

Redraw the video.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) resume

Resume the player.

The application layer should invoke this method on receiving notification when moving to foreground.
Returns
VO_OSMP_ERR_NONE if successful; error code if unsuccessful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setDisplayArea: (Rect)  rect

Set the dimensions (rect) of the video display.

Parameters
Rect[in] The rectangle of view to display.
Deprecated:
This method is replaced by VOCommonPlayerControl#notifyViewSizeChanged and will be removed in the future. Modify the size of NSView directly to change the display area.
Returns
VO_OSMP_ERR_NONE if successful.
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setOnEventDelegate: (id< VOCommonPlayerDelegate >)  delegate

Set the delegation to handle SDK events.

Events are posted by sub-thread to VOCommonPlayerDelegate#onVOEvent:param1:param2:pObj:.

Parameters
delegate[in] Event handler instance.
Returns
VO_OSMP_ERR_NONE if successful
- (long VOCommonPlayerControl) setPosition: (long)  msec

Perform the seek operation.

For VOD and NTS streams, the seek operation cannot be performed until the player open completes. For live stream, the seek operation cannot be performed until the player gets the VO_OSMP_SRC_ADAPTIVE_STREAMING_INFO_EVENT_LIVESEEKABLE callback event.

Parameters
msec[in] Requested seek position <ms>.
Returns
position after seek operation; -1 if unsuccessful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setPreference: (VO_OSMP_PREFERENCE)  preference

Set preference for playback.

Parameters
preference[in] Refer to VO_OSMP_PREFERENCE.

VO_OSMP_ERR_NONE if successful.

- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setScreenBrightness: (int)  brightness

Set screen display brightness.

Parameters
brightness[in] Display brightness (percent). The valid range is 0 to 100
Returns
VO_OSMP_ERR_NONE if successful
- (long long VOCommonPlayerControl) setUTCPosition: (long long)  msec

Seek by UTC time.

Parameters
msec[in] the requested seek position (ms).
Returns
Position after seek operation; -1 if seek failed.
Deprecated:
This method will be removed in the future.
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setVideoAspectRatio: (VO_OSMP_ASPECT_RATIO)  ar

Set aspect ratio of video.

Parameters
ar[in] Aspect ratio. Refer to VO_OSMP_ASPECT_RATIO.
Returns
VO_OSMP_ERR_NONE if successful; error code if unsuccessful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setView: (void *)  view

Set surface view for video playback.

Ensure that this API is called after calling VOCommonPlayerControl#init.

It is NOT recommended to change the UIView(iOS)/CALayer(Mac OS) or its parent node during playback. If changing the UIView(iOS)/CALayer(Mac OS) or its parent node is needed during playback, it is recommended to perform the following steps:

  1. Call VOCommonPlayerControl#suspend at first.
  2. Change the UIView(iOS)/CALayer(Mac OS) or its parent node. Ensure that the change operation is completed before proceeding with next step.
  3. Call VOCommonPlayerControl#resume with the new UIView(iOS)/CALayer(Mac OS).
Parameters
view[in] The UIView(iOS)/CALayer(Mac OS) to render video. Do not add other sub views in this view.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) setVolume: (float)  value

Set playback volume.

Parameters
value[in] A value of 0.0f indicates silence; a value of 1.0f indicates no attenuation.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) start

Start playback.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) startAnalyticsNotification: (int)  interval
filter: (VOOSMPAnalyticsFilter *)  filter 

Start periodic analytics data notifications.

With each notification, analytics data of past "interval" ms is provided.

Parameters
interval[in] Time interval <ms> between two analytics data notifications.
filter[in] Filters, specified as an VOOSMPAnalyticsFilter object, to be applied to cached analytic data.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) startSEINotification: (int)  interval

Start periodic SEI data notifications.

Parameters
interval[in] Time interval <ms> between two SEI data notifications.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) stop

Stop playback.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) stopAnalyticsNotification

Stop periodic analytics data notifications.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) stopSEINotification

Stop periodic SEI data notifications.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) suspend: (bool)  keepAudio

Suspend the player.

The application layer should invoke this method on receiving notification when moving to background.
Parameters
keepAudio[in] Keep/pause audio. true for continuing to play audio, false to pause both video and audio.
Returns
VO_OSMP_ERR_NONE if successful; error code if unsuccessful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) unmute

Unmute the audio.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerControl) updateSourceURL: (NSString *)  url

Update a media source.

Parameters
url[in] Source file description (for example, an URL or a file descriptor, etc.)
Returns
VO_OSMP_ERR_NONE if successful

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