plv player sdk doc
|
Typedefs | |
typedef void(* | OnLogMessageHandler) (LOG_FILTER_TYPE level, const char *message, void *data) |
log message callback. | |
typedef void(* | OnRequestVideoInfoHandler) (int code, const PLVVideoRequestInfo infos[], int infosNum, const PLVVideoRequestPageInfo *pageInfo, void *data) |
request video info callback. | |
Functions | |
PLAYERSDK_API const char *PLAYERSDK_CALL | PLVGetSdkVersion (void) |
get the sdk version. | |
PLAYERSDK_API const char *PLAYERSDK_CALL | PLVGetSdkErrorDescription (int err) |
get the code description. | |
PLAYERSDK_API bool PLAYERSDK_CALL | PLVCheckFileComplete (const char *vid, const char *videoFilePath, int rate) |
check the video is completed. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkLogLevel (LOG_FILTER_TYPE level) |
set the sdk log filter level. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkLogFile (const char *fileName) |
set the sdk log file. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkLogMessageCallback (bool enable, OnLogMessageHandler handler, void *data) |
for log message callback. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkHttpRequest (SDK_HTTP_REQUEST type) |
for thd sdk http request type. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkCacertFile (const char *fileName) |
set upload ca file, if use https, must set the ca file, otherwise error. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkHwdecEnable (bool enable) |
Hardware coding. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkKeepLastFrame (bool enable) |
end video will keep in last frame. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkRetryAttempts (int attempts, int milliseconds, int millisecondsMax) |
download retry count, default unlimit retry | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkVideoOutputDevice (VIDEO_OUTPUT_DEVICE type, const char *context=NULL) |
Video output drivers are interfaces to different video output facilities. If there is no video problem, it is generally not recommended to use. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkViewerInfo (const char *viewerId, const char *viewerName, const char *viewerAvatar, const char *viewerExtraInfo1=NULL, const char *viewerExtraInfo2=NULL, const char *viewerExtraInfo3=NULL) |
this api will use report qos, recommended settings. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkSeed (const char *seed) |
set decryption seed. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVSetSdkLocalRememberPlay (bool enable) |
Set the last playback position for playback. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVInitSdkLibrary (const PLVAccountInfo *info) |
init the sdk. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVRequestVideoInfo (bool sync, const PLVVideoRequestParam *param, OnRequestVideoInfoHandler handler, void *data) |
request video info. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVCancelRequestVideoInfo () |
cancel request video info. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVMigrateLocalVideoKeyFile (const char *keyFilePath, const char *secretKey) |
migrate old encryption key to use token encryption key. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDeleteLocalVideoFile (const char *vid, const char *path, int rate) |
delete local video file. | |
PLAYERSDK_API void PLAYERSDK_CALL | PLVReleaseSdkLibrary (void) |
release sdk. | |
typedef void(* OnLogMessageHandler) (LOG_FILTER_TYPE level, const char *message, void *data) |
log message callback.
[out] | level | the log level. |
[out] | message | log message. |
[out] | data | user context data. |
Definition at line 64 of file plv-player-core.h.
typedef void(* OnRequestVideoInfoHandler) (int code, const PLVVideoRequestInfo infos[], int infosNum, const PLVVideoRequestPageInfo *pageInfo, void *data) |
request video info callback.
[out] | code | request result code |
[out] | infos | video infos. |
[out] | infosNum | video infos number. |
[out] | pageInfo | page info, if user request in page. |
[out] | data | user context. |
Definition at line 204 of file plv-player-core.h.
PLAYERSDK_API int PLAYERSDK_CALL PLVCancelRequestVideoInfo | ( | ) |
cancel request video info.
PLAYERSDK_API bool PLAYERSDK_CALL PLVCheckFileComplete | ( | const char * | vid, |
const char * | videoFilePath, | ||
int | rate ) |
check the video is completed.
vid | the video id. |
videoFilePath | the video file path, use UTF8. |
rate | the video rate. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDeleteLocalVideoFile | ( | const char * | vid, |
const char * | path, | ||
int | rate ) |
delete local video file.
vid | the video id. |
path | the video file path, use UTF8. |
rate | the video rate. |
PLAYERSDK_API const char *PLAYERSDK_CALL PLVGetSdkErrorDescription | ( | int | err | ) |
get the code description.
err | error code |
PLAYERSDK_API const char *PLAYERSDK_CALL PLVGetSdkVersion | ( | void | ) |
get the sdk version.
PLAYERSDK_API int PLAYERSDK_CALL PLVInitSdkLibrary | ( | const PLVAccountInfo * | info | ) |
init the sdk.
info | account info. |
PLAYERSDK_API int PLAYERSDK_CALL PLVMigrateLocalVideoKeyFile | ( | const char * | keyFilePath, |
const char * | secretKey ) |
migrate old encryption key to use token encryption key.
keyFilePath | key file path, use UTF8. |
secretKey | old secret key. |
PLAYERSDK_API void PLAYERSDK_CALL PLVReleaseSdkLibrary | ( | void | ) |
release sdk.
PLAYERSDK_API int PLAYERSDK_CALL PLVRequestVideoInfo | ( | bool | sync, |
const PLVVideoRequestParam * | param, | ||
OnRequestVideoInfoHandler | handler, | ||
void * | data ) |
request video info.
sync | use sync or asynchronous. |
param | request param. |
handler | callback function. |
data | user context. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkCacertFile | ( | const char * | fileName | ) |
set upload ca file, if use https, must set the ca file, otherwise error.
fileName | the ca file,include path. use UTF8. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHttpRequest | ( | SDK_HTTP_REQUEST | type | ) |
for thd sdk http request type.
type | http protocol first request type. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHwdecEnable | ( | bool | enable | ) |
Hardware coding.
enable | video hardware acceleration enable. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkKeepLastFrame | ( | bool | enable | ) |
end video will keep in last frame.
enable | open or no. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLocalRememberPlay | ( | bool | enable | ) |
Set the last playback position for playback.
enable | use local record, use last time the playback position, default true. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogFile | ( | const char * | fileName | ) |
set the sdk log file.
fileName | the log file, include path, use UTF8. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogLevel | ( | LOG_FILTER_TYPE | level | ) |
set the sdk log filter level.
level | the log level. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogMessageCallback | ( | bool | enable, |
OnLogMessageHandler | handler, | ||
void * | data ) |
for log message callback.
enable | for check to callback or not. |
handler | callback function. |
data | user context data. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkRetryAttempts | ( | int | attempts, |
int | milliseconds, | ||
int | millisecondsMax ) |
download retry count, default unlimit retry
attempts | attempt to retry download. default unlimit(-1). |
milliseconds | delay to retry time. default 500 ms. |
millisecondsMax | delay max value. default 25000 ms. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkSeed | ( | const char * | seed | ) |
set decryption seed.
seed | decryption seed. |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkVideoOutputDevice | ( | VIDEO_OUTPUT_DEVICE | type, |
const char * | context = NULL ) |
Video output drivers are interfaces to different video output facilities. If there is no video problem, it is generally not recommended to use.
type | output type. |
context | it can be "auto, d3d11, win, angle, dxinterop". |
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkViewerInfo | ( | const char * | viewerId, |
const char * | viewerName, | ||
const char * | viewerAvatar, | ||
const char * | viewerExtraInfo1 = NULL, | ||
const char * | viewerExtraInfo2 = NULL, | ||
const char * | viewerExtraInfo3 = NULL ) |
this api will use report qos, recommended settings.
viewerId | user custom viewer id, use in location quality. |
viewerName | user custom viewer name. |
viewerAvatar | user custom viewer avatar. |
viewerExtraInfo1 | extend field. |
viewerExtraInfo2 | extend field. |
viewerExtraInfo3 | extend field. |