Merge branch 'refs/heads/master' into dev/master-通道结构重构
# Conflicts: # src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java # src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java # web_src/src/components/PushVideoList.vuepull/1642/head
commit
a3f7753b84
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>com.genersoft</groupId>
|
<groupId>com.genersoft</groupId>
|
||||||
<artifactId>wvp-pro</artifactId>
|
<artifactId>wvp-pro</artifactId>
|
||||||
<version>2.7.2</version>
|
<version>2.7.3</version>
|
||||||
<name>web video platform</name>
|
<name>web video platform</name>
|
||||||
<description>国标28181视频平台</description>
|
<description>国标28181视频平台</description>
|
||||||
<packaging>${project.packaging}</packaging>
|
<packaging>${project.packaging}</packaging>
|
||||||
|
|
|
@ -5,6 +5,8 @@ import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
|
import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流到来事件
|
* 流到来事件
|
||||||
*/
|
*/
|
||||||
|
@ -22,6 +24,7 @@ public class MediaArrivalEvent extends MediaEvent {
|
||||||
mediaArrivalEvent.setSchema(hookParam.getSchema());
|
mediaArrivalEvent.setSchema(hookParam.getSchema());
|
||||||
mediaArrivalEvent.setSchema(hookParam.getSchema());
|
mediaArrivalEvent.setSchema(hookParam.getSchema());
|
||||||
mediaArrivalEvent.setHookParam(hookParam);
|
mediaArrivalEvent.setHookParam(hookParam);
|
||||||
|
mediaArrivalEvent.setParamMap(hookParam.getParamMap());
|
||||||
return mediaArrivalEvent;
|
return mediaArrivalEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +36,8 @@ public class MediaArrivalEvent extends MediaEvent {
|
||||||
|
|
||||||
private StreamContent streamInfo;
|
private StreamContent streamInfo;
|
||||||
|
|
||||||
|
private Map<String, String> paramMap;
|
||||||
|
|
||||||
public MediaInfo getMediaInfo() {
|
public MediaInfo getMediaInfo() {
|
||||||
return mediaInfo;
|
return mediaInfo;
|
||||||
}
|
}
|
||||||
|
@ -65,4 +70,13 @@ public class MediaArrivalEvent extends MediaEvent {
|
||||||
public void setStreamInfo(StreamContent streamInfo) {
|
public void setStreamInfo(StreamContent streamInfo) {
|
||||||
this.streamInfo = streamInfo;
|
this.streamInfo = streamInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Map<String, String> getParamMap() {
|
||||||
|
return paramMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamMap(Map<String, String> paramMap) {
|
||||||
|
this.paramMap = paramMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,9 @@ import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -140,7 +143,19 @@ public class ZLMHttpHookListener {
|
||||||
}
|
}
|
||||||
if (param.getSchema().equalsIgnoreCase("rtsp")) {
|
if (param.getSchema().equalsIgnoreCase("rtsp")) {
|
||||||
if (param.isRegist()) {
|
if (param.isRegist()) {
|
||||||
log.info("[ZLM HOOK] 流注册, {}->{}->{}/{}", param.getMediaServerId(), param.getSchema(), param.getApp(), param.getStream());
|
logger.info("[ZLM HOOK] 流注册, {}->{}->{}/{}", param.getMediaServerId(), param.getSchema(), param.getApp(), param.getStream());
|
||||||
|
String queryParams = param.getParams();
|
||||||
|
if (queryParams == null) {
|
||||||
|
try {
|
||||||
|
URL url = new URL("http" + param.getOriginUrl().substring(4));
|
||||||
|
queryParams = url.getQuery();
|
||||||
|
}catch (MalformedURLException ignored) {}
|
||||||
|
}
|
||||||
|
if (queryParams != null) {
|
||||||
|
param.setParamMap(MediaServerUtils.urlParamToMap(queryParams));
|
||||||
|
}else {
|
||||||
|
param.setParamMap(new HashMap<>());
|
||||||
|
}
|
||||||
MediaArrivalEvent mediaArrivalEvent = MediaArrivalEvent.getInstance(this, param, mediaServer);
|
MediaArrivalEvent mediaArrivalEvent = MediaArrivalEvent.getInstance(this, param, mediaServer);
|
||||||
applicationEventPublisher.publishEvent(mediaArrivalEvent);
|
applicationEventPublisher.publishEvent(mediaArrivalEvent);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="ConsoleNet" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center">
|
<div id="ConsoleNet" style="width: 100%; height: 100%; background: #FFFFFF; text-align: center">
|
||||||
<ve-line ref="ConsoleNet" :data="chartData" :extend="extend" :settings="chartSettings" width="100%" height="100%" ></ve-line>
|
<ve-line ref="ConsoleNet" :data="chartData" :extend="extend" :settings="chartSettings" :events="chartEvents" width="100%" height="100%" ></ve-line>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -59,12 +59,54 @@ export default {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: (data)=>{
|
formatter: (data)=>{
|
||||||
return data[1].marker + "下载:" + parseFloat(data[1].data[1]).toFixed(2) + "Mbps" + "</br> "+ data[0].marker +" 上传:" + parseFloat(data[0].data[1]).toFixed(2) + "Mbps";
|
let in_sel = true;
|
||||||
|
let out_sel = true;
|
||||||
|
for (let key in this.extend.legend.selected) {
|
||||||
|
if (key == "上传") {
|
||||||
|
out_sel = this.extend.legend.selected[key];
|
||||||
|
}
|
||||||
|
if (key == "下载") {
|
||||||
|
in_sel = this.extend.legend.selected[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (out_sel && in_sel) {
|
||||||
|
return (
|
||||||
|
data[1].marker +
|
||||||
|
"下载:" +
|
||||||
|
parseFloat(data[1].data[1]).toFixed(2) +
|
||||||
|
"Mbps" +
|
||||||
|
"</br> " +
|
||||||
|
data[0].marker +
|
||||||
|
"上传:" +
|
||||||
|
parseFloat(data[0].data[1]).toFixed(2) +
|
||||||
|
"Mbps"
|
||||||
|
);
|
||||||
|
} else if (out_sel)
|
||||||
|
return (
|
||||||
|
data[0].marker +
|
||||||
|
"上传:" +
|
||||||
|
parseFloat(data[0].data[1]).toFixed(2) +
|
||||||
|
"Mbps"
|
||||||
|
);
|
||||||
|
else if (in_sel)
|
||||||
|
return (
|
||||||
|
data[0].marker +
|
||||||
|
"下载:" +
|
||||||
|
parseFloat(data[0].data[1]).toFixed(2) +
|
||||||
|
"Mbps"
|
||||||
|
);
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: "center",
|
left: "center",
|
||||||
bottom: "15px",
|
bottom: "15px",
|
||||||
|
selected: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chartEvents: {
|
||||||
|
legendselectchanged: (item) => {
|
||||||
|
this.extend.legend.selected = item.selected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions title="版本信息"v-if="configInfoData.version">
|
<el-descriptions title="版本信息"v-if="configInfoData.version">
|
||||||
<el-descriptions-item label="版本">{{configInfoData.version.version}}</el-descriptions-item>
|
<el-descriptions-item label="版本">{{configInfoData.version.version}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="编译时间">{{configInfoData.version.BUILD_DATE}}</el-descriptions-item>
|
<el-descriptions-item label="编译时间">{{configInfoData.version.build_DATE}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="GIT版本">{{configInfoData.version.GIT_Revision_SHORT}}</el-descriptions-item>
|
<el-descriptions-item label="GIT版本">{{configInfoData.version.git_Revision_SHORT}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="GIT最后提交时间">{{configInfoData.version.GIT_DATE}}</el-descriptions-item>
|
<el-descriptions-item label="GIT最后提交时间">{{configInfoData.version.git_DATE}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
Loading…
Reference in New Issue