Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_SetPlayYUVCallBack

### Interface Definition

C++C#

    1
    2
    3
    4
    BOOL NET_SDK_SetPlayYUVCallBack(
        POINTERHANDLE lPlayHandle,
        PLAY_YUV_DATA_CALLBACK fYuvCallBack,
        void* pUser);

    1
    2
    3
    4
    public static extern bool NET_SDK_SetPlayYUVCallBack(
        POINTERHANDLE playHandle,
        PLAY_YUV_DATA_CALLBACK fYuvCallBack,
        IntPtr pUser);

### Function Description

Register callback function to capture YUV video data (currently only valid in Windows version). YUV data can be received at the callback, and processing needs to be returned as soon as possible, otherwise the underlying decoding thread will be blocked. (When SDK display is not required, when calling `NET_SDK_PlayBackByTime`, the window handle can be passed as NULL).

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lPlayHandlein | POINTERHANDLE | The playback handle, or the return value of `NET_SDK_PlayBackByTime` or `NET_SDK_PlayBackByTimeEx`.
fYuvCallBackin | `PLAY_YUV_DATA_CALLBACK` | Video recording data callback function.
pUserin | void* | User-defined parameters.

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code