zoukankan      html  css  js  c++  java
  • web/IOS/android视频智能分析平台EasyCVR接入视频对通道分组后通道仍显示为空如何修复?

    作为TSINGSEE青犀视频开发的视频协议融合共享平台EasyCVR,我们一直在尽力拓宽更多的协议兼容,近期我们在原本的协议上又增加了RTMP,EasyCVR成为TSINGSEE青犀视频真正可以兼容市面常见协议的视频流媒体智能分析平台。

    在测试EasyCVR分组功能期间,用户添加分组赋值通道过后,添加成功了,但是查看分组通道却显示为空。

    此时sql语句为下图中内容:

    通过检查sql语句发现是设备通道表名使用的是国标设备的表名,需要改为总的EasyCVR的表名,修改代码如下:

           querysql := fmt.Sprintf(`label_id=%d`, labelid)
           selectstr := fmt.Sprintf(`%s.name as channel_name,%s.parent_device_id as parent_device_id,
           %s.online as channel_online,%s.channel_type as channel_type,
    %s.snap_url as snap_url,%s.on_demand as on_demand,
    %s.device_name as device_name,%s.channel_device_id as device_id,%s.channel_id as channel_id`, channelTableName, channelTableName, channelTableName,
                  channelTableName, channelTableName, channelTableName, deviceTableName, labelChannelTableName, labelChannelTableName)
           joinstr := fmt.Sprintf(`left join %s on %s.channel_id=%s.channel_id 
           and %s.channel_device_id=%s.parent_device_id
           left join %s on %s.channel_device_id=%s.device_id`, channelTableName, labelChannelTableName,
                  channelTableName, labelChannelTableName, channelTableName, deviceTableName, labelChannelTableName, deviceTableName)
    
           q := dbclient.Table(labelChannelTableName).
                  Select(selectstr).
                  Joins(joinstr).Where(querysql)
           session := sessions.Default(c)
    
    

    再次查看分组显示正常:

    此时sql语句如下:

    SELECT DBChannelInfo.name as channel_name,DBChannelInfo.parent_device_id as parent_device_id,
            DBChannelInfo.online as channel_online,DBChannelInfo.channel_type as channel_type,
    DBChannelInfo.snap_url as snap_url,DBChannelInfo.on_demand as on_demand,
    Device.device_name as device_name,t_label_channel.channel_device_id as device_id,t_label_channel.channel_id as channel_id FROM "t_label_channel" left join DBChannelInfo on t_label_channel.channel_id=DBChannelInfo.channel_id
            and t_label_channel.channel_device_id=DBChannelInfo.parent_device_id
            left join Device on t_label_channel.channel_device_id=Device.device_id WHERE (label_id=2)
    
    

    EasyCVR按需灵活扩展、收缩资源,免去了插件安装、浏览器限定等条件,实现了无插件、多平台自由观看回放,并且支持阿里云、腾讯云、华为云、七牛云等,支持S3和Swift接口的对象存储服务。如果大家对EasyCVR视频平台感兴趣或者有测试需求,欢迎联系我们。

  • 相关阅读:
    Bootstrap模态框modal的高度和宽度设置
    入门学习Linux常用必会命令实例详解
    Linux 系统中用户切换(su user与 su
    hdu 3549 Flow Problem(最大流模板题)
    第三章 学后心得及总结 【物联网1132-11】
    Find Minimum in Rotated Sorted Array 旋转数组中找最小值 @LeetCode
    面试题4
    Fp关联规则算法计算置信度及MapReduce实现思路
    POJ 1679 The Unique MST 推断最小生成树是否唯一
    论程序猿的社会地位
  • 原文地址:https://www.cnblogs.com/TSINGSEE/p/14442789.html
Copyright © 2011-2022 走看看