增加redis通道

This commit is contained in:
648540858
2023-06-27 15:34:38 +08:00
parent 724963324a
commit c7d1515023
4 changed files with 108 additions and 3 deletions

View File

@@ -97,6 +97,9 @@ public class PtzController {
cmdCode = 32;
break;
case "stop":
horizonSpeed = 0;
verticalSpeed = 0;
zoomSpeed = 0;
break;
default:
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();
}
}