增加指定流媒体收流功能
parent
ad246bf921
commit
dabee4ed7d
|
@ -48,6 +48,7 @@ CREATE TABLE `device` (
|
|||
`ssrcCheck` int DEFAULT '0',
|
||||
`geoCoordSys` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`treeType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`mediaServerId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'auto',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `device_deviceId_uindex` (`deviceId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -18,17 +18,17 @@
|
|||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="form.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="流媒体ID" prop="mediaServerId">-->
|
||||
<!-- <el-select v-model="form.mediaServerId" style="float: left; width: 100%" >-->
|
||||
<!-- <el-option key="auto" label="自动负载最小" value="null"></el-option>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in mediaServerList"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.id"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="流媒体ID" prop="mediaServerId">
|
||||
<el-select v-model="form.mediaServerId" style="float: left; width: 100%" >
|
||||
<el-option key="auto" label="自动负载最小" value="auto"></el-option>
|
||||
<el-option
|
||||
v-for="item in mediaServerList"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="字符集" prop="charset" >
|
||||
<el-select v-model="form.charset" style="float: left; width: 100%" >
|
||||
|
|
Loading…
Reference in New Issue