plv player sdk doc
|
Typedefs | |
typedef void * | PLVDownloadPtr |
download object type. | |
typedef void(* | OnDownloadErrorHandler) (const char *vid, int code, void *data) |
for Callback notification of error messages during the process. | |
typedef void(* | OnDownloadProgressHandler) (const char *vid, long long receivedBytes, long long totalBytes, void *data) |
for download progress callback. | |
typedef void(* | OnDownloadResultHandler) (const char *vid, int rate, int code, void *data) |
for download result callback. | |
Functions | |
PLAYERSDK_API PLVDownloadPtr PLAYERSDK_CALL | PLVDownloadCreate () |
Creates the PLVDownloader object and returns the pointer. | |
PLAYERSDK_API void PLAYERSDK_CALL | PLVDownloadDestroy (PLVDownloadPtr download) |
Destory the PLVDownloader object. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadSetErrorHandler (PLVDownloadPtr download, OnDownloadErrorHandler handler, void *data) |
for in the download process error callback. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadSetProgressHandler (PLVDownloadPtr download, OnDownloadProgressHandler handler, void *data) |
for download progress callback. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadSetResultHandler (PLVDownloadPtr download, OnDownloadResultHandler handler, void *data) |
for download result callback. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadResetHandler (PLVDownloadPtr download) |
for reset all handler, will clear all callback function. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadSetInfo (PLVDownloadPtr download, const char *vid, const char *path, int rate) |
set the video info before download. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadStart (PLVDownloadPtr download, const char *token, bool autoDownRate) |
start download the video. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadPause (PLVDownloadPtr download, bool pause) |
pause download the video, the thread not exit. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadStop (PLVDownloadPtr download) |
stop download the video, the thread will exit. | |
PLAYERSDK_API int PLAYERSDK_CALL | PLVDownloadDelete (PLVDownloadPtr download) |
delete the video file, will abort the download and exit thread. | |
PLAYERSDK_API bool PLAYERSDK_CALL | PLVDownloadIsDownloading (PLVDownloadPtr download) |
check download status. | |
typedef void(* OnDownloadErrorHandler) (const char *vid, int code, void *data) |
for Callback notification of error messages during the process.
[out] | vid | video id. |
[out] | code | error code. |
[out] | data | user context data. |
Definition at line 15 of file plv-player-download.h.
typedef void(* OnDownloadProgressHandler) (const char *vid, long long receivedBytes, long long totalBytes, void *data) |
for download progress callback.
[out] | vid | video id. |
[out] | receivedBytes | download pos. |
[out] | totalBytes | file all size. |
[out] | data | user context data. |
Definition at line 23 of file plv-player-download.h.
typedef void(* OnDownloadResultHandler) (const char *vid, int rate, int code, void *data) |
for download result callback.
[out] | vid | video id. |
[out] | rate | the video rate. |
[out] | code | error code. |
[out] | data | user context data. |
Definition at line 31 of file plv-player-download.h.
typedef void* PLVDownloadPtr |
download object type.
Definition at line 8 of file plv-player-download.h.
PLAYERSDK_API PLVDownloadPtr PLAYERSDK_CALL PLVDownloadCreate | ( | ) |
Creates the PLVDownloader object and returns the pointer.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadDelete | ( | PLVDownloadPtr | download | ) |
delete the video file, will abort the download and exit thread.
download | the download object, for PLVDownloadCreate return. |
PLAYERSDK_API void PLAYERSDK_CALL PLVDownloadDestroy | ( | PLVDownloadPtr | download | ) |
Destory the PLVDownloader object.
download | the download object, for PLVDownloadCreate return. |
PLAYERSDK_API bool PLAYERSDK_CALL PLVDownloadIsDownloading | ( | PLVDownloadPtr | download | ) |
check download status.
download | the download object, for PLVDownloadCreate return. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadPause | ( | PLVDownloadPtr | download, |
bool | pause ) |
pause download the video, the thread not exit.
download | the download object, for PLVDownloadCreate return. |
pause | download state. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadResetHandler | ( | PLVDownloadPtr | download | ) |
for reset all handler, will clear all callback function.
download | the download object, for PLVDownloadCreate return. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetErrorHandler | ( | PLVDownloadPtr | download, |
OnDownloadErrorHandler | handler, | ||
void * | data ) |
for in the download process error callback.
download | the download object, for PLVDownloadCreate return. |
handler | callback function. |
data | user context data. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetInfo | ( | PLVDownloadPtr | download, |
const char * | vid, | ||
const char * | path, | ||
int | rate ) |
set the video info before download.
download | the download object, for PLVDownloadCreate return. |
vid | the video id. |
path | the video file path, use UTF8. |
rate | the video rate. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetProgressHandler | ( | PLVDownloadPtr | download, |
OnDownloadProgressHandler | handler, | ||
void * | data ) |
for download progress callback.
download | the download object, for PLVDownloadCreate return. |
handler | callback function. |
data | user context data. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetResultHandler | ( | PLVDownloadPtr | download, |
OnDownloadResultHandler | handler, | ||
void * | data ) |
for download result callback.
download | the download object, for PLVDownloadCreate return. |
handler | callback function. |
data | user context data. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStart | ( | PLVDownloadPtr | download, |
const char * | token, | ||
bool | autoDownRate ) |
start download the video.
download | the download object, for PLVDownloadCreate return. |
token | encryption video mute use it. |
autoDownRate | if false will no exist the rate return error. |
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStop | ( | PLVDownloadPtr | download | ) |
stop download the video, the thread will exit.
download | the download object, for PLVDownloadCreate return. |