Commit 6560a7ad3830f28eedaeb65c84c27e2f9289db5c
Committed by
GitHub
Merge pull request #136 from lawrencehj/wvp-28181-2.0
解决hook.ip未设置时不能取默认值的问题等
Showing
15 changed files
with
3 additions
and
24 deletions
src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java
| 1 | 1 | package com.genersoft.iot.vmp.conf; |
| 2 | 2 | |
| 3 | -import com.genersoft.iot.vmp.gb28181.session.SsrcConfig; | |
| 4 | 3 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 5 | 4 | import org.springframework.beans.factory.annotation.Value; |
| 6 | 5 | import org.springframework.context.annotation.Configuration; |
| ... | ... | @@ -171,7 +170,7 @@ public class MediaConfig{ |
| 171 | 170 | mediaServerItem.setId(id); |
| 172 | 171 | mediaServerItem.setIp(ip); |
| 173 | 172 | mediaServerItem.setDefaultServer(true); |
| 174 | - mediaServerItem.setHookIp(hookIp); | |
| 173 | + mediaServerItem.setHookIp(getHookIp()); | |
| 175 | 174 | mediaServerItem.setSdpIp(sdpIp); |
| 176 | 175 | mediaServerItem.setStreamIp(streamIp); |
| 177 | 176 | mediaServerItem.setHttpPort(httpPort); | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/WVPTimerTask.java
| 1 | 1 | package com.genersoft.iot.vmp.conf; |
| 2 | 2 | |
| 3 | -import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; | |
| 4 | 3 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 5 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 5 | import org.springframework.scheduling.annotation.Scheduled; | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SsrcTransaction.java
src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
| ... | ... | @@ -2,22 +2,16 @@ package com.genersoft.iot.vmp.gb28181.session; |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.List; |
| 5 | -import java.util.Map; | |
| 6 | -import java.util.concurrent.ConcurrentHashMap; | |
| 7 | 5 | |
| 8 | 6 | import javax.sip.ClientTransaction; |
| 9 | 7 | import javax.sip.Dialog; |
| 10 | -import javax.sip.message.Request; | |
| 11 | 8 | |
| 12 | 9 | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| 13 | 10 | import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction; |
| 14 | -import com.genersoft.iot.vmp.service.IMediaServerService; | |
| 15 | 11 | import com.genersoft.iot.vmp.utils.SerializeUtils; |
| 16 | -import com.genersoft.iot.vmp.utils.redis.JedisUtil; | |
| 17 | 12 | import com.genersoft.iot.vmp.utils.redis.RedisUtil; |
| 18 | 13 | import gov.nist.javax.sip.stack.SIPDialog; |
| 19 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | -import org.springframework.data.redis.core.RedisTemplate; | |
| 21 | 15 | import org.springframework.stereotype.Component; |
| 22 | 16 | |
| 23 | 17 | /** | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java
| ... | ... | @@ -7,7 +7,6 @@ import javax.sip.header.CSeqHeader; |
| 7 | 7 | import javax.sip.message.Request; |
| 8 | 8 | import javax.sip.message.Response; |
| 9 | 9 | |
| 10 | -import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; | |
| 11 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; |
| 12 | 11 | import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; |
| 13 | 12 | import com.genersoft.iot.vmp.service.IMediaServerService; | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -24,7 +24,6 @@ import gov.nist.javax.sip.SipProviderImpl; |
| 24 | 24 | import gov.nist.javax.sip.SipStackImpl; |
| 25 | 25 | import gov.nist.javax.sip.message.SIPRequest; |
| 26 | 26 | import gov.nist.javax.sip.stack.SIPDialog; |
| 27 | -import gov.nist.javax.sip.stack.SIPTransaction; | |
| 28 | 27 | import org.slf4j.Logger; |
| 29 | 28 | import org.slf4j.LoggerFactory; |
| 30 | 29 | import org.springframework.beans.factory.annotation.Autowired; | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/response/impl/InviteResponseProcessor.java
| ... | ... | @@ -3,7 +3,6 @@ package com.genersoft.iot.vmp.gb28181.transmit.response.impl; |
| 3 | 3 | import java.text.ParseException; |
| 4 | 4 | |
| 5 | 5 | import javax.sip.*; |
| 6 | -import javax.sip.address.Address; | |
| 7 | 6 | import javax.sip.address.SipURI; |
| 8 | 7 | import javax.sip.header.CSeqHeader; |
| 9 | 8 | import javax.sip.message.Request; | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java
src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| ... | ... | @@ -34,7 +34,6 @@ import org.springframework.stereotype.Service; |
| 34 | 34 | import org.springframework.util.ResourceUtils; |
| 35 | 35 | import org.springframework.web.context.request.async.DeferredResult; |
| 36 | 36 | |
| 37 | -import javax.sip.ClientTransaction; | |
| 38 | 37 | import javax.sip.message.Response; |
| 39 | 38 | import java.io.FileNotFoundException; |
| 40 | 39 | import java.util.UUID; | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java
| ... | ... | @@ -14,7 +14,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 14 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 15 | 15 | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 16 | 16 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 17 | -import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; | |
| 18 | 17 | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| 19 | 18 | |
| 20 | 19 | import io.swagger.annotations.Api; | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
| ... | ... | @@ -14,7 +14,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 14 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 15 | 15 | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 16 | 16 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 17 | -import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; | |
| 18 | 17 | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| 19 | 18 | |
| 20 | 19 | import io.swagger.annotations.Api; | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
| ... | ... | @@ -37,7 +37,6 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| 37 | 37 | import org.springframework.web.context.request.async.DeferredResult; |
| 38 | 38 | |
| 39 | 39 | import java.util.List; |
| 40 | -import java.util.Map; | |
| 41 | 40 | import java.util.UUID; |
| 42 | 41 | |
| 43 | 42 | import javax.sip.message.Response; |
| ... | ... | @@ -102,7 +101,7 @@ public class PlayController { |
| 102 | 101 | @GetMapping("/stop/{deviceId}/{channelId}") |
| 103 | 102 | public DeferredResult<ResponseEntity<String>> playStop(@PathVariable String deviceId, @PathVariable String channelId) { |
| 104 | 103 | |
| 105 | - logger.debug(String.format("设备预览/回放停止API调用,streamId:%s/$s", deviceId, channelId )); | |
| 104 | + logger.debug(String.format("设备预览/回放停止API调用,streamId:%s/%s", deviceId, channelId )); | |
| 106 | 105 | |
| 107 | 106 | UUID uuid = UUID.randomUUID(); |
| 108 | 107 | DeferredResult<ResponseEntity<String>> result = new DeferredResult<ResponseEntity<String>>(); |
| ... | ... | @@ -148,7 +147,7 @@ public class PlayController { |
| 148 | 147 | |
| 149 | 148 | // 超时处理 |
| 150 | 149 | result.onTimeout(()->{ |
| 151 | - logger.warn(String.format("设备预览/回放停止超时,deviceId/channelId:%s/$s ", deviceId, channelId)); | |
| 150 | + logger.warn(String.format("设备预览/回放停止超时,deviceId/channelId:%s/%s ", deviceId, channelId)); | |
| 152 | 151 | RequestMessage msg = new RequestMessage(); |
| 153 | 152 | msg.setId(DeferredResultHolder.CALLBACK_CMD_STOP + uuid); |
| 154 | 153 | msg.setData("Timeout"); | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java
| ... | ... | @@ -19,7 +19,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 19 | 19 | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 20 | 20 | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 21 | 21 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 22 | -import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; | |
| 23 | 22 | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| 24 | 23 | |
| 25 | 24 | @Api(tags = "云台控制") | ... | ... |