Browse Source

Merge pull request #136 from lawrencehj/wvp-28181-2.0

解决hook.ip未设置时不能取默认值的问题等
pull/151/head
648540858 3 years ago
committed by GitHub
parent
commit
6560a7ad38
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java
  2. 1
      src/main/java/com/genersoft/iot/vmp/conf/WVPTimerTask.java
  3. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/bean/SsrcTransaction.java
  4. 6
      src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
  5. 1
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java
  6. 1
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
  7. 1
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/response/impl/InviteResponseProcessor.java
  8. 1
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java
  9. 1
      src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java
  10. 1
      src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
  11. 1
      src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
  12. 1
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java
  13. 1
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
  14. 5
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
  15. 1
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java

3
src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.conf;
import com.genersoft.iot.vmp.gb28181.session.SsrcConfig;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@ -171,7 +170,7 @@ public class MediaConfig{
mediaServerItem.setId(id);
mediaServerItem.setIp(ip);
mediaServerItem.setDefaultServer(true);
mediaServerItem.setHookIp(hookIp);
mediaServerItem.setHookIp(getHookIp());
mediaServerItem.setSdpIp(sdpIp);
mediaServerItem.setStreamIp(streamIp);
mediaServerItem.setHttpPort(httpPort);

1
src/main/java/com/genersoft/iot/vmp/conf/WVPTimerTask.java

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.conf;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;

2
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SsrcTransaction.java

@ -1,7 +1,5 @@
package com.genersoft.iot.vmp.gb28181.bean;
import javax.sip.message.Request;
public class SsrcTransaction {
private String deviceId;

6
src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java

@ -2,22 +2,16 @@ package com.genersoft.iot.vmp.gb28181.session;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.sip.ClientTransaction;
import javax.sip.Dialog;
import javax.sip.message.Request;
import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction;
import com.genersoft.iot.vmp.service.IMediaServerService;
import com.genersoft.iot.vmp.utils.SerializeUtils;
import com.genersoft.iot.vmp.utils.redis.JedisUtil;
import com.genersoft.iot.vmp.utils.redis.RedisUtil;
import gov.nist.javax.sip.stack.SIPDialog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
/**

1
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java

@ -7,7 +7,6 @@ import javax.sip.header.CSeqHeader;
import javax.sip.message.Request;
import javax.sip.message.Response;
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory;
import com.genersoft.iot.vmp.service.IMediaServerService;

1
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java

@ -24,7 +24,6 @@ import gov.nist.javax.sip.SipProviderImpl;
import gov.nist.javax.sip.SipStackImpl;
import gov.nist.javax.sip.message.SIPRequest;
import gov.nist.javax.sip.stack.SIPDialog;
import gov.nist.javax.sip.stack.SIPTransaction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

1
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;
import java.text.ParseException;
import javax.sip.*;
import javax.sip.address.Address;
import javax.sip.address.SipURI;
import javax.sip.header.CSeqHeader;
import javax.sip.message.Request;

1
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java

@ -16,7 +16,6 @@ import org.springframework.stereotype.Component;
import java.util.*;
@SuppressWarnings("unchecked")
@Component
public class ZLMMediaListManager {

1
src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.service;
import com.genersoft.iot.vmp.conf.MediaConfig;
import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;

1
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java

@ -26,7 +26,6 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
import java.sql.Array;
import java.text.SimpleDateFormat;
import java.util.*;

1
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java

@ -34,7 +34,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;
import org.springframework.web.context.request.async.DeferredResult;
import javax.sip.ClientTransaction;
import javax.sip.message.Response;
import java.io.FileNotFoundException;
import java.util.UUID;

1
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceConfig.java

@ -14,7 +14,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
import io.swagger.annotations.Api;

1
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java

@ -14,7 +14,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
import io.swagger.annotations.Api;

5
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java

@ -37,7 +37,6 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
import org.springframework.web.context.request.async.DeferredResult;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.sip.message.Response;
@ -102,7 +101,7 @@ public class PlayController {
@GetMapping("/stop/{deviceId}/{channelId}")
public DeferredResult<ResponseEntity<String>> playStop(@PathVariable String deviceId, @PathVariable String channelId) {
logger.debug(String.format("设备预览/回放停止API调用,streamId:%s/$s", deviceId, channelId ));
logger.debug(String.format("设备预览/回放停止API调用,streamId:%s/%s", deviceId, channelId ));
UUID uuid = UUID.randomUUID();
DeferredResult<ResponseEntity<String>> result = new DeferredResult<ResponseEntity<String>>();
@ -148,7 +147,7 @@ public class PlayController {
// 超时处理
result.onTimeout(()->{
logger.warn(String.format("设备预览/回放停止超时,deviceId/channelId:%s/$s ", deviceId, channelId));
logger.warn(String.format("设备预览/回放停止超时,deviceId/channelId:%s/%s ", deviceId, channelId));
RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_STOP + uuid);
msg.setData("Timeout");

1
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/ptz/PtzController.java

@ -19,7 +19,6 @@ import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
@Api(tags = "云台控制")

Loading…
Cancel
Save