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,
35 const char* videoFilePath, int rate);
36
45PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogLevel(LOG_FILTER_TYPE level);
46
56PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogFile(const char* fileName);
57
64typedef void(*OnLogMessageHandler)(
65 LOG_FILTER_TYPE level, const char* message, void* data);
66
76PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogMessageCallback(bool enable,
77 OnLogMessageHandler handler, void* data);
78
88PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHttpRequest(SDK_HTTP_REQUEST type);
89
100PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkCacertFile(const char* fileName);
101
111PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHwdecEnable(bool enable);
112
121PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkKeepLastFrame(bool enable);
122
132PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkRetryAttempts(int attempts,
133 int milliseconds, int millisecondsMax);
147PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkVideoOutputDevice(
148 VIDEO_OUTPUT_DEVICE type, const char* context = NULL);
149
163PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkViewerInfo(
164 const char* viewerId, const char* viewerName, const char* viewerAvatar,
165 const char* viewerExtraInfo1 = NULL, const char* viewerExtraInfo2 = NULL, const char* viewerExtraInfo3 = NULL);
166
175PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkSeed(const char* seed);
176
184PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLocalRememberPlay(bool enable);
185
193PLAYERSDK_API int PLAYERSDK_CALL PLVInitSdkLibrary(const PLVAccountInfo* info);
194
203typedef void(*OnRequestVideoInfoHandler)(int code,
204 const PLVVideoRequestInfo infos[], int infosNum,
205 const PLVVideoRequestPageInfo* pageInfo, void* data);
218PLAYERSDK_API int PLAYERSDK_CALL PLVRequestVideoInfo(
219 bool sync, const PLVVideoRequestParam* param,
220 OnRequestVideoInfoHandler handler, void* data);
221
230PLAYERSDK_API int PLAYERSDK_CALL PLVCancelRequestVideoInfo();
231
242PLAYERSDK_API int PLAYERSDK_CALL PLVMigrateLocalVideoKeyFile(const char* keyFilePath, const char* secretKey);
243
256PLAYERSDK_API int PLAYERSDK_CALL PLVDeleteLocalVideoFile(const char* vid, const char* path, int rate);
257
261PLAYERSDK_API void PLAYERSDK_CALL PLVReleaseSdkLibrary(void);
271
285PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventSoftwareRecording(void* window, bool enable);
295PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventSoftwareRecording(void* window, bool* enable);
303 SOFTWARE_RECORDING_NOTIFY_TYPE type, const char* softwares, void* data);
319PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectSoftwareRecordingHandler(
320 bool enable, OnDetectSoftwareRecordingHandler handler, void* data);
322
330 DEVICE_CHANGED_TYPE type, const char* device, void* data);
340PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectHardwareRecordingHandler(
341 bool enable, OnDetectHardwareRecordingHandler handler, void* data);
347
350typedef void* PLVPlayerPtr;
357typedef bool(*OnPlayerVideoFrameHandler)(const char* vid, PLVVideoFrame* frame, void* data);
364typedef void(*OnPlayerStateHandler)(const char* vid, int state, void* data);
374 const char* vid, int property, int format, const char* value, void* data);
385 const char* vid, int inputRate, int realRate, void* data);
393typedef void(*OnPlayerProgressHandler)(const char* vid, int millisecond, void* data);
394
400typedef void(*OnPlayerAudioPlayErrorHandler)(const char* vid, void* data);
401
407typedef void(*OnPlayerAudioDeviceHandler)(int audioDeviceCount, void* data);
416PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate(void* window);
422PLAYERSDK_API void PLAYERSDK_CALL PLVPlayerDestroy(PLVPlayerPtr player);
433PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideoFrameHandler(
434 PLVPlayerPtr player, OnPlayerVideoFrameHandler lockHandler, OnPlayerVideoFrameHandler unlockHandler, void* data);
444PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetStateHandler(
445 PLVPlayerPtr player, OnPlayerStateHandler handler, void* data);
455PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetPropertyHandler(
456 PLVPlayerPtr player, OnPlayerPropertyHandler handler, void* data);
467PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetRateChangeHandler(
468 PLVPlayerPtr player, OnPlayerRateChangeHandler handler, void* data);
478PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetProgressHandler(
479 PLVPlayerPtr player, OnPlayerProgressHandler handler, void* data);
480
490PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioPlayErrorHandler(
491 PLVPlayerPtr player, OnPlayerAudioPlayErrorHandler handler, void* data);
492
502PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler(
503 PLVPlayerPtr player, OnPlayerAudioDeviceHandler handler, void* data);
511PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerResetHandler(PLVPlayerPtr player);
521PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig(
522 PLVPlayerPtr player, bool enable, const PLVOsdConfigInfo* config);
531PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig(
532 PLVPlayerPtr player, PLVOsdConfigInfo& config);
542PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText(
543 PLVPlayerPtr player, bool enable, const PLVLogoTextInfo* config);
552PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText(
553 PLVPlayerPtr player, PLVLogoTextInfo& config);
566PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCacheConfig(
567 PLVPlayerPtr player, bool enable, int maxCacheBytes, int maxCacheSeconds);
577PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCacheConfig(
578 PLVPlayerPtr player, int* maxCacheBytes, int* maxCacheSeconds);
591PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetInfo(
592 PLVPlayerPtr player, const char* vid, const char* path, int rate);
610PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay(
611 PLVPlayerPtr player, const char* token,
612 int seekMillisecond, bool autoDownRate, bool traceVideo, bool sync);
626PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlayLocal(PLVPlayerPtr player, int seekMillisecond, bool autoDownRate);
640PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal(PLVPlayerPtr player, int seekMillisecond, bool autoDownRate);
649PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPause(PLVPlayerPtr player, bool pause);
657PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop(PLVPlayerPtr player);
666PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetMute(PLVPlayerPtr player, bool mute);
675PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek(PLVPlayerPtr player, int millisecond);
683PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSeekToEnd(PLVPlayerPtr player);
692PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolume(PLVPlayerPtr player, int volume);
701PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax(PLVPlayerPtr player, int volume);
711PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerScreenshot(PLVPlayerPtr player, const char* filename);
720PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSpeed(PLVPlayerPtr player, double speed);
728PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute(PLVPlayerPtr player);
736PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid(PLVPlayerPtr player);
744PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPause(PLVPlayerPtr player);
752PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying(PLVPlayerPtr player);
760PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoaded(PLVPlayerPtr player);
768PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsLoading(PLVPlayerPtr player);
776PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRateCount(PLVPlayerPtr player);
784PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRate(PLVPlayerPtr player);
792PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetVolume(PLVPlayerPtr player);
800PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetDuration(PLVPlayerPtr player);
807PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed(PLVPlayerPtr player);
814PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceCount(PLVPlayerPtr player);
825PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetAudioDeviceInfo(PLVPlayerPtr player,
826 int index, char deviceId[PLV_MAX_DEVICE_ID_LENGTH], char deviceName[PLV_MAX_DEVICE_ID_LENGTH]);
835PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentAudioDevice(PLVPlayerPtr player, char deviceId[PLV_MAX_DEVICE_ID_LENGTH]);
844PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice(PLVPlayerPtr player, const char deviceId[PLV_MAX_DEVICE_ID_LENGTH]);
855PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudioDevice(PLVPlayerPtr player);
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkKeepLastFrame(bool enable)
设置是否播放结束保持在最后一帧画面上.
PLAYERSDK_API int PLAYERSDK_CALL PLVDeleteLocalVideoFile(const char *vid, const char *path, int rate)
删除本地离线视频文件
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogLevel(LOG_FILTER_TYPE level)
设置 SDK 的日志过滤等级.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkSeed(const char *seed)
设置解密 seed.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHttpRequest(SDK_HTTP_REQUEST type)
设置 SDK 的网络请求协议.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogMessageCallback(bool enable, OnLogMessageHandler handler, void *data)
设置日志信息回调.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkRetryAttempts(int attempts, int milliseconds, int millisecondsMax)
设置下载的重试次数, 每次重试的间隔时间会递增. 默认是无限重试(-1).
PLAYERSDK_API void PLAYERSDK_CALL PLVReleaseSdkLibrary(void)
析构 SDK, 停止使用后要调用此接口.
PLAYERSDK_API bool PLAYERSDK_CALL PLVCheckFileComplete(const char *vid, const char *videoFilePath, int rate)
检查视频文件的完整性.
PLAYERSDK_API int PLAYERSDK_CALL PLVInitSdkLibrary(const PLVAccountInfo *info)
初始化 SDK , 在使用 SDK 前一定要调用此接口.
PLAYERSDK_API int PLAYERSDK_CALL PLVRequestVideoInfo(bool sync, const PLVVideoRequestParam *param, OnRequestVideoInfoHandler handler, void *data)
请求视频信息.
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 协议, 一定要设置证书文件, 不然会请求失败.
void(* OnLogMessageHandler)(LOG_FILTER_TYPE level, const char *message, void *data)
日志信息回调.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkVideoOutputDevice(VIDEO_OUTPUT_DEVICE type, const char *context=NULL)
设置视频输出驱动类型.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLocalRememberPlay(bool enable)
本地记忆续播放功能.
PLAYERSDK_API int PLAYERSDK_CALL PLVCancelRequestVideoInfo()
中断请求视频信息.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkLogFile(const char *fileName)
设置 SDK 的日志文件位置, 文件名带路径.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetSdkHwdecEnable(bool enable)
设置是否使用硬件加速.
void(* OnRequestVideoInfoHandler)(int code, const PLVVideoRequestInfo infos[], int infosNum, const PLVVideoRequestPageInfo *pageInfo, void *data)
请求视频信息的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVMigrateLocalVideoKeyFile(const char *keyFilePath, const char *secretKey)
迁移旧的加密密钥, 换成使用 token 来加密密钥
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 的信息追踪, 建议设置.
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 PLVPlayerPlayLocal(PLVPlayerPtr player, int seekMillisecond, bool autoDownRate)
离线播放. 调用前必须设置视频的存放地址.
PLAYERSDK_API PLVPlayerPtr PLAYERSDK_CALL PLVPlayerCreate(void *window)
创建播放对象并返回对象指针. 在使用播放接口对象前, 必须先调用此接口创建对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetCurrentAudioDevice(PLVPlayerPtr player, const char deviceId[PLV_MAX_DEVICE_ID_LENGTH])
设置当前扬声器设备标识.
void(* OnPlayerAudioDeviceHandler)(int audioDeviceCount, void *data)
播放扬声器设备的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetSeek(PLVPlayerPtr player, int millisecond)
跳转到指定的播放位置.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVideoFrameHandler(PLVPlayerPtr player, OnPlayerVideoFrameHandler lockHandler, OnPlayerVideoFrameHandler unlockHandler, void *data)
设置播放视频帧的回调通知.
PLAYERSDK_API double PLAYERSDK_CALL PLVPlayerGetSpeed(PLVPlayerPtr player)
获取视频播放倍数.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetLogoText(PLVPlayerPtr player, bool enable, const PLVLogoTextInfo *config)
设置 LOGO 信息
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 PLVPlayerSetAudioPlayErrorHandler(PLVPlayerPtr player, OnPlayerAudioPlayErrorHandler handler, void *data)
设置音频播放错误回调.
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)
设置是否静音状态.
void(* OnPlayerAudioPlayErrorHandler)(const char *vid, void *data)
音频播放错误回调.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetOSDConfig(PLVPlayerPtr player, bool enable, const PLVOsdConfigInfo *config)
设置跑马灯信息
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsValid(PLVPlayerPtr player)
判断是否加载还是空闲状态.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsMute(PLVPlayerPtr player)
判断是否静音状态.
PLAYERSDK_API bool PLAYERSDK_CALL PLVPlayerIsPlaying(PLVPlayerPtr player)
判断是否播放中.
bool(* OnPlayerVideoFrameHandler)(const char *vid, PLVVideoFrame *frame, void *data)
播放视频帧的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetOSDConfig(PLVPlayerPtr player, PLVOsdConfigInfo &config)
获取跑马灯信息.
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)
重置所有回调通知, 会请空所有的回调函数地址.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetLogoText(PLVPlayerPtr player, PLVLogoTextInfo &config)
获取 LOGO 信息.
void * PLVPlayerPtr
播放对象, 每一个播放对象同时只能播放一个视频, 可以创建多个播放对象.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerStop(PLVPlayerPtr player)
停止播放.
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 PLVPlayerSetInfo(PLVPlayerPtr player, const char *vid, const char *path, int rate)
设置视频信息. 在调用播放前, 必须先设置视频的相关信息, 否则会报错.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerGetCurrentRateCount(PLVPlayerPtr player)
获取视频的清晰度总数.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetAudioDeviceHandler(PLVPlayerPtr player, OnPlayerAudioDeviceHandler handler, void *data)
设置扬声器热插拔的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerPlay(PLVPlayerPtr player, const char *token, int seekMillisecond, bool autoDownRate, bool traceVideo, bool sync)
播放视频.
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 bool PLAYERSDK_CALL PLVPlayerIsLoading(PLVPlayerPtr player)
判断视频是否加载中.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerSetVolumeMax(PLVPlayerPtr player, int volume)
设置声音增益.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerLoadLocal(PLVPlayerPtr player, int seekMillisecond, bool autoDownRate)
离线加载视频, 不自动播放. 调用前必须设置视频的存放地址.
PLAYERSDK_API int PLAYERSDK_CALL PLVPlayerReloadAudioDevice(PLVPlayerPtr player)
重置扬声器设备. 使用场景, 可以在收到设备变动回调, 再调用此接口即可.
void(* OnDetectHardwareRecordingHandler)(DEVICE_CHANGED_TYPE type, const char *device, void *data)
硬件设备变动的回调通知, 此回调可以用于防止 HDMI 硬件录制, 业务侧可以根据回调类型进行播放器是否禁播操作.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectHardwareRecordingHandler(bool enable, OnDetectHardwareRecordingHandler handler, void *data)
设置设备插拔变动的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventSoftwareRecording(void *window, bool enable)
设置播放窗口的软件防录制, 用于防止屏幕录制或屏幕截图.
PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectSoftwareRecordingHandler(bool enable, OnDetectSoftwareRecordingHandler handler, void *data)
设置软件录制的回调通知.
PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventSoftwareRecording(void *window, bool *enable)
获取播放窗口是否开启软件防录制.
void(* OnDetectSoftwareRecordingHandler)(SOFTWARE_RECORDING_NOTIFY_TYPE type, const char *softwares, void *data)
软件录制的回调通知.
SOFTWARE_RECORDING_NOTIFY_TYPE
DEVICE_CHANGED_TYPE
VIDEO_OUTPUT_DEVICE
LOG_FILTER_TYPE
const int PLV_MAX_DEVICE_ID_LENGTH
SDK_HTTP_REQUEST