plv player sdk doc
Loading...
Searching...
No Matches
plv-player-download.h
Go to the documentation of this file.
1#pragma once
2#include "plv-player-def.h"
3
5
8typedef void* PLVDownloadPtr;
15typedef void(*OnDownloadErrorHandler)(const char* vid, int code, void* data);
23typedef void(*OnDownloadProgressHandler)(const char* vid, long long receivedBytes, long long totalBytes, void* data);
31typedef void(*OnDownloadResultHandler)(const char* vid, int rate, int code, void* data);
37PLAYERSDK_API PLVDownloadPtr PLAYERSDK_CALL PLVDownloadCreate();
42PLAYERSDK_API void PLAYERSDK_CALL PLVDownloadDestroy(PLVDownloadPtr download);
52PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetErrorHandler(
53 PLVDownloadPtr download, OnDownloadErrorHandler handler, void* data);
63PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetProgressHandler(
64 PLVDownloadPtr download, OnDownloadProgressHandler handler, void* data);
74PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetResultHandler(
75 PLVDownloadPtr download, OnDownloadResultHandler handler, void* data);
83PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadResetHandler(PLVDownloadPtr download);
95PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetInfo(PLVDownloadPtr download, const char* vid, const char* path, int rate);
105PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStart(PLVDownloadPtr download, bool autoDownRate);
114PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadPause(PLVDownloadPtr download, bool pause);
122PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStop(PLVDownloadPtr download);
130PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadDelete(PLVDownloadPtr download);
138PLAYERSDK_API bool PLAYERSDK_CALL PLVDownloadIsDownloading(PLVDownloadPtr download);
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.
void * PLVDownloadPtr
download object type.
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.
void(* OnDownloadErrorHandler)(const char *vid, int code, void *data)
for Callback notification of error messages during the process.
PLAYERSDK_API bool PLAYERSDK_CALL PLVDownloadIsDownloading(PLVDownloadPtr download)
check download status.
void(* OnDownloadResultHandler)(const char *vid, int rate, int code, void *data)
for download result callback.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetErrorHandler(PLVDownloadPtr download, OnDownloadErrorHandler handler, void *data)
for in the download process error callback.
void(* OnDownloadProgressHandler)(const char *vid, long long receivedBytes, long long totalBytes, void *data)
for download progress callback.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadPause(PLVDownloadPtr download, bool pause)
pause download the video, the thread not exit.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetResultHandler(PLVDownloadPtr download, OnDownloadResultHandler handler, void *data)
for download result callback.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStop(PLVDownloadPtr download)
stop download the video, the thread will exit.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStart(PLVDownloadPtr download, bool autoDownRate)
start download the video.
PLAYERSDK_API void PLAYERSDK_CALL PLVDownloadDestroy(PLVDownloadPtr download)
Destory the PLVDownloader object.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetProgressHandler(PLVDownloadPtr download, OnDownloadProgressHandler handler, void *data)
for download progress callback.