plv player sdk doc
plv-player-core-CN.h
浏览该文件的文档.
1#pragma once
2#include "plv-player-def.h"
3
5
13PLAYERSDK_API const char* PLAYERSDK_CALL PLVGetSdkVersion(void);
14
21PLAYERSDK_API const char* PLAYERSDK_CALL PLVGetSdkErrorDescription(int err);
22
34PLAYERSDK_API bool PLAYERSDK_CALL PLVCheckFileComplete(const char* vid, const char* videoFilePath, int rate);
35
45PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogFile(const char* fileName);
46
55PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogLevel(LOG_FILTER_TYPE level);
56
65PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHttpRequest(SDK_HTTP_REQUEST type);
66
76PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkCacertFile(const char* fileName);
77
86PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHwdecEnable(bool enable);
87
96PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkKeepLastFrame(bool enable);
97
111PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkVideoOutputDevice(VIDEO_OUTPUT_DEVICE type, const char* context = NULL);
112
125PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkViewerInfo(const char* viewerId, const char* viewerName, const char* viewerAvatar,
126 const char* viewerExtraInfo1 = NULL, const char* viewerExtraInfo2 = NULL, const char* viewerExtraInfo3 = NULL);
127
137PLAYERSDK_API int PLAYERSDK_CALL PLVInitSdkLibrary(const char* userId, const char* secretKey, const char* readToken);
138
142PLAYERSDK_API void PLAYERSDK_CALL PLVReleaseSdkLibrary(void);
154#ifdef _WIN32
156
164PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventRecord(void* window, bool enable);
173PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventRecord(void* window, bool* enable);
178typedef void(*OnPluginInjectHandler)(void* data);
188PLAYERSDK_API int PLAYERSDK_CALL PLVSetPluginInjectHandler(bool enable, OnPluginInjectHandler handler, void* data);
189
191
198typedef void(*OnHDMIDeviceChangedHandler)(HDMI_DEVICE_TYPE type, const char* device, void* data);
208PLAYERSDK_API int PLAYERSDK_CALL PLVSetHDMIDeviceChangedHandler(bool enable, OnHDMIDeviceChangedHandler handler, void* data);
209#endif // end _WIN32
214
218typedef void* PLVDownloadPtr;
225typedef void(*OnDownloadErrorHandler)(const char* vid, int code, void* data);
233typedef void(*OnDownloadProgressHandler)(const char* vid, long long receivedBytes, long long totalBytes, void* data);
241typedef void(*OnDownloadResultHandler)(const char* vid, int rate, int code, void* data);
248PLAYERSDK_API PLVDownloadPtr PLAYERSDK_CALL PLVDownloadCreate();
254PLAYERSDK_API void PLAYERSDK_CALL PLVDownloadDestroy(PLVDownloadPtr download);
264PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetErrorHandler(
265 PLVDownloadPtr download, OnDownloadErrorHandler handler, void* data);
275PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetProgressHandler(
276 PLVDownloadPtr download, OnDownloadProgressHandler handler, void* data);
286PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetResultHandler(
287 PLVDownloadPtr download, OnDownloadResultHandler handler, void* data);
295PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadResetHandler(PLVDownloadPtr download);
308PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetVideo(PLVDownloadPtr download, const char* vid, const char* path, int rate);
320PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStart(PLVDownloadPtr download, bool autoDownRate);
329PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadPause(PLVDownloadPtr download);
338PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStop(PLVDownloadPtr download);
347PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadDelete(PLVDownloadPtr download);
355PLAYERSDK_API bool PLAYERSDK_CALL PLVDownloadIsDownloading(PLVDownloadPtr download);
360
363typedef void* PLVPlayerPtr;
370typedef void(*OnPlayerStateHandler)(const char* vid, int state, void* data);
379typedef void(*OnPlayerPropertyHandler)(const char* vid, int property, int format, const char* value, void* data);
389typedef void(*OnPlayerRateChangeHandler)(const char* vid, int inputRate, int realRate, void* data);
397typedef void(*OnPlayerProgressHandler)(const char* vid, int millisecond, void* data);
398
405typedef void(*OnPlayerAudioDeviceHandler)(const char* vid, int audioDeviceCount, void* data);
413PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate(void* window);
419PLAYERSDK_API void PLAYERSDK_CALL PLVPlayerDestroy(PLVPlayerPtr player);
429PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetStateHandler(
430 PLVPlayerPtr player, OnPlayerStateHandler handler, void* data);
440PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetPropertyHandler(
441 PLVPlayerPtr player, OnPlayerPropertyHandler handler, void* data);
452PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetRateChangeHandler(
453 PLVPlayerPtr player, OnPlayerRateChangeHandler handler, void* data);
463PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetProgressHandler(
464 PLVPlayerPtr player, OnPlayerProgressHandler handler, void* data);
474PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler(
475 PLVPlayerPtr player, OnPlayerAudioDeviceHandler handler, void* data);
483PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerResetHandler(PLVPlayerPtr player);
493PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig(PLVPlayerPtr player, bool enable, const OSDConfigInfo* config);
502PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig(PLVPlayerPtr player, OSDConfigInfo& config);
512PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText(PLVPlayerPtr player, bool enable, const LogoTextInfo* config);
521PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText(PLVPlayerPtr player, LogoTextInfo& config);
534PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCacheConfig(PLVPlayerPtr player, bool enable, int maxCacheBytes, int maxCacheSeconds);
544PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCacheConfig(PLVPlayerPtr player, int* maxCacheBytes, int* maxCacheSeconds);
557PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideo(PLVPlayerPtr player, const char* vid, const char* path, int rate);
570PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay(PLVPlayerPtr player, const char* token, int seekMillisecond, bool sync);
580PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlayLocal(PLVPlayerPtr player, int seekMillisecond);
590PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal(PLVPlayerPtr player, int seekMillisecond);
599PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPause(PLVPlayerPtr player, bool pause);
607PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop(PLVPlayerPtr player);
616PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetMute(PLVPlayerPtr player, bool mute);
626PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek(PLVPlayerPtr player, int millisecond, bool exactSeek);
634PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSeekToEnd(PLVPlayerPtr player);
643PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolume(PLVPlayerPtr player, int volume);
652PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax(PLVPlayerPtr player, int volume);
662PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerScreenshot(PLVPlayerPtr player, const char* filename);
671PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSpeed(PLVPlayerPtr player, double speed);
679PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute(PLVPlayerPtr player);
687PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid(PLVPlayerPtr player);
695PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPause(PLVPlayerPtr player);
703PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying(PLVPlayerPtr player);
711PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoaded(PLVPlayerPtr player);
719PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoading(PLVPlayerPtr player);
727PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetRateCount(PLVPlayerPtr player);
735PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRate(PLVPlayerPtr player);
743PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetVolume(PLVPlayerPtr player);
751PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetDuration(PLVPlayerPtr player);
758PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed(PLVPlayerPtr player);
765PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceCount(PLVPlayerPtr player);
776PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceInfo(PLVPlayerPtr player,
777 int index, char deviceId[PLV_MAX_DEVICE_ID_LENGTH], char deviceName[PLV_MAX_DEVICE_ID_LENGTH]);
786PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentAudioDevice(PLVPlayerPtr player, char deviceId[PLV_MAX_DEVICE_ID_LENGTH]);
795PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice(PLVPlayerPtr player, const char deviceId[PLV_MAX_DEVICE_ID_LENGTH]);
805PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudio(PLVPlayerPtr player);
PLAYERSDK_API PLVDownloadPtr PLAYERSDK_CALL PLVDownloadCreate()
创建下载对象并返回对象指针. 在使用下载接口对象前, 必须先调用此接口创建对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadDelete(PLVDownloadPtr download)
删除视频文件. 如果视频正在下载中时, 会中断下载, 并删除所有临时文件.
void * PLVDownloadPtr
下载对象, 每一个下载任务对应一个下载对象, 可以创建多个下载对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadResetHandler(PLVDownloadPtr download)
重置所有回调通知, 会请空所有的回调函数地址.
void(* OnDownloadErrorHandler)(const char *vid, int code, void *data)
下载过程的错误信息回调通知.
PLAYERSDK_API bool PLAYERSDK_CALL PLVDownloadIsDownloading(PLVDownloadPtr download)
获取是否下载中状态.
void(* OnDownloadResultHandler)(const char *vid, int rate, int code, void *data)
下载结果的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetErrorHandler(PLVDownloadPtr download, OnDownloadErrorHandler handler, void *data)
设置下载错误的回调通知.
void(* OnDownloadProgressHandler)(const char *vid, long long receivedBytes, long long totalBytes, void *data)
下载进度的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadPause(PLVDownloadPtr download)
暂停下载, 此时线程进入休眠, 不会退出, 区别于停止下载. 再开始下载时会更快些.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetVideo(PLVDownloadPtr download, const char *vid, const char *path, int rate)
设置视频信息. 在调用下载前, 必须先设置视频的相关信息, 否则会报错.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetResultHandler(PLVDownloadPtr download, OnDownloadResultHandler handler, void *data)
设置下载结果的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStop(PLVDownloadPtr download)
停止下载, 此时线程会回收退出, 区别于暂停下载. 再开始下载时会慢些.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadStart(PLVDownloadPtr download, bool autoDownRate)
开始下载.
PLAYERSDK_API void PLAYERSDK_CALL PLVDownloadDestroy(PLVDownloadPtr download)
销毁下载对象. 不再使用创建的对象后, 必须调用此接口回收.
PLAYERSDK_API int PLAYERSDK_CALL PLVDownloadSetProgressHandler(PLVDownloadPtr download, OnDownloadProgressHandler handler, void *data)
设置下载进度的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkKeepLastFrame(bool enable)
设置是否播放结束保持在最后一帧画面上.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogLevel(LOG_FILTER_TYPE level)
设置 SDK 的日志过滤等级.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHttpRequest(SDK_HTTP_REQUEST type)
设置 SDK 的网络请求协议.
PLAYERSDK_API int PLAYERSDK_CALL PLVInitSdkLibrary(const char *userId, const char *secretKey, const char *readToken)
初始化 SDK , 在使用 SDK 前一定要调用此接口.
PLAYERSDK_API void PLAYERSDK_CALL PLVReleaseSdkLibrary(void)
析构 SDK, 停止使用后要调用此接口.
PLAYERSDK_API bool PLAYERSDK_CALL PLVCheckFileComplete(const char *vid, const char *videoFilePath, int rate)
检查视频文件的完整性.
PLAYERSDK_API const char *PLAYERSDK_CALL PLVGetSdkVersion(void)
获取 SDK 版本号.
PLAYERSDK_API const char *PLAYERSDK_CALL PLVGetSdkErrorDescription(int err)
根据错误码获取错误描述.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkCacertFile(const char *fileName)
设置 https 协议的证书文件, 如果用 https 协议, 一定要设置证书文件, 不然会请求失败.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkVideoOutputDevice(VIDEO_OUTPUT_DEVICE type, const char *context=NULL)
设置视频输出驱动类型.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogFile(const char *fileName)
设置 SDK 的日志文件位置, 文件名带路径.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHwdecEnable(bool enable)
设置是否使用硬件加速.
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)
设置 qos 的信息追踪, 建议设置, 在 vrm12 中, 如果不设置 viewerId, 会播放失败.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceInfo(PLVPlayerPtr player, int index, char deviceId[PLV_MAX_DEVICE_ID_LENGTH], char deviceName[PLV_MAX_DEVICE_ID_LENGTH])
获取扬声器设备信息.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetDuration(PLVPlayerPtr player)
获取视频的时长.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoaded(PLVPlayerPtr player)
判断视频是否加载.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetVolume(PLVPlayerPtr player)
获取当前音量值.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRate(PLVPlayerPtr player)
当前视频的清晰度.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceCount(PLVPlayerPtr player)
获取扬声器设备总数.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetPropertyHandler(PLVPlayerPtr player, OnPlayerPropertyHandler handler, void *data)
设置播放属性值的回调通知.
void(* OnPlayerProgressHandler)(const char *vid, int millisecond, void *data)
播放进度的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSpeed(PLVPlayerPtr player, double speed)
倍速播放, 通过作为参数给定的系数来减慢或加快播放速度.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig(PLVPlayerPtr player, bool enable, const OSDConfigInfo *config)
设置跑马灯信息
PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate(void *window)
创建播放对象并返回对象指针. 在使用播放接口对象前, 必须先调用此接口创建对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice(PLVPlayerPtr player, const char deviceId[PLV_MAX_DEVICE_ID_LENGTH])
设置当前扬声器设备标识.
PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed(PLVPlayerPtr player)
获取视频播放倍数.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetProgressHandler(PLVPlayerPtr player, OnPlayerProgressHandler handler, void *data)
设置播放进度的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSeekToEnd(PLVPlayerPtr player)
停止在最后一帧.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentAudioDevice(PLVPlayerPtr player, char deviceId[PLV_MAX_DEVICE_ID_LENGTH])
获取当前扬声器设备标识.
void(* OnPlayerPropertyHandler)(const char *vid, int property, int format, const char *value, void *data)
播放属性值的回调通知.
void(* OnPlayerRateChangeHandler)(const char *vid, int inputRate, int realRate, void *data)
播放清晰度的回调通知. 此回调的场景在:
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText(PLVPlayerPtr player, bool enable, const LogoTextInfo *config)
设置 LOGO 信息
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideo(PLVPlayerPtr player, const char *vid, const char *path, int rate)
设置视频信息. 在调用播放前, 必须先设置视频的相关信息, 否则会报错.
void(* OnPlayerStateHandler)(const char *vid, int state, void *data)
播放状态的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolume(PLVPlayerPtr player, int volume)
设置播放声音.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerScreenshot(PLVPlayerPtr player, const char *filename)
视频截屏.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetMute(PLVPlayerPtr player, bool mute)
设置是否静音状态.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid(PLVPlayerPtr player)
判断是否加载还是空闲状态.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute(PLVPlayerPtr player)
判断是否静音状态.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying(PLVPlayerPtr player)
判断是否播放中.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal(PLVPlayerPtr player, int seekMillisecond)
离线加载视频, 不自动播放. 调用前必须设置视频的存放地址.
PLAYERSDK_API void PLAYERSDK_CALL PLVPlayerDestroy(PLVPlayerPtr player)
销毁播放对象. 不再使用创建的对象后, 必须调用此接口回收.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCacheConfig(PLVPlayerPtr player, bool enable, int maxCacheBytes, int maxCacheSeconds)
设置播放缓存信息.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerResetHandler(PLVPlayerPtr player)
重置所有回调通知, 会请空所有的回调函数地址.
void(* OnPlayerAudioDeviceHandler)(const char *vid, int audioDeviceCount, void *data)
播放扬声器设备的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText(PLVPlayerPtr player, LogoTextInfo &config)
获取 LOGO 信息.
void * PLVPlayerPtr
播放对象, 每一个播放对象同时只能播放一个视频, 可以创建多个播放对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop(PLVPlayerPtr player)
停止播放.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlayLocal(PLVPlayerPtr player, int seekMillisecond)
离线播放. 调用前必须设置视频的存放地址.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetStateHandler(PLVPlayerPtr player, OnPlayerStateHandler handler, void *data)
设置播放状态的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPause(PLVPlayerPtr player, bool pause)
设置是否暂停状态.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler(PLVPlayerPtr player, OnPlayerAudioDeviceHandler handler, void *data)
设置扬声器热插拔的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCacheConfig(PLVPlayerPtr player, int *maxCacheBytes, int *maxCacheSeconds)
获取缓存信息.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPause(PLVPlayerPtr player)
判断是否暂停状态.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetRateChangeHandler(PLVPlayerPtr player, OnPlayerRateChangeHandler handler, void *data)
设置清晰度变化的回调通知. 只有输入清度为 VIDEO_RATE_AUTO 才会触发此回调.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay(PLVPlayerPtr player, const char *token, int seekMillisecond, bool sync)
播放视频.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoading(PLVPlayerPtr player)
判断视频是否加载中.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax(PLVPlayerPtr player, int volume)
设置声音增益.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek(PLVPlayerPtr player, int millisecond, bool exactSeek)
跳转到指定的播放位置.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudio(PLVPlayerPtr player)
重置扬声器设备. 使用场景, 可以在收到设备变动回调, 再调用此接口即可.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig(PLVPlayerPtr player, OSDConfigInfo &config)
获取跑马灯信息.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetRateCount(PLVPlayerPtr player)
获取视频的清晰度总数.
void(* OnHDMIDeviceChangedHandler)(HDMI_DEVICE_TYPE type, const char *device, void *data)
HDMI 硬件设备变动的回调通知, 此回调可以用于防止 HDMI 硬件录制, 业务侧可以根据回调类型进行播放器是否禁播操作.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventRecord(void *window, bool enable)
设置播放窗口的软件防录制, 用于防止屏幕录制或屏幕截图.
void(* OnPluginInjectHandler)(void *data)
恶意软件录制的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetPluginInjectHandler(bool enable, OnPluginInjectHandler handler, void *data)
设置恶意软件录制的回调通知, 如果有恶意软件录制播放窗口, 会触发回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventRecord(void *window, bool *enable)
获取播放窗口是否开启软件防录制.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetHDMIDeviceChangedHandler(bool enable, OnHDMIDeviceChangedHandler handler, void *data)
设置 HDMI 设备插拔变动的回调通知.
VIDEO_OUTPUT_DEVICE
LOG_FILTER_TYPE
const int PLV_MAX_DEVICE_ID_LENGTH
HDMI_DEVICE_TYPE
SDK_HTTP_REQUEST