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_LivePlayEx

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    POINTERHANDLE NET_SDK_LivePlayEx(
        LONG lUserID,
        LPNET_SDK_CLIENTINFO lpClientInfo,
        LIVE_DATA_CALLBACK_EX fLiveDataCallBack = NULL,
        void* pUser = NULL);

    1
    2
    3
    4
    5
    public static extern POINTERHANDLE NET_SDK_LivePlayEx(
        Int32 lUserID,
        ref NET_SDK_CLIENTINFO lpClientInfo,
        LIVE_DATA_CALLBACK_EX fLiveDataCallBack,
        IntPtr pUser);

### Function Description

Live preview (extension of `NET_SDK_LivePlay`).

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
lpClientInfoin | `LPNET_SDK_CLIENTINFO` | For preview parameters, refer to the `LPNET_SDK_CLIENTINFO` structure.
fLiveDataCallBackin | `LIVE_DATA_CALLBACK_EX` | Preview data callback parameter, the default value is NULL, refer to `LIVE_DATA_CALLBACK_EX`.
pUserin | void* | User-defined parameters.

### Return Value

- Type：POINTERHANDLE

- Remark：-1 indicates failure, and other values ​​are used as handle parameters of functions such as `NET_SDK_StopLivePlay`.

### Remarks

After successfully calling this interface, if you need to capture real-time stream data, you can call the interface `NET_SDK_SetLiveDataCallBack`, `NET_SDK_SetLiveDataCallBackEx` or `NET_SDK_SetYUVCallBack` to register a callback function for capturing stream data, and process the callback stream data in the callback function.

Error Code