增加指定流媒体收流功能

This commit is contained in:
XiaoQiTong
2022-10-15 20:57:24 +08:00
parent ad246bf921
commit dabee4ed7d
5 changed files with 15 additions and 13 deletions

View File

@@ -407,7 +407,7 @@ public class PlayServiceImpl implements IPlayService {
}
String mediaServerId = device.getMediaServerId();
MediaServerItem mediaServerItem;
if (mediaServerId == null) {
if (mediaServerId == null || "".equals(device.getMediaServerId()) || "auto".equals(device.getMediaServerId())) {
mediaServerItem = mediaServerService.getMediaServerForMinimumLoad();
} else {
mediaServerItem = mediaServerService.getOne(mediaServerId);

View File

@@ -98,7 +98,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
@Override
public StreamInfo save(StreamProxyItem param) {
MediaServerItem mediaInfo;
if (param.getMediaServerId() == null || "auto".equals(param.getMediaServerId())){
if (param.getMediaServerId() == null || "".equals(param.getMediaServerId()) || "auto".equals(param.getMediaServerId())){
mediaInfo = mediaServerService.getMediaServerForMinimumLoad();
}else {
mediaInfo = mediaServerService.getOne(param.getMediaServerId());

View File

@@ -93,6 +93,7 @@ public interface DeviceMapper {
"<if test=\"ssrcCheck != null\">, ssrcCheck=${ssrcCheck}</if>" +
"<if test=\"geoCoordSys != null\">, geoCoordSys=#{geoCoordSys}</if>" +
"<if test=\"treeType != null\">, treeType=#{treeType}</if>" +
"<if test=\"mediaServerId != null\">, mediaServerId=#{mediaServerId}</if>" +
"WHERE deviceId='${deviceId}'"+
" </script>"})
int update(Device device);