Update Live Streaming Capacity

2022-06-23
No Rating

Live Capacity

The field live_capacity is placed in the thing model of the gateway device and is only pushed when there is a state change on the device.

Communication method: MQTT

API interface:

PUB/SUB Topic: thing/product/#{pid}/state

Parameter Description:

  • #{pid}:Refers to the product ID of the gateway device, which is usually expressed by the SN number of the device, and is different for each device. So you need to use a wildcard when the server side subscribes to topic.

  • This topic sends data in several different fields at the same time. An example of the payload segment of live_capacity is as follows.

{
  "bid": "3db58aed-d6c4-4790-99b8-24cc5b9673ff",
  "data": {
    "live_capacity": {
      "available_video_number": 2,
      "coexist_video_number_max": 1,
      "device_list": [
        {
          "available_video_number": 2,
          "camera_list": [
            {
              "available_video_number": 1,
              "camera_index": "42-0-0",		// type-sub_type-gimbal index
              "coexist_video_number_max": 1,
              "video_list": [
                {
                  "video_index": "zoom-0",
                  "video_type": "zoom"
                },
                {
                  "video_index": "wide-0",
                  "video_type": "wide"
                }
              ]
            },
            {
              "available_video_number": 1,
              "camera_index": "39-0-7",
              "coexist_video_number_max": 1,
              "video_list": [
                {
                  "video_index": "normal-0",
                  "video_type": "normal"
                }
              ]
            }
          ],
          "coexist_video_number_max": 0,
          "sn": "1ZNDH1D0010054"
        }
      ]
    }
  },
  "tid": "de3b71b3-658a-4e2c-bcb2-adf1511eaa55",
  "timestamp": 1638793080938,
  "gateway": "1ZMDGBW0000135"
}