zoukankan      html  css  js  c++  java
  • 智能安防监控系统EasyCVR平台中性版本自定义title和copyright时效问题排查

    近一个星期,TSINGSEE青犀视频的研发人员都在对EasyCVR的中性版本做研发和测试。中性版本即开放版本,中性版本的用户将不限制授权方式和授权期限,均可对平台内的title和copyright自定义。

    EasyCVR V1.1.12 中性版本支持自定义title功能,测试使用过程中发现自定义的title会莫名丢失,恢复到默认EasyCVR的title和copyright。

    经过反复测试,发现当配置完录像计划再点击保存后,系统会清空原先设置的title,copyright,播放器等参数。

    调出开发者模式检查,我们发现问题出在了调用setotherconfig接口上,调用接口传入参数不全。

    完整接口参数如下:

    因此在调用的时候,将完整参数传入即可。

    func (h *APIHandler) SetOtherConfig(c *gin.Context) {
       type Form struct {
          Default       int
          AllMediaType  string
          DefaultPlayer string
          SaveDay       int
          SaveThreshold int
          Title         string
          Copyright     string
          IsAdvertising bool
          PlayerLogo    int
       }
       var form = Form{}
       if err := c.Bind(&form); err != nil {
          return
       }
       ack := NewMsgAck()
       ack.EasyDarwin.Header.MessageType = MSG_SC_SERVER_SET_SSL_CONFIG_ACK
       utils.SaveToConf("play_media_type", map[string]string{
          "default":        fmt.Sprintf("%d", form.Default),
          "all_media_type": fmt.Sprintf("%s", form.AllMediaType),
          "default_player": fmt.Sprintf("%s", form.DefaultPlayer),
       })
       utils.SaveToConf("record", map[string]string{
          "save_day":       fmt.Sprintf("%d", form.SaveDay),
          "save_threshold": fmt.Sprintf("%d", form.SaveThreshold),
       })
       utils.SaveToConf("bottom", map[string]string{
          "title":     fmt.Sprintf("%s", form.Title),
          "copyright": fmt.Sprintf("%s", form.Copyright),
       })
       utils.SaveToConf("module", map[string]string{
          "is_advertising": fmt.Sprintf("%t", form.IsAdvertising),
       })
       utils.SaveToConf("player", map[string]string{
          "nologo": fmt.Sprintf("%d", form.PlayerLogo),
       })
       c.IndentedJSON(http.StatusOK, ack)
    }
  • 相关阅读:
    WPF程序内存泄漏问题文章推荐
    UAC影响读写文件和注册表
    .NET COM Interop 中的ReleaseComObject使用准则
    读Excel数据并导入到数据库中最快的方法
    DEP问题文章推荐
    深入了解GC文章推荐
    IIS 发布网站
    iis5.1安装方法(适用于XP),IIS5.0安装包下载、IIS5.1安装包下载、IIS6.0安装包下载
    单击GridView的某一行 根据此行id得到这行的所有信息
    asp.net背景图片自动适应屏幕大小
  • 原文地址:https://www.cnblogs.com/TSINGSEE/p/14481802.html
Copyright © 2011-2022 走看看