兼容zlm-pro转码
This commit is contained in:
@@ -410,6 +410,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
if (serverItem.getRtpProxyPort() == 0) {
|
||||
serverItem.setRtpProxyPort(zlmServerConfig.getRtpProxyPort());
|
||||
}
|
||||
serverItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix());
|
||||
serverItem.setStatus(true);
|
||||
|
||||
if (ObjectUtils.isEmpty(serverItem.getId())) {
|
||||
@@ -424,7 +425,6 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
redisTemplate.opsForValue().set(key, serverItem);
|
||||
resetOnlineServerItem(serverItem);
|
||||
|
||||
|
||||
if (serverItem.isAutoConfig()) {
|
||||
setZLMConfig(serverItem, "0".equals(zlmServerConfig.getHookEnable()));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.genersoft.iot.vmp.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
@@ -91,6 +90,10 @@ public class MediaServiceImpl implements IMediaService {
|
||||
if (addr == null) {
|
||||
addr = mediaInfo.getStreamIp();
|
||||
}
|
||||
if (!"broadcast".equalsIgnoreCase(app) && !ObjectUtils.isEmpty(mediaInfo.getTranscodeSuffix()) && !"null".equalsIgnoreCase(mediaInfo.getTranscodeSuffix())) {
|
||||
stream = stream + "_" + mediaInfo.getTranscodeSuffix();
|
||||
streamInfoResult.setStream(stream);
|
||||
}
|
||||
|
||||
streamInfoResult.setIp(addr);
|
||||
streamInfoResult.setMediaServerId(mediaInfo.getId());
|
||||
|
||||
Reference in New Issue
Block a user