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_PlayBackByTime

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    POINTERHANDLE NET_SDK_PlayBackByTime(
        LONG lUserID,
        LONG* pChannels,
        LONG channelNum,
        DD_TIME* lpStartTime,
        DD_TIME* lpStopTime,
        HWND* hWnds);

    1
    2
    3
    4
    5
    6
    7
    public static extern POINTERHANDLE NET_SDK_PlayBackByTime(
        Int32 lUserID,
        uint[] lChannels,
        int channelNum,
        ref DD_TIME lpStartTime,
        ref DD_TIME lpStopTime,
        IntPtr[] hWnds);

### Function Description

Play back the video file by time and request main stream recording.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
pChannelsin | LONG* | The channel number array to be played back. The channel number starts from 0.
channelNumin | LONG | The number of channels in the array pChannels.
lpStartTimein | `DD_TIME`* | The start time pointer of the file, refer to `DD_TIME`.
lpStopTimein | `DD_TIME`* | File end time pointer, refer to `DD_TIME`.
hWndsin | HWND* | The playback window handle (only supported on Windows platform). If it is set to null, the SDK can still receive the stream data but will not decode and display it.

### Return Value

- Type：POINTERHANDLE

- Remark：-1 indicates failure, other values ​​are used as the playback handle.

### Remarks

This interface specifies the video file to be played. After successfully calling this interface, you can register the callback function through the interfaces `NET_SDK_SetPlayDataCallBack` and `NET_SDK_SetPlayYUVCallBack` to capture the video stream data and process it yourself.

Error Code