From e370cf880d6fe8ae68feff829950585db9b1000b Mon Sep 17 00:00:00 2001 From: Li Keqing Date: Fri, 3 Jan 2025 21:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E9=A1=B5=E8=A7=82?= =?UTF-8?q?=E7=9C=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/streamProxy/service/IStreamProxyPlayService.java | 2 ++ .../service/impl/StreamProxyPlayServiceImpl.java | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/IStreamProxyPlayService.java b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/IStreamProxyPlayService.java index 499d2293..18b1499a 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/IStreamProxyPlayService.java +++ b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/IStreamProxyPlayService.java @@ -6,6 +6,8 @@ import com.genersoft.iot.vmp.streamProxy.bean.StreamProxy; public interface IStreamProxyPlayService { + StreamInfo start(int id); + void start(int id, ErrorCallback callback); StreamInfo startProxy(StreamProxy streamProxy); diff --git a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyPlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyPlayServiceImpl.java index fb191ec3..9e5fa140 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyPlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyPlayServiceImpl.java @@ -89,6 +89,15 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService { } } + @Override + public StreamInfo start(int id) { + StreamProxy streamProxy = streamProxyMapper.select(id); + if (streamProxy == null) { + throw new ControllerException(ErrorCode.ERROR404.getCode(), "代理信息未找到"); + } + return startProxy(streamProxy); + } + @Override public StreamInfo startProxy(StreamProxy streamProxy){ if (!streamProxy.isEnable()) {