From 206f47f42ac9c679da1a4154b58d37441360f068 Mon Sep 17 00:00:00 2001 From: "shizy@yisa.com" Date: Wed, 29 Dec 2021 17:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E4=BF=A1=E6=81=AF=E4=BF=A1=E4=BB=A4Catalog=E4=B8=8D?= =?UTF-8?q?=E6=A0=87=E5=87=86=E9=97=AE=E9=A2=98=20PTZType=EF=BC=8C?= =?UTF-8?q?=E7=BA=A7=E8=81=94=E7=9A=84Longitude=E3=80=81Latitude=E3=80=81P?= =?UTF-8?q?TZType=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/cmd/impl/SIPCommanderFroPlatform.java | 8 +++++++- .../response/cmd/CatalogResponseMessageHandler.java | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java index 65348ab6..cf8b0a56 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java @@ -222,7 +222,13 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { catalogXml.append("" + channel.getSecrecy() + "\r\n"); catalogXml.append("" + channel.getRegisterWay() + "\r\n"); catalogXml.append("" + (channel.getStatus() == 0?"OFF":"ON") + "\r\n"); - catalogXml.append("\r\n"); + catalogXml.append("" + channel.getLongitude() + "\r\n"); + catalogXml.append("" + channel.getLatitude() + "\r\n"); + catalogXml.append("" + channel.getIpAddress() + "\r\n"); + catalogXml.append("" + channel.getPort() + "\r\n"); + catalogXml.append("\r\n"); + catalogXml.append("" + channel.getPTZType() + "\r\n"); + catalogXml.append("\r\n"); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java index f8da94b5..9e150689 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java @@ -166,10 +166,11 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp } else { deviceChannel.setLatitude(0.00); } - if (getText(itemDevice, "PTZType") == null || getText(itemDevice, "PTZType") == "") { + Element InfoNode = channelDeviceElement.element("Info"); + if (getText(InfoNode, "PTZType") == null || getText(InfoNode, "PTZType") == "") { deviceChannel.setPTZType(0); } else { - deviceChannel.setPTZType(Integer.parseInt(getText(itemDevice, "PTZType"))); + deviceChannel.setPTZType(Integer.parseInt(getText(InfoNode, "PTZType"))); } deviceChannel.setHasAudio(true); // 默认含有音频,播放时再检查是否有音频及是否AAC channelList.add(deviceChannel);