Configure Passive Decoding

For passive decoding, the decoder will not send decoding request, the data should be sent to the decoder for decoding, so this decoding mode is usually applied to the situation of decoding and displaying local videos on video wall.

Figure 1 API Calling Flow of Configuring Passive Decoding

  1. Call NET_DVR_GetDeviceConfig with "NET_DVR_GET_VIDEOWALLWINDOWPOSITION" (command No.: 1735) and set lpInBuffer to a 4-byte video wall No. for getting windowing status and related information.

    The status and information are returned in the structure NET_DVR_VIDEOWALLWINDOWPOSITION by lpOutBuffer.

  2. Call NET_DVR_GetDVRConfig with "NET_DVR_WALLWINPARAM_GET" (command No.: 9005) and set lChannel to a window No. for getting the window division mode of video wall.

    The window division mode is returned in the structure NET_DVR_WALLWINPARAM by lpOutBuffer.

  3. Call NET_DVR_MatrixStartPassiveDecode to start passive decoding of the window.
  4. Call NET_DVR_MatrixSendData to send data to window to be decoded and displayed.
  5. Optional: Perform the following operation(s) after starting passive decoding and displaying.
    Option Description

    Get passive decoding status

    Call NET_DVR_MatrixGetPassiveDecodeStatus to get the status (e.g., paused, resumed) of passive decoding.

    Control passive decoding

    Call NET_DVR_MatrixPassiveDecodeControl to pause/resume passive decoding, perform fast/slow passive decoding, and control audio.

    Note:

    Before controlling passive decoding, you'd better call NET_DVR_MatrixGetPassiveDecodeStatus to get the current passive decoding status for reference.

    Get window decoding information

    Call NET_DVR_GetDeviceStatus with "NET_DVR_MATRIX_GETWINSTATUS" (command No.: 9009) and set lpInBuffer to the structure NET_DVR_WALLWIN_INFO for getting the decoding information (e.g., stream format, frame rate, resolution, number of decoded frames) of the current window.

    The decoding information is returned in the structure NET_DVR_WALL_WIN_STATUS by lpOutBuffer.

  6. Call NET_DVR_MatrixStopPassiveDecode to stop the passive decoding.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.