Browse Source

添加兼容目录同步兼容性

648540858 2 years ago
parent
commit
deeff5533b

+ 9 - 4
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java

@@ -380,13 +380,18 @@ public class XmlUtil {
                         }
                     }
                     // 父设备/区域/系统ID
-                    String realParentId = parentID;
-                    if (!ObjectUtils.isEmpty(parentID)) {
+
+                    if (!ObjectUtils.isEmpty(parentID) ) {
                         if (parentID.contains("/")) {
                             String[] parentIdArray = parentID.split("/");
-                            realParentId = parentIdArray[parentIdArray.length - 1];
+                            deviceChannel.setParentId(parentIdArray[parentIdArray.length - 1]);
+                        }else {
+                            if (parentID.length()%2 == 0) {
+                                deviceChannel.setParentId(parentID);
+                            }else {
+                                logger.warn("[xml解析] 不规范的parentID:{}, 已舍弃", parentID);
+                            }
                         }
-                        deviceChannel.setParentId(realParentId);
                     }else {
                         if (!ObjectUtils.isEmpty(businessGroupID)) {
                             deviceChannel.setParentId(businessGroupID);

+ 0 - 2
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

@@ -447,8 +447,6 @@ public class ZLMHttpHookListener {
         if ("rtp".equals(param.getApp())) {
             ret.put("close", userSetting.getStreamOnDemand());
             // 国标流, 点播/录像回放/录像下载
-//            StreamInfo streamInfoForPlayCatch = redisCatchStorage.queryPlayByStreamId(param.getStream());
-
             InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream());
             // 点播
             if (inviteInfo != null) {