plv player sdk doc
Loading...
Searching...
No Matches
Typedefs | Functions
Player Api

Typedefs

typedef void * PLVPlayerPtr
 player object type.
 
typedef bool(* OnPlayerVideoFrameHandler) (const char *vid, PLVVideoFrame *frame, void *data)
 player video frame.
 
typedef void(* OnPlayerStateHandler) (const char *vid, int state, void *data)
 player media state.
 
typedef void(* OnPlayerPropertyHandler) (const char *vid, int property, int format, const char *value, void *data)
 player media property value.
 
typedef void(* OnPlayerRateChangeHandler) (const char *vid, int inputRate, int realRate, void *data)
 the player rate change.
 
typedef void(* OnPlayerProgressHandler) (const char *vid, int millisecond, void *data)
 the player play media progress.
 
typedef void(* OnPlayerAudioDeviceHandler) (int audioDeviceCount, void *data)
 the player audio device list change.
 

Functions

PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate (void *window)
 Creates the PLVPlayerPtr object and returns the pointer.
 
PLAYERSDK_API void PLAYERSDK_CALL PLVPlayerDestroy (PLVPlayerPtr player)
 Destory the PLVPlayerPtr object.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideoFrameHandler (PLVPlayerPtr player, OnPlayerVideoFrameHandler lockHandler, OnPlayerVideoFrameHandler unlockHandler, void *data)
 for video frame callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetStateHandler (PLVPlayerPtr player, OnPlayerStateHandler handler, void *data)
 for state change callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetPropertyHandler (PLVPlayerPtr player, OnPlayerPropertyHandler handler, void *data)
 for property change callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetRateChangeHandler (PLVPlayerPtr player, OnPlayerRateChangeHandler handler, void *data)
 for current bit chanage callback, the input rate is VIDEO_RATE_AUTO will callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetProgressHandler (PLVPlayerPtr player, OnPlayerProgressHandler handler, void *data)
 for play progress callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler (PLVPlayerPtr player, OnPlayerAudioDeviceHandler handler, void *data)
 for play audio device list callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerResetHandler (PLVPlayerPtr player)
 for reset all handler.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig (PLVPlayerPtr player, bool enable, const PLVOsdConfigInfo *config)
 set the video OSD config info
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig (PLVPlayerPtr player, PLVOsdConfigInfo &config)
 get the video OSD config info.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText (PLVPlayerPtr player, bool enable, const PLVLogoTextInfo *config)
 set the video Logo text info
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText (PLVPlayerPtr player, PLVLogoTextInfo &config)
 get the video Logo text info.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCacheConfig (PLVPlayerPtr player, bool enable, int maxCacheBytes, int maxCacheSeconds)
 set the video cache config info.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCacheConfig (PLVPlayerPtr player, int *maxCacheBytes, int *maxCacheSeconds)
 get the video cache config info.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetInfo (PLVPlayerPtr player, const char *vid, const char *path, int rate)
 set the video info before play.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay (PLVPlayerPtr player, const char *token, int seekMillisecond, bool autoDownRate, bool traceVideo, bool sync)
 play the video.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlayLocal (PLVPlayerPtr player, int seekMillisecond, bool autoDownRate)
 play local video, must set the video path.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal (PLVPlayerPtr player, int seekMillisecond, bool autoDownRate)
 load local video, no play, must set the video path.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPause (PLVPlayerPtr player, bool pause)
 pause the video.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop (PLVPlayerPtr player)
 stop the video.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetMute (PLVPlayerPtr player, bool mute)
 set the video mute state.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek (PLVPlayerPtr player, int millisecond)
 seek the play pos.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSeekToEnd (PLVPlayerPtr player)
 stop in end frame.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolume (PLVPlayerPtr player, int volume)
 set the video volume.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax (PLVPlayerPtr player, int volume)
 set the video volume gain.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerScreenshot (PLVPlayerPtr player, const char *filename)
 screenshot the play video picture.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSpeed (PLVPlayerPtr player, double speed)
 Slow down or speed up playback by the factor given as parameter.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute (PLVPlayerPtr player)
 the video mute state.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid (PLVPlayerPtr player)
 the video have load or idle.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPause (PLVPlayerPtr player)
 the video play state or pause.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying (PLVPlayerPtr player)
 the video playing or idle.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoaded (PLVPlayerPtr player)
 the video have load or idle.
 
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoading (PLVPlayerPtr player)
 the video is loading or idle.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRateCount (PLVPlayerPtr player)
 the video have rate count.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRate (PLVPlayerPtr player)
 the video current rate.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetVolume (PLVPlayerPtr player)
 the video volume.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetDuration (PLVPlayerPtr player)
 the video duration.
 
PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed (PLVPlayerPtr player)
 the video speed.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceCount (PLVPlayerPtr player)
 get audio device count.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceInfo (PLVPlayerPtr player, int index, char deviceId[PLV_MAX_DEVICE_ID_LENGTH], char deviceName[PLV_MAX_DEVICE_ID_LENGTH])
 the audio device info.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentAudioDevice (PLVPlayerPtr player, char deviceId[PLV_MAX_DEVICE_ID_LENGTH])
 the current audio device id.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice (PLVPlayerPtr player, const char deviceId[PLV_MAX_DEVICE_ID_LENGTH])
 set the current audio device.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudioDevice (PLVPlayerPtr player)
 reload the audio device.
 

Detailed Description

Typedef Documentation

◆ OnPlayerAudioDeviceHandler

typedef void(* OnPlayerAudioDeviceHandler) (int audioDeviceCount, void *data)

the player audio device list change.

Parameters
[out]audioDeviceCountaudio device count.
[out]datauser context data.

Definition at line 385 of file plv-player-core.h.

◆ OnPlayerProgressHandler

typedef void(* OnPlayerProgressHandler) (const char *vid, int millisecond, void *data)

the player play media progress.

Parameters
[out]vidvideo id.
[out]millisecondtime pos.
[out]datauser context data.
Note
replace MEDIA_PROPERTY_POSTION.

Definition at line 378 of file plv-player-core.h.

◆ OnPlayerPropertyHandler

typedef void(* OnPlayerPropertyHandler) (const char *vid, int property, int format, const char *value, void *data)

player media property value.

Parameters
[out]vidthe video id.
[out]propertythe property type.
See also
PLAYER_MEDIA_PROPERTY.
Parameters
[out]formatthe value type.
See also
PLAYER_MEDIA_FORMAT.
Parameters
[out]valueproperty value.
[out]datauser context data.

Definition at line 360 of file plv-player-core.h.

◆ OnPlayerRateChangeHandler

typedef void(* OnPlayerRateChangeHandler) (const char *vid, int inputRate, int realRate, void *data)

the player rate change.

Parameters
[out]vidvideo id.
[out]inputRateuser input rate.
[out]realRateactual real rate.
[out]datauser context data.

Definition at line 369 of file plv-player-core.h.

◆ OnPlayerStateHandler

typedef void(* OnPlayerStateHandler) (const char *vid, int state, void *data)

player media state.

Parameters
[out]vidthe video id.
[out]statethe player state.
See also
PLAYER_MEDIA_STATE.
Parameters
[out]datauser context data.

Definition at line 351 of file plv-player-core.h.

◆ OnPlayerVideoFrameHandler

typedef bool(* OnPlayerVideoFrameHandler) (const char *vid, PLVVideoFrame *frame, void *data)

player video frame.

Parameters
[out]vidthe video id.
[out]framevideo frame.
[out]datauser context data.

Definition at line 344 of file plv-player-core.h.

◆ PLVPlayerPtr

typedef void* PLVPlayerPtr

player object type.

Definition at line 337 of file plv-player-core.h.

Function Documentation

◆ PLVPlayerCreate()

PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate ( void * window)

Creates the PLVPlayerPtr object and returns the pointer.

Parameters
windowfor the window handler.
Returns
  • Pointer: to the PLVPlayerPtr object.
Note
If the window handler is NULL, will return NULL object.

◆ PLVPlayerDestroy()

PLAYERSDK_API void PLAYERSDK_CALL PLVPlayerDestroy ( PLVPlayerPtr player)

Destory the PLVPlayerPtr object.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.

◆ PLVPlayerGetAudioDeviceCount()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceCount ( PLVPlayerPtr player)

get audio device count.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • >=0 audio device count.

