From 3e71e0bdf1e4b2e527d491d426f67e34b7d3c148 Mon Sep 17 00:00:00 2001
From: xiaoQQya <xiaoQQya@126.com>
Date: 星期六, 05 十一月 2022 11:35:01 +0800
Subject: [PATCH] perf(rtcPlayer): 修改控制台 log 级别
---
src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
index 8fabbda..6798b48 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
@@ -26,6 +26,7 @@
import com.genersoft.iot.vmp.service.IStreamProxyService;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
+import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
@@ -98,7 +99,7 @@
@Override
public StreamInfo save(StreamProxyItem param) {
MediaServerItem mediaInfo;
- if (param.getMediaServerId() == null || "auto".equals(param.getMediaServerId())){
+ if (ObjectUtils.isEmpty(param.getMediaServerId()) || "auto".equals(param.getMediaServerId())){
mediaInfo = mediaServerService.getMediaServerForMinimumLoad();
}else {
mediaInfo = mediaServerService.getOne(param.getMediaServerId());
@@ -296,12 +297,11 @@
public boolean start(String app, String stream) {
boolean result = false;
StreamProxyItem streamProxy = videoManagerStorager.queryStreamProxy(app, stream);
- if (!streamProxy.isEnable() ) {
+ if (streamProxy != null && !streamProxy.isEnable() ) {
JSONObject jsonObject = addStreamProxyToZlm(streamProxy);
if (jsonObject == null) {
return false;
}
- System.out.println(jsonObject);
if (jsonObject.getInteger("code") == 0) {
result = true;
streamProxy.setEnable(true);
@@ -427,7 +427,7 @@
if(data != null && data.size() > 0) {
for (int i = 0; i < data.size(); i++) {
JSONObject streamJSONObj = data.getJSONObject(i);
- if ("rtmp".equals(streamJSONObj.getString("schema"))) {
+ if ("rtsp".equals(streamJSONObj.getString("schema"))) {
StreamInfo streamInfo = new StreamInfo();
String app = streamJSONObj.getString("app");
String stream = streamJSONObj.getString("stream");
@@ -455,4 +455,9 @@
}
}
+
+ @Override
+ public ResourceBaceInfo getOverview() {
+ return streamProxyMapper.getOverview();
+ }
}
--
Gitblit v1.8.0