开发者平台

TP-LINK官网首页
开发者平台 / 视频管理系统(VMS)/API功能接口定义/设备消息透传

4.13.8 解码器画面配置

4.13.8.1 获取屏幕配置信息

              // 请求:
              {
                 "method": "do", 
                 "dem":
                 {
                   "screen_info_get":{}
                 }
              }
              
              // 响应:
              {
                 "dem":
                 {
                   "screen_info":
                   [
                     {
                      {
                        "screen_idx":1,
                        "name":"TV1",                          
                        "coord":"0,0",                         
                        "active":0,                          
                        "res":"1920,1080",                         
                        "mode":"LED",                          
                        "label_enable":"on",                         
                        "image_mode": "custom"                          
                        "image_luma": 50,                          
                        "image_hue": 50,                         
                        "image_contrast": 50,                          
                        "image_sharpness": 50,                         
                        "image_saturation":50                         
                      },
                      {
                        "screen_idx":2,
                        "name":"TV2",
                        "coord":"0,0",
                        "active":0,
                        "res":"1920,1080",
                        "mode":"LED",
                        "label_enable":"on",
                        "image_mode": "custom",
                        "image_luma": 50,
                        "image_hue": 50,
                        "image_contrast": 50,
                        "image_sharpness": 50,
                        "image_saturation":50
                      },
                      {
                        "screen_idx":3,
                        "name":"TV3",
                        "coord":"0,0",
                        "active":0,
                        "res":"1920,1080",
                        "mode":"LED",
                        "label_enable":"on",
                        "image_mode": "custom",
                        "image_luma": 50,
                        "image_hue": 50,
                        "image_contrast": 50,
                        "image_sharpness": 50,
                        "image_saturation":50
                      },
                      {
                        "screen_idx":4,
                        "name":"TV4",
                        "coord":"0,0",
                        "active":0,
                        "res":"1920,1080",
                        "mode":"LED",
                        "label_enable":"on",
                        "image_mode": "custom",
                        "image_luma": 50,
                        "image_hue": 50,
                        "image_contrast": 50,
                        "image_sharpness": 50,
                        "image_saturation":50
                      }
                   ]
                 },
                    "error_code": 0
              }                                                                                                                
            

响应参数说明:

参数 类型 说明
screen_idx 整型 屏幕序号
name 字符串 屏幕的自定义名称
coord 字符串 屏幕坐标位置,格式为“x,y”
active 整型 屏幕是否配对激活
res 字符串 屏幕分辨率,格式为“宽,高”
mode 字符串 显示器模式:
LED:LED模式
LCD:LCD模式
label_enable 字符串 是否显示屏幕标签:
on:显示
off:不显示
image_mode 字符串 屏幕显示模式:
normal:标准模式
bright:明亮模式
gentle:柔和模式
color:鲜艳模式
custom:自定义模式
image_luma 整型 屏幕显示亮度,范围[1,100]
image_hue 整型 屏幕显示色调,范围[1,100]
image_contrast 整型 屏幕显示对比度,范围[1,100]
image_sharpness 整型 屏幕显示清晰度,范围[1,100]
image_saturation 整型 屏幕显示饱和度,范围[1,100]

4.13.8.2 获取场景信息

              // 请求:
              {
                "method": "do", 
                "dem":
                {
              "scene_info_get":{}
                }
              }
              
              // 响应:
              {
                "dem":
              {
                   "scene_info":
                   [
              {
              "scene_idx":1,
              "name":"默认场景",
                         "panel_num":3,
                         "panel_chn_num":18,
                         "amplified_idx":4,,
                         "amplified_chn":2,
                         "index":1
              },
              {
              "scene_idx":2,
                         "name":"车库大门",
                         "panel_num":5,
                         "panel_chn_num":5,
                         "amplified_idx":3,
                         "amplified_chn":1,
                         "index":2
              }
              ]
              },
                "error_code": 0
              }                                                                                                               
            

响应参数说明:

参数 类型 说明
scene_idx 整型 场景序号(从1开始)
name 字符串 场景名称
panel_num 字符串 场景中画布的数量
panel_chn_num 字符串 场景中画布通道的总数
amplified_idx 字符串 处于全屏放大中的画布通道所在的画布序号(非零值表示处于全屏放大状态)
amplified_chn 字符串 处于全屏放大中的画布通道的序号
index 字符串 表示场景下拉列表中的顺序

4.13.8.3 获取场景控制信息

              // 请求:
              {
                "method": "do", 
                "dem":
                {
              "scene_ctrl_info_get":{}
                }
              }
              
              // 响应:
              {
                "dem":
                {
                  "scene_ctrl":
                  {
                    "scene_idx": 1,
                    "scene_num": 1,
                    "scene_polling": 0
                  }
                },
                "error_code": 0
              }                                                                                                                       
            

响应参数说明:

参数 类型 说明
scene_idx 整型 当前场景序号
scene_num 整型 创建的场景总数
scene_polling 整型 是否开启场景轮巡:
0:关闭
1:开启

4.13.8.4 获取场景中画布数据

              // 请求:
              {
                "method": "do", 
                "dem":
                {
                   "panel_info_get": 
                   {
                       "scene_idx": 1
                   }
              }
              
              // 响应:
              {
                  "dem":
                  {
                      "panel_info":
                      [
                          {
                              "panel_idx":1,
                              "rect":"0%2c0%2c10000%2c10000",
                              "region_num":4
                          }
                      ]
                  },
                  "error_code": 0
              }                                                                                                                          
            

请求参数说明:

参数 类型 说明
scene_idx 整型 场景序号

响应参数说明:

参数 类型 说明
panel_idx 整型 画布序号
rect 字符串 画布的位置信息,格式为x,y,w,h
region_num 整型 画布的画面数

4.13.8.5 获取场景中画布备份数据

              // 请求:
              {
                 "method": "do", 
                 "dem":
                 {
                   "panel_backup_info_get":{"scene_idx":1}
                 }
              }
              
              // 响应:
              {
                 "dem":
                 {
                   "panel_backup_info":
                   [
                     {
                       "panel_idx": 1,
                       "region_num": 9,
                       "amplified_chn": 1
                     },
                     {
                       "panel_idx": 2,
                       "region_num": 16,
                       "amplified_chn": 9
                     },
                     {
                       "panel_idx": 3,
                       "region_num": "4",
                       "amplified_chn": 2
                     }
                   ]
                 },
                 "error_code": 0
              }                                                                                                                              
            

请求参数说明:

参数 类型 说明
scene_idx 整型 请求的场景序号

响应参数说明:

参数 类型 说明
panel_idx 整型 备份画布的序号
region_num 整型 备份画布的画面数
amplified_chn 整型 备份画布中被放大的通道序号

4.13.8.6 获取画布中通道数据

              // 请求:
              {
                 "method": "do", 
                 "dem":
                 {
                   "panel_chn_info_get":
                   {
                     "scene_idx": 1,
                     "panel_idx": [1, 2]
                   }
                 }
              }
              
              // 响应:
              {
              "dem":
              {
                "panel1_chn_info":
                [
                  {
                    "panel_chn": 1,
                    "ipc_chn": 1,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  }, 
                  {
                    "panel_chn": 2,
                    "ipc_chn": 5,
                    "stream_type": 1,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  },
                  {
                    "panel_chn": 3,
                    "ipc_chn": -1,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  }, 
                  {
                    "panel_chn": 4,
                    "ipc_chn": 9,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  },
                ],
                "panel2_chn_info":
                [
                  {
                    "panel_chn": 1,
                    "ipc_chn": -1,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  },
                  {
                    "panel_chn": 2,
                    "ipc_chn": 3,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  },
                  {
                    "panel_chn": 3,
                    "ipc_chn": -1,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  },
                  {
                    "panel_chn": 4,
                    "ipc_chn": 2,
                    "stream_type": 0,
                    "real_stream_type":0,
                    "bitrate": 2048,
                    "vol":-1,
                    "vcodec":0,
                    "width":1920,
                    "height":1080,
                    "preview_strategy":2,
                    "pause":0
                  }
                ]
              },
              "error_code": 0
              }                                                                                          
            

请求参数说明:

参数 类型 说明
scene_idx 整型 要获取的panel所在的场景
panel_idx 数组 要获取的penel的下标集合

响应参数说明:

参数 类型 说明
panel_chn 整型 画布中的通道序号
ipc_chn 整型 对应的IPC通道,-1表示未添加
stream_type 整型 通道的码流类型:
0:高清(主码流)
1:流畅(子码流)
2:自动
real_stream_type 整型 通道实际使用的码流类型,当stream_type值为2时自动根据real_stream_type判断当前画面实际使用的码流
0:高清(主码流)
1:流畅(子码流)
bitrate 整型 通道实时码率,单位kbps
vol 整型 通道音量:
-1:通道不支持音频
0-100:通道实际音量,0表示静音
vcodec 整型 通道编码方式:
0:H.264
1:H.265
width 整型 通道图像分辨率宽度
height 整型 通道图像分辨率高度
preview_strategy 整型 通道预览解码策略:
0:实时模式
1:流畅模式
2:均衡模式
pause 整型 通道暂停选项:
0:未暂停
1:已暂停

4.13.8.7 获取备份画布中通道数据

              // 请求:
              {
                 "method": "do", 
                 "dem":
                 {
                   "panel_chn_backup_info_get":
                   {
                     "scene_idx": 1,
                     "panel_idx": [1, 2]
                   }
                 }
              }
              
              // 响应:
              {
              "dem":
              {
                 "panel1_chn_backup_info":
                 [
                   {
                     "panel_chn": 1,
                     "ipc_chn": 1,
                     "stream_type": 0
                   },
                   {
                     "panel_chn": 2,
                     "ipc_chn":5,
                     "stream_type": 1
                   },
                   {
                     "panel_chn": 3,
                     "ipc_chn": -1,
                     "stream_type": 0
                   },
                   {
                     "panel_chn": 4,
                     "ipc_chn": 9,
                     "stream_type": 0
                   }
                 ],
                 "panel2_chn_backup_info":
                 [
                   {
                     "panel_chn": 1,
                     "ipc_chn": -1,
                     "stream_type": 0
                   },
                   {
                     "panel_chn": 2,
                     "ipc_chn": 3,
                     "stream_type": 0
                   },
                   {
                     "panel_chn": 3,
                     "ipc_chn": -1,
                     "stream_type": 0
                   },
                   {
                     "panel_chn": 4,
                     "ipc_chn": 2,
                     "stream_type": 0
                   }
                 ]
              },
              "error_code": 0
              }                                                                                                                       
            

请求参数说明:

参数 类型 说明
scene_idx 整型 要获取的panel所在的场景
panel_idx 数组 要获取的penel的下标集合

响应参数说明:

参数 类型 说明
panel_chn 整型 画布中的通道序号
ipc_chn 整型 对应的IPC通道,-1表示未添加
stream_type 整型 通道的码流类型:
0:高清(主码流)
1:流畅(子码流)
2:自动