plv player sdk doc
Loading...
Searching...
No Matches
Typedefs | Functions
Detect Recording And VM Api

Typedefs

typedef void(* OnDetectSoftwareRecordingHandler) (SOFTWARE_RECORDING_NOTIFY_TYPE type, const char *softwares, void *data)
 for detect softward recording callback.
 
typedef void(* OnDetectHardwareRecordingHandler) (DEVICE_CHANGED_TYPE type, const char *device, void *data)
 for detect device recording callback.
 

Functions

PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventSoftwareRecording (void *window, bool enable)
 for prevent screen recording or screenshot.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventSoftwareRecording (void *window, bool *enable)
 for prevent screen recording or screenshot.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectSoftwareRecordingHandler (bool enable, OnDetectSoftwareRecordingHandler handler, void *data)
 for detect software recording your screen or window.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectHardwareRecordingHandler (bool enable, OnDetectHardwareRecordingHandler handler, void *data)
 for detect device changed callback.
 
PLAYERSDK_API int PLAYERSDK_CALL PLVDetectVM ()
 for detect virtual machine environment.
 

Detailed Description

Typedef Documentation

◆ OnDetectHardwareRecordingHandler

typedef void(* OnDetectHardwareRecordingHandler) (DEVICE_CHANGED_TYPE type, const char *device, void *data)

for detect device recording callback.

Parameters
[out]typefor device changed type.
[out]devicefor device info.
[out]datauser context data.
Note
  • type for DEVICE_CHANGED_NONE, device be null.

Definition at line 287 of file plv-player-core.h.

◆ OnDetectSoftwareRecordingHandler

typedef void(* OnDetectSoftwareRecordingHandler) (SOFTWARE_RECORDING_NOTIFY_TYPE type, const char *softwares, void *data)

for detect softward recording callback.

Parameters
[out]typefor software recording notify type.
[out]softwarefor software names, eg: QQ,TeamViewer.
[out]datauser context.

Definition at line 258 of file plv-player-core.h.

Function Documentation

◆ PLVDetectVM()

PLAYERSDK_API int PLAYERSDK_CALL PLVDetectVM ( )

for detect virtual machine environment.

Returns
  • >= 0: VM detection results, with the lower 8 bits identifying each detection result separately.
    int vmFlags = PLVDetectVM();
    @details MAC address check
    bool vmMac = !!(vmFlags & 0x00000001);
    @details Motherboard serial number check
    bool vmBoard = !!(vmFlags & 0x00000002);
    @details Disk info check
    bool VMDisk = !!(vmFlags & 0x00000004);
    @details System model check
    bool VMSystemModel = !!(vmFlags & 0x00000008);
    @details vendor id check
    bool VMVendorIdByCpuid = !!(vmFlags & 0x00000010);
    @details invalid leaf check by cpuid
    bool VMInvalidLeafByCpuId = !!(vmFlags & 0x00000020);
    @details higest low leaf check by cpuid
    bool VMHigestLowLeafByCpuId = !!(vmFlags & 0x00000040);
    @details If in wine environment
    bool VMWine = !!(vmFlags & 0x00000080);
    PLAYERSDK_API int PLAYERSDK_CALL PLVDetectVM()
    for detect virtual machine environment.
Note
Only support in windows

◆ PLVGetPreventSoftwareRecording()

PLAYERSDK_API int PLAYERSDK_CALL PLVGetPreventSoftwareRecording ( void * window,
bool * enable )

for prevent screen recording or screenshot.

Parameters
windowwindow handle.
[out]enableto prevent or not.
Returns
  • 0: Success.
  • > 0: Failure.
Attention
in winOS,
  • window must be top-level, eg: win WS_EX_APPWINDOW.

◆ PLVSetDetectHardwareRecordingHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectHardwareRecordingHandler ( bool enable,
OnDetectHardwareRecordingHandler handler,
void * data )

for detect device changed callback.

Parameters
enablefor check to callback or not.
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.

◆ PLVSetDetectSoftwareRecordingHandler()

PLAYERSDK_API int PLAYERSDK_CALL PLVSetDetectSoftwareRecordingHandler ( bool enable,
OnDetectSoftwareRecordingHandler handler,
void * data )

for detect software recording your screen or window.

Parameters
enablefor check to callback or not.
handlercallback function.
datauser context data.
Returns
  • 0: Success.
  • > 0: Failure.
Note
in winOS,Set this interface. When an injection program attempts to modify the system's recording function, the SDK will call back to the upper layer, which will decide whether to continue playing. in macOS,Set this interface. If a third-party recording software is started, the SDK will recall the software name to the upper layer, which will decide whether to continue playing.
Attention
in macOS, need permissions "AllFiles".

◆ PLVSetPreventSoftwareRecording()

PLAYERSDK_API int PLAYERSDK_CALL PLVSetPreventSoftwareRecording ( void * window,
bool enable )

for prevent screen recording or screenshot.

Parameters
windowwindow handle.
enableswitch prevent screen recording.
Returns
  • 0: Success.
  • > 0: Failure.
Note
detect software recording, there are differences between winOS and macOS: in winOS: invoke this api, all recording software cannot capture the set window screen. in macOS: invoke this api, only the system's built-in recording software cannot capture the window image, other third-party software can capture the image and needs to be used with @PLVSetDetectSoftwareRecordingHandler.
Attention
in winOS, @window must be top-level, eg: win WS_EX_APPWINDOW.