增加redis通道
This commit is contained in:
parent
724963324a
commit
c7d1515023
@ -101,6 +101,21 @@ public class VideoManagerConstants {
|
||||
*/
|
||||
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 消息通知平台通知设备推流结果
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.genersoft.iot.vmp.service.bean;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 当上级平台
|
||||
* @author lin
|
||||
@ -29,10 +27,15 @@ public class MessageForPushChannel {
|
||||
private String gbId;
|
||||
|
||||
/**
|
||||
* 请求的平台ID
|
||||
* 请求的平台国标编号
|
||||
*/
|
||||
private String platFormId;
|
||||
|
||||
/**
|
||||
* 请求的平台自增ID
|
||||
*/
|
||||
private String platFormIndex;
|
||||
|
||||
/**
|
||||
* 请求平台名称
|
||||
*/
|
||||
@ -128,4 +131,12 @@ public class MessageForPushChannel {
|
||||
public void setMediaServerId(String mediaServerId) {
|
||||
this.mediaServerId = mediaServerId;
|
||||
}
|
||||
|
||||
public String getPlatFormIndex() {
|
||||
return platFormIndex;
|
||||
}
|
||||
|
||||
public void setPlatFormIndex(String platFormIndex) {
|
||||
this.platFormIndex = platFormIndex;
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +97,9 @@ public class PtzController {
|
||||
cmdCode = 32;
|
||||
break;
|
||||
case "stop":
|
||||
horizonSpeed = 0;
|
||||
verticalSpeed = 0;
|
||||
zoomSpeed = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user