◆ PLVPlayerGetAudioDeviceInfo()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceInfo ( PLVPlayerPtr player,
int index,
char deviceId[PLV_MAX_DEVICE_ID_LENGTH],
char deviceName[PLV_MAX_DEVICE_ID_LENGTH] )

the audio device info.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
indexaudio device index.
[out]deviceIdaudio device id.
[out]deviceNameaudio device name.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerGetCacheConfig()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCacheConfig ( PLVPlayerPtr player,
int * maxCacheBytes,
int * maxCacheSeconds )

get the video cache config info.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
[out]maxCacheBytescache bytes.
[out]maxCacheSecondscache seconds.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerGetCurrentAudioDevice()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentAudioDevice ( PLVPlayerPtr player,
char deviceId[PLV_MAX_DEVICE_ID_LENGTH] )

the current audio device id.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
[out]deviceIdaudio device id.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerGetCurrentRate()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRate ( PLVPlayerPtr player)

the video current rate.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: the video is VIDEO_RATE_AUTO.
  • >0: the video current real rate.

◆ PLVPlayerGetCurrentRateCount()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRateCount ( PLVPlayerPtr player)

the video have rate count.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: the video is unload or no rate.
  • >0: have rate count.

◆ PLVPlayerGetDuration()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetDuration ( PLVPlayerPtr player)

the video duration.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: no load video.
  • >0: the video duration.

◆ PLVPlayerGetLogoText()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText ( PLVPlayerPtr player,
PLVLogoTextInfo & config )

get the video Logo text info.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
[out]configLogo info.
See also
PLVLogoTextInfo.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerGetOSDConfig()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig ( PLVPlayerPtr player,
PLVOsdConfigInfo & config )

get the video OSD config info.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
[out]configOSD info.
See also
PLVOsdConfigInfo.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerGetSpeed()

PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed ( PLVPlayerPtr player)

the video speed.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • double: the video speed.

◆ PLVPlayerGetVolume()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetVolume ( PLVPlayerPtr player)

the video volume.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: error.
  • >0: the video current volume.

◆ PLVPlayerIsLoaded()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoaded ( PLVPlayerPtr player)

the video have load or idle.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: the video is loaded state.
  • false: unload or is idle state.

◆ PLVPlayerIsLoading()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoading ( PLVPlayerPtr player)

the video is loading or idle.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: the video is loading state.
  • false: unload or is idle state.

◆ PLVPlayerIsMute()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute ( PLVPlayerPtr player)

the video mute state.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: mute state.
  • false: unmute state.

◆ PLVPlayerIsPause()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPause ( PLVPlayerPtr player)

the video play state or pause.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: the video is pause state.
  • false: unpause or is idle state.

◆ PLVPlayerIsPlaying()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying ( PLVPlayerPtr player)

the video playing or idle.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: the video is playing state.
  • false: pause or is idle state.

◆ PLVPlayerIsValid()

PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid ( PLVPlayerPtr player)

the video have load or idle.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • true: the player have load state.
  • false: the player is idle state.

◆ PLVPlayerLoadLocal()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal ( PLVPlayerPtr player,
int seekMillisecond,
bool autoDownRate )

load local video, no play, must set the video path.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
seekMillisecondplay in time pos.
autoDownRateif false will no exist the rate return error.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerPause()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPause ( PLVPlayerPtr player,
bool pause )

pause the video.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
pauseplay state.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerPlay()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay ( PLVPlayerPtr player,
const char * token,
int seekMillisecond,
bool autoDownRate,
bool traceVideo,
bool sync )

play the video.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
tokenplay encryption video mute use it.
seekMillisecondplay in time pos.
autoDownRateif false will no exist the rate return error.
traceVideotrue only when in trace video.
syncuse sync or asynchronous.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerPlayLocal()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlayLocal ( PLVPlayerPtr player,
int seekMillisecond,
bool autoDownRate )

play local video, must set the video path.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
seekMillisecondplay in time pos.
autoDownRateif false will no exist the rate return error.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerReloadAudioDevice()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudioDevice ( PLVPlayerPtr player)

reload the audio device.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Note
If there is no original audio device, it needs to reload the audio after new insertion!
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerResetHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerResetHandler ( PLVPlayerPtr player)

for reset all handler.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerScreenshot()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerScreenshot ( PLVPlayerPtr player,
const char * filename )

