648540858 / wvp-GB28181-pro

WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的网络视频平台,支持NAT穿透,支持海康、大华、宇视等品牌的IPC、NVR、DVR接入。支持国标级联,支持rtsp/rtmp等视频流转发到国标平台,支持rtsp/rtmp等推流转发到国标平台。
https://doc.wvp-pro.cn
MIT License
4.61k stars 1.39k forks source link

技术咨询 #1425

Closed asdxuchao closed 1 month ago

asdxuchao commented 2 months ago

内容描述: 本来设备注册后,发起Catalog目录查询能成功注册通道100多个通道,但是过了一会,莫名其妙的收到如下数据包,导致会触发如下代码,最后通道就剩下这一个了,请问是设备那边的问题吗?不知道这种情况是否是注释中说的“// 数据已经完整接收, 此时可能存在某个设备离线变上线的情况,但是考虑到性能,此处不做处理,”

代码

if (catalogDataCatch.get(take.getDevice().getDeviceId()).size() == sumNum) {
      // 数据已经完整接收, 此时可能存在某个设备离线变上线的情况,但是考虑到性能,此处不做处理,
      // 目前支持设备通道上线通知时和设备上线时向上级通知
      boolean resetChannelsResult = storager.resetChannels(take.getDevice().getDeviceId(), catalogDataCatch.get(take.getDevice().getDeviceId()));
      if (!resetChannelsResult) {
          String errorMsg = "接收成功,写入失败,共" + sumNum + "条,已接收" + catalogDataCatch.get(take.getDevice().getDeviceId()).size() + "条";
          catalogDataCatch.setChannelSyncEnd(take.getDevice().getDeviceId(), errorMsg);
      } else {
          catalogDataCatch.setChannelSyncEnd(take.getDevice().getDeviceId(), null);
      }
  }

日志

<sip:42030400001118000011@4203040000>;tag=88730201533560762243666882811291
To: <sip:42030400001110000001@4203040000>
Call-ID: 1696291492@192.168.9.200
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: Tiandy Tech SIP Agent
Content-Length: 622

<?xml version="1.0" encoding="GB2312"?>
<Response>
<CmdType>Catalog</CmdType>
<SN>320</SN>
<DeviceID>42030400001118000011</DeviceID>
<SumNum>1</SumNum>
<DeviceList Num="1">
<Item>
<DeviceID>42030463001310000163</DeviceID>
<Name>�ϻ���һ�� ���ҿ�</Name>
<Manufacturer>Tiandy Tech</Manufacturer>
<Model>DVR</Model>
<Owner>Tiandy Tech</Owner>
<CivilCode>420304</CivilCode>
<Address>192.168.9.200</Address>
<Parental>0</Parental>
<ParentID>42030400001118000011</ParentID>
<SafetyWay>0</SafetyWay>
<RegisterWay>1</RegisterWay>
<Secrecy>0</Secrecy>
<Status>OFF</Status>
</Item>
</DeviceList>
</Response>
648540858 commented 2 months ago

我感觉没关系,如果有100多个通道,无论如何消息里的

<SumNum>1</SumNum>

都不应该存在