增加redis通道

pull/894/head
648540858 2023-06-27 15:34:38 +08:00
parent 724963324a
commit c7d1515023
4 changed files with 108 additions and 3 deletions

View File

@ -101,6 +101,21 @@ public class VideoManagerConstants {
*/ */
public static final String VM_MSG_STREAM_PUSH_REQUESTED = "VM_MSG_STREAM_PUSH_REQUESTED"; public static final String VM_MSG_STREAM_PUSH_REQUESTED = "VM_MSG_STREAM_PUSH_REQUESTED";
/**
* redis
*/
public static final String VM_MSG_STREAM_START_PLAY_NOTIFY = "VM_MSG_STREAM_START_PLAY_NOTIFY";
/**
* redis
*/
public static final String VM_MSG_STREAM_STOP_PLAY_NOTIFY = "VM_MSG_STREAM_STOP_PLAY_NOTIFY";
/**
* redis
*/
public static final String VM_MSG_STREAM_PUSH_CLOSE_REQUESTED = "VM_MSG_STREAM_PUSH_CLOSE_REQUESTED";
/** /**
* redis * redis

View File

@ -1,7 +1,5 @@
package com.genersoft.iot.vmp.service.bean; package com.genersoft.iot.vmp.service.bean;
import java.util.stream.Stream;
/** /**
* *
* @author lin * @author lin
@ -29,10 +27,15 @@ public class MessageForPushChannel {
private String gbId; private String gbId;
/** /**
* ID *
*/ */
private String platFormId; private String platFormId;
/**
* ID
*/
private String platFormIndex;
/** /**
* *
*/ */
@ -128,4 +131,12 @@ public class MessageForPushChannel {
public void setMediaServerId(String mediaServerId) { public void setMediaServerId(String mediaServerId) {
this.mediaServerId = mediaServerId; this.mediaServerId = mediaServerId;
} }
public String getPlatFormIndex() {
return platFormIndex;
}
public void setPlatFormIndex(String platFormIndex) {
this.platFormIndex = platFormIndex;
}
} }

View File

@ -97,6 +97,9 @@ public class PtzController {
cmdCode = 32; cmdCode = 32;
break; break;
case "stop": case "stop":
horizonSpeed = 0;
verticalSpeed = 0;
zoomSpeed = 0;
break; break;
default: default:
break; break;

View File

@ -0,0 +1,76 @@
package com.genersoft.iot.vmp.vmanager.rtp;
import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.VersionInfo;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import com.genersoft.iot.vmp.service.*;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@SuppressWarnings("rawtypes")
@Tag(name = "第三方服务对接")
@RestController
@RequestMapping("/api/rtp")
public class RtpController {
@Autowired
private ZlmHttpHookSubscribe zlmHttpHookSubscribe;
@Autowired
private IMediaServerService mediaServerService;
@Autowired
private VersionInfo versionInfo;
@Autowired
private SipConfig sipConfig;
@Autowired
private UserSetting userSetting;
@Autowired
private IDeviceService deviceService;
@Autowired
private IDeviceChannelService channelService;
@Autowired
private IStreamPushService pushService;
@Autowired
private IStreamProxyService proxyService;
@Value("${server.port}")
private int serverPort;
@Autowired
private IRedisCatchStorage redisCatchStorage;
@GetMapping(value = "/send/ready")
@ResponseBody
@Operation(summary = "为发送视频流获取信息")
public List<MediaServerItem> getMediaServerList(Boolean onlySender, ) {
MediaServerItem mediaServerItem = mediaServerService.getMediaServerForMinimumLoad(null);
if (mediaServerItem == null) {
throw new ControllerException(ErrorCode.ERROR100.getCode(),"没有可用的MediaServer");
}
mediaServerService.openRTPServer()
return mediaServerService.getAll();
}
}