Configure Auto-Switch Decoding

For multiple signal sources, you can decode and display the videos on video wall in auto-switch mode. The auto-switch decoding mode is also a dynamic decoding mode, which automatically switches the display of signal sources' videos in a specific time interval.

Figure 1 API Calling Flow of Configuring Auto-Switch 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. Optional: Call NET_DVR_GetInputSignalList_V40 to get the signal source parameters.
  4. Call NET_DVR_MatrixSetLoopDecChanInfo_V41 to set the parameters of auto-switch decoding channel for window.
    Note:

    Before setting auto-switch channel parameters, you'd better call NET_DVR_MatrixGetLoopDecChanInfo_V41 to get the current configurations for reference.

  5. Call NET_DVR_MatrixSetLoopDecChanEnable to enable or disable auto-switch.
    Note:

    Before setting auto-switch status, you'd better call NET_DVR_MatrixGetLoopDecChanEnable to get the current status for reference.

  6. Call NET_DVR_MatrixSetDecChanEnable to pause or resume the dynamic decoding.
    Note:
    • Before setting dynamic decoding status, you'd better call NET_DVR_MatrixGetDecChanEnable to get the current status for reference.

    • If the auto-switch is disabled, but the dynamic decoding is resumed, the current decoding mode of this window is dynamic decoding. Only when the auto-switch and dynamic decoding are both enabled or resumed, the decoding mode turns to auto-switch decoding.

  7. Optional: 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.

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