From 065142057ba3983af899991085e37ac1ec502320 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 19 九月 2023 14:06:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/media/service/impl/WebrtcService.java | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/media/service/impl/WebrtcService.java b/ard-work/src/main/java/com/ruoyi/media/service/impl/WebrtcService.java
index 28c0053..0a0c592 100644
--- a/ard-work/src/main/java/com/ruoyi/media/service/impl/WebrtcService.java
+++ b/ard-work/src/main/java/com/ruoyi/media/service/impl/WebrtcService.java
@@ -1,6 +1,6 @@
package com.ruoyi.media.service.impl;
-import com.ruoyi.utils.tools.CmdUtils;
+import com.ruoyi.utils.process.CmdUtils;
import com.sun.jna.Platform;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@@ -8,10 +8,7 @@
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
@@ -47,18 +44,20 @@
// 鍚姩鍚庡彴杩涚▼
CmdUtils.commandStart(processName, cmd, null);
// 鍚姩cmd绐楀彛
-// String[] command = {"cmd", "/c", "start", exePath, "-H127.0.0.1:8000", "-o"};
-// CmdUtils.commandStart(command);
+// String[] command = {"cmd", "/c", "start", exePath, "-H127.0.0.1:8000", "-o"};
+// CmdUtils.commandStart(command);
}
}
}
@PreDestroy
public void destroyMediaMtx() {
- log.info("閿�姣亀ebrtc-streamer");
- if (CmdUtils.isProcessRunning(processName)) {
- // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋�
- CmdUtils.stopProcess(processName);
+ if (webrtcEnabled) {
+ log.info("閿�姣亀ebrtc-streamer");
+ if (CmdUtils.isProcessRunning(processName)) {
+ // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋�
+ CmdUtils.stopProcess(processName);
+ }
}
}
}
--
Gitblit v1.9.3