修复录制计划以来全局录像配置, 目前去除依赖,目前录制计划开启录像

This commit is contained in:
lin
2025-02-11 11:08:52 +08:00
parent 547432e194
commit 3fe131eed3
12 changed files with 65 additions and 43 deletions

View File

@@ -187,7 +187,7 @@ public class StreamProxyController {
@Parameter(name = "id", description = "代理Id", required = true)
public StreamContent start(int id){
log.info("播放代理: {}", id);
StreamInfo streamInfo = streamProxyPlayService.start(id);
StreamInfo streamInfo = streamProxyPlayService.start(id, null, null);
if (streamInfo == null) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
}else {

View File

@@ -6,7 +6,7 @@ import com.genersoft.iot.vmp.streamProxy.bean.StreamProxy;
public interface IStreamProxyPlayService {
StreamInfo start(int id);
StreamInfo start(int id, Boolean record, ErrorCallback<StreamInfo> callback);
void start(int id, ErrorCallback<StreamInfo> callback);

View File

@@ -14,11 +14,6 @@ import com.genersoft.iot.vmp.streamProxy.dao.StreamProxyMapper;
import com.genersoft.iot.vmp.streamProxy.service.IStreamProxyPlayService;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.ConcurrentHashMap;
import javax.sip.message.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
@@ -27,6 +22,9 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import javax.sip.message.Response;
import java.util.concurrent.ConcurrentHashMap;
/**
* 视频代理业务
*/
@@ -90,11 +88,14 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
}
@Override
public StreamInfo start(int id) {
public StreamInfo start(int id, Boolean record, ErrorCallback<StreamInfo> callback) {
StreamProxy streamProxy = streamProxyMapper.select(id);
if (streamProxy == null) {
throw new ControllerException(ErrorCode.ERROR404.getCode(), "代理信息未找到");
}
if (record != null) {
streamProxy.setEnableMp4(record);
}
return startProxy(streamProxy);
}