diff --git a/pom.xml b/pom.xml index 0b5fec8a..62b9d926 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - 4.0.0 @@ -12,7 +12,7 @@ com.genersoft wvp web video platform - + UTF-8 @@ -42,15 +42,15 @@ spring-boot-starter-tomcat - org.springframework.boot - spring-boot-starter-web - + org.springframework.boot + spring-boot-starter-web + - org.springframework - spring-context - - - + org.springframework + spring-context + + + com.alibaba @@ -62,7 +62,7 @@ mysql-connector-java 5.1.30 - + org.mybatis @@ -74,7 +74,7 @@ mybatis-spring ${mybatis.spring.version} - + com.github.pagehelper @@ -99,7 +99,7 @@ fastjson 1.2.33 - + @@ -112,13 +112,13 @@ springfox-swagger-ui 2.6.1 - + org.springframework.boot spring-boot-starter-aop - + javax.sip jain-sip-ri diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java index d12f832c..bfdc8f6c 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -103,7 +103,7 @@ public class SipLayer implements SipListener { ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(), "UDP"); SipProvider udpSipProvider = sipStack.createSipProvider(udpListeningPoint); udpSipProvider.addSipListener(this); - logger.info("Sip Server TCP 启动成功 port {" + sipConfig.getSipPort() + "}"); + logger.info("Sip Server UDP 启动成功 port {" + sipConfig.getSipPort() + "}"); return udpSipProvider; } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/OfflineEventListener.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/OfflineEventListener.java index e991a293..4adc8fba 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/OfflineEventListener.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/OfflineEventListener.java @@ -54,7 +54,5 @@ public class OfflineEventListener implements ApplicationListener { // 处理离线监听 storager.outline(event.getDeviceId()); - - // } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java index 02f7e935..f4411e1c 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java @@ -203,7 +203,7 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor { deviceChannel.setLongitude(itemDevice.element("Longitude") == null? 0.00:Double.parseDouble(XmlUtil.getText(itemDevice,"Longitude"))); deviceChannel.setLatitude(itemDevice.element("Latitude") == null? 0.00:Double.parseDouble(XmlUtil.getText(itemDevice,"Latitude"))); deviceChannel.setPTZType(itemDevice.element("PTZType") == null? 0:Integer.parseInt(XmlUtil.getText(itemDevice,"PTZType"))); - deviceChannel.setHasAudio(false); // 默认含有音频为false + deviceChannel.setHasAudio(true); // 默认含有音频,播放时再检查是否有音频及是否AAC storager.updateChannel(device.getDeviceId(), deviceChannel); } diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMUtils.java index f88d59c6..422f6220 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMUtils.java @@ -36,7 +36,7 @@ public class ZLMUtils { System.out.println(newPort); System.out.println(jsonObject.toJSONString()); return newPort; - }else { + } else { return getNewRTPPort(ssrc); } } @@ -48,11 +48,14 @@ public class ZLMUtils { udpPortRangeArray[1] = Integer.parseInt(udpPortRangeStrArray[1]); } - if (currentPort == 0 || currentPort ++ > udpPortRangeArray[1]) { + if (currentPort == 0 || currentPort++ > udpPortRangeArray[1]) { currentPort = udpPortRangeArray[0]; return udpPortRangeArray[0]; - }else { - return currentPort ++; + } else { + if (currentPort % 2 == 1) { + currentPort++; + } + return currentPort++; } } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9271ee28..ec497898 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -46,6 +46,6 @@ media: #zlm服务器的ip与http端口, 重点: 这是http端口 streamNoneReaderDelayMS: 1800000 # 无人观看多久自动关闭流 rtp: # 启用udp多端口模式 enable: true - udpPortRange: 30000,300500 # 端口范围 + udpPortRange: 30000,30500 # 端口范围 diff --git a/web_src/index.html b/web_src/index.html index 4761547f..cb0b3df9 100644 --- a/web_src/index.html +++ b/web_src/index.html @@ -3,7 +3,7 @@ - gb_web + GB28181 diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index 8e6638a8..c478e6e3 100644 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -1,359 +1,346 @@ diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue index 18a8d51b..97fb7620 100644 --- a/web_src/src/components/gb28181/devicePlayer.vue +++ b/web_src/src/components/gb28181/devicePlayer.vue @@ -1,379 +1,375 @@