screenshot the play video picture.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
filenamepng/jpg file, use UTF8.
Returns
  • 0: Success.
  • > 0: Failure.
Attention
path must use UTF8

◆ PLVPlayerSeekToEnd()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSeekToEnd ( PLVPlayerPtr player)

stop in end frame.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetAudioDeviceHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler ( PLVPlayerPtr player,
OnPlayerAudioDeviceHandler handler,
void * data )

for play audio device list callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetCacheConfig()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCacheConfig ( PLVPlayerPtr player,
bool enable,
int maxCacheBytes,
int maxCacheSeconds )

set the video cache config info.

Note
If your computer memory is large enough, it is not recommended that you call this interface, just use the default value.
Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
enableuse or not cache, decide whether to use network cache settings (default: auto).
maxCacheBytesdefault 100 * 1024 * 1024, Set these limits higher if you get a packet queue overflow warning, and you think normal playback would be possible with a larger packet queue.
maxCacheSecondsdefault 30, The main purpose of this option is to limit the readhead for local playback, since a large readahead value is not overly useful in this case.
Returns
  • 0: Success.
  • > 0: Failure.
Note
If maxCacheBytes and maxCacheSeconds less than 0, ignore this value, use the default.

◆ PLVPlayerSetCurrentAudioDevice()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice ( PLVPlayerPtr player,
const char deviceId[PLV_MAX_DEVICE_ID_LENGTH] )

set the current audio device.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
deviceIdaudio device id.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetInfo()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetInfo ( PLVPlayerPtr player,
const char * vid,
const char * path,
int rate )

set the video info before play.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
vidvideo id.
pathif play local video, mute set it, use UTF8.
ratethe video rate.
See also
VIDEO_RATE_TYPE.
Returns
  • 0: Success.
  • > 0: Failure.
Attention
path must use UTF8.

◆ PLVPlayerSetLogoText()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText ( PLVPlayerPtr player,
bool enable,
const PLVLogoTextInfo * config )

set the video Logo text info

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
enableuse or not logo text.
configLogo info.
See also
PLVLogoTextInfo.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetMute()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetMute ( PLVPlayerPtr player,
bool mute )

set the video mute state.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
muteplay state.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetOSDConfig()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig ( PLVPlayerPtr player,
bool enable,
const PLVOsdConfigInfo * config )

set the video OSD config info

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
enableuse or not OSD.
configOSD info.
See also
PLVOsdConfigInfo.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetProgressHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetProgressHandler ( PLVPlayerPtr player,
OnPlayerProgressHandler handler,
void * data )

for play progress callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetPropertyHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetPropertyHandler ( PLVPlayerPtr player,
OnPlayerPropertyHandler handler,
void * data )

for property change callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetRateChangeHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetRateChangeHandler ( PLVPlayerPtr player,
OnPlayerRateChangeHandler handler,
void * data )

for current bit chanage callback, the input rate is VIDEO_RATE_AUTO will callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetSeek()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek ( PLVPlayerPtr player,
int millisecond )

seek the play pos.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
millisecondset time pos.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetSpeed()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSpeed ( PLVPlayerPtr player,
double speed )

Slow down or speed up playback by the factor given as parameter.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
speed<0.01 - 100> 1.0 normal.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetStateHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetStateHandler ( PLVPlayerPtr player,
OnPlayerStateHandler handler,
void * data )

for state change callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetVideoFrameHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideoFrameHandler ( PLVPlayerPtr player,
OnPlayerVideoFrameHandler lockHandler,
OnPlayerVideoFrameHandler unlockHandler,
void * data )

for video frame callback.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
lockHandlercallback function for lock buffer.
unlockHandlercallback function for unlock buffer.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetVolume()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolume ( PLVPlayerPtr player,
int volume )

set the video volume.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
volume<0-100> if 0 will mute.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerSetVolumeMax()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax ( PLVPlayerPtr player,
int volume )

set the video volume gain.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Parameters
volume<100-1000> if big 1000 will return failure.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVPlayerStop()

PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop ( PLVPlayerPtr player)

stop the video.

Parameters
playerthe player object, for PLVPlayerCreate return.
See also
PLVPlayerCreate.
Returns
  • 0: Success.
  • > 0: Failure.