From 2cfcb15fdff730140b6a03a874466802704078eb Mon Sep 17 00:00:00 2001 From: aijinhui <aijinhui> Date: 星期五, 22 十二月 2023 10:01:42 +0800 Subject: [PATCH] 群组 --- ard-work/src/main/java/com/ruoyi/cmd/startup.java | 34 ++-------------------------------- 1 files changed, 2 insertions(+), 32 deletions(-) diff --git a/ard-work/src/main/java/com/ruoyi/cmd/startup.java b/ard-work/src/main/java/com/ruoyi/cmd/startup.java index 64b60f3..8e41c40 100644 --- a/ard-work/src/main/java/com/ruoyi/cmd/startup.java +++ b/ard-work/src/main/java/com/ruoyi/cmd/startup.java @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; @@ -44,12 +45,6 @@ String mediamtxName = "mediamtx.exe"; @Value("${mediamtx.enabled}") Boolean mediamtxEnabled; - //webrtc-streamer - String webrtcName = "webrtc-streamer.exe"; - @Value("${webrtc.host}") - String webrtcHost; - @Value("${webrtc.enabled}") - Boolean webrtcEnabled; //redis String redisName = "redis-server.exe"; @@ -77,6 +72,7 @@ } @PostConstruct + @Order(1) public void init() { if (minioEnabled) { log.info("鍒濆鍖栧惎鍔╩inio"); @@ -122,25 +118,6 @@ // CmdUtils.commandStart(command); } } - if (webrtcEnabled) { - log.info("鍒濆鍖栧惎鍔╳ebrtc-streamer"); - if (Platform.isWindows()) { - String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "webrtc" + File.separator + webrtcName; - List<String> cmd = new ArrayList<>(); - cmd.add(exePath); - cmd.add("-H" + webrtcHost); - cmd.add("-o"); - if (CmdUtils.isProcessRunning(webrtcName)) { - // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋� - CmdUtils.stopProcess(webrtcName); - } - // 鍚姩鍚庡彴杩涚▼ - CmdUtils.commandStart(webrtcName, cmd, null); - // 鍚姩cmd绐楀彛 -// String[] command = {"cmd", "/c", "start", exePath, "-H127.0.0.1:8000", "-o"}; -// CmdUtils.commandStart(command); - } - } } @PreDestroy @@ -157,13 +134,6 @@ if (CmdUtils.isProcessRunning(mediamtxName)) { // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋� CmdUtils.stopProcess(mediamtxName); - } - } - if (webrtcEnabled) { - log.info("閿�姣亀ebrtc-streamer"); - if (CmdUtils.isProcessRunning(webrtcName)) { - // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋� - CmdUtils.stopProcess(webrtcName); } } if (true) { -- Gitblit v1.9.3