支持国标级联点播其他wvp的国标设备
parent
1c2709163d
commit
fe341036a8
|
@ -21,7 +21,6 @@ import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcPlayService;
|
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
|
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
|
@ -66,9 +65,6 @@ public class PlayController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPlayService playService;
|
private IPlayService playService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IRedisRpcPlayService redisRpcPlayService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMediaServerService mediaServerService;
|
private IMediaServerService mediaServerService;
|
||||||
|
|
||||||
|
@ -153,12 +149,7 @@ public class PlayController {
|
||||||
// 此处必须释放所有请求
|
// 此处必须释放所有请求
|
||||||
resultHolder.invokeAllResult(requestMessage);
|
resultHolder.invokeAllResult(requestMessage);
|
||||||
};
|
};
|
||||||
// 判断设备是否属于当前平台, 如果不属于则发起自动调用
|
|
||||||
if (userSetting.getServerId().equals(device.getServerId())) {
|
|
||||||
redisRpcPlayService.play(device.getServerId(), channel.getId(), callback);
|
|
||||||
}else {
|
|
||||||
playService.play(device, channel, callback);
|
playService.play(device, channel, callback);
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,7 @@ public interface DeviceMapper {
|
||||||
"geo_coord_sys,"+
|
"geo_coord_sys,"+
|
||||||
"on_line,"+
|
"on_line,"+
|
||||||
"media_server_id,"+
|
"media_server_id,"+
|
||||||
|
"server_id,"+
|
||||||
"(SELECT count(0) FROM wvp_device_channel dc WHERE dc.device_db_id= de.id) as channel_count " +
|
"(SELECT count(0) FROM wvp_device_channel dc WHERE dc.device_db_id= de.id) as channel_count " +
|
||||||
" FROM wvp_device de" +
|
" FROM wvp_device de" +
|
||||||
" where 1 = 1 "+
|
" where 1 = 1 "+
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||||
import com.genersoft.iot.vmp.service.IReceiveRtpServerService;
|
import com.genersoft.iot.vmp.service.IReceiveRtpServerService;
|
||||||
import com.genersoft.iot.vmp.service.ISendRtpServerService;
|
import com.genersoft.iot.vmp.service.ISendRtpServerService;
|
||||||
import com.genersoft.iot.vmp.service.bean.*;
|
import com.genersoft.iot.vmp.service.bean.*;
|
||||||
|
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcPlayService;
|
||||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||||
import com.genersoft.iot.vmp.utils.CloudRecordUtils;
|
import com.genersoft.iot.vmp.utils.CloudRecordUtils;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
|
@ -123,6 +124,9 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICloudRecordService cloudRecordService;
|
private ICloudRecordService cloudRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRedisRpcPlayService redisRpcPlayService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流到来的处理
|
* 流到来的处理
|
||||||
*/
|
*/
|
||||||
|
@ -287,6 +291,11 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void play(Device device, DeviceChannel channel, ErrorCallback<StreamInfo> callback) {
|
public void play(Device device, DeviceChannel channel, ErrorCallback<StreamInfo> callback) {
|
||||||
|
|
||||||
|
// 判断设备是否属于当前平台, 如果不属于则发起自动调用
|
||||||
|
if (userSetting.getServerId().equals(device.getServerId())) {
|
||||||
|
redisRpcPlayService.play(device.getServerId(), channel.getId(), callback);
|
||||||
|
}else {
|
||||||
MediaServer mediaServerItem = getNewMediaServerItem(device);
|
MediaServer mediaServerItem = getNewMediaServerItem(device);
|
||||||
if (mediaServerItem == null) {
|
if (mediaServerItem == null) {
|
||||||
log.warn("[点播] 未找到可用的zlm deviceId: {},channelId:{}", device.getDeviceId(), channel.getDeviceId());
|
log.warn("[点播] 未找到可用的zlm deviceId: {},channelId:{}", device.getDeviceId(), channel.getDeviceId());
|
||||||
|
@ -294,6 +303,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
}
|
}
|
||||||
play(mediaServerItem, device, channel, null, callback);
|
play(mediaServerItem, device, channel, null, callback);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SSRCInfo play(MediaServer mediaServerItem, String deviceId, String channelId, String ssrc, ErrorCallback<StreamInfo> callback) {
|
public SSRCInfo play(MediaServer mediaServerItem, String deviceId, String channelId, String ssrc, ErrorCallback<StreamInfo> callback) {
|
||||||
|
@ -1660,13 +1670,8 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
log.warn("[点播] 未找到通道{}的设备信息", channel);
|
log.warn("[点播] 未找到通道{}的设备信息", channel);
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
}
|
}
|
||||||
MediaServer mediaServer = getNewMediaServerItem(device);
|
|
||||||
if (mediaServer == null) {
|
|
||||||
log.warn("[点播] 未找到可用媒体节点");
|
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
|
||||||
}
|
|
||||||
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
|
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
|
||||||
play(mediaServer, device, deviceChannel, null, callback);
|
play(device, deviceChannel, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">添加设备
|
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">添加设备
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-info" size="mini" style="margin-right: 1rem;" type="primary" @click="showInfo">平台信息
|
<el-button icon="el-icon-info" size="mini" style="margin-right: 1rem;" type="primary" @click="showInfo(true)">平台信息
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="getDeviceListLoading"
|
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="getDeviceListLoading"
|
||||||
@click="getDeviceList()"></el-button>
|
@click="getDeviceList()"></el-button>
|
||||||
|
@ -53,7 +53,8 @@
|
||||||
<el-table-column label="状态" min-width="120">
|
<el-table-column label="状态" min-width="120">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-tag size="medium" v-if="scope.row.onLine">在线</el-tag>
|
<el-tag size="medium" v-if="scope.row.onLine && serverId !== scope.row.serverId" style="border-color: #ecf1af">在线</el-tag>
|
||||||
|
<el-tag size="medium" v-if="scope.row.onLine && serverId === scope.row.serverId">在线</el-tag>
|
||||||
<el-tag size="medium" type="info" v-if="!scope.row.onLine">离线</el-tag>
|
<el-tag size="medium" type="info" v-if="!scope.row.onLine">离线</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -62,11 +63,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="registerTime" label="最近注册" min-width="160">
|
<el-table-column prop="registerTime" label="最近注册" min-width="160">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="updateTime" label="更新时间" width="140">-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column prop="createTime" label="创建时间" width="140">-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
|
|
||||||
<el-table-column label="操作" min-width="380" fixed="right">
|
<el-table-column label="操作" min-width="380" fixed="right">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button type="text" size="medium" v-bind:disabled="scope.row.online==0" icon="el-icon-refresh" @click="refDevice(scope.row)"
|
<el-button type="text" size="medium" v-bind:disabled="scope.row.online==0" icon="el-icon-refresh" @click="refDevice(scope.row)"
|
||||||
|
@ -133,11 +129,12 @@ export default {
|
||||||
online: null,
|
online: null,
|
||||||
videoComponentList: [],
|
videoComponentList: [],
|
||||||
updateLooper: 0, //数据刷新轮训标志
|
updateLooper: 0, //数据刷新轮训标志
|
||||||
currentDeviceChannelsLenth: 0,
|
currentDeviceChannelsLength: 0,
|
||||||
winHeight: window.innerHeight - 200,
|
winHeight: window.innerHeight - 200,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
count: 15,
|
count: 15,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
serverId: null,
|
||||||
getDeviceListLoading: false,
|
getDeviceListLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -149,7 +146,7 @@ export default {
|
||||||
channels = Object.keys(data).map(key => {
|
channels = Object.keys(data).map(key => {
|
||||||
return data[key];
|
return data[key];
|
||||||
});
|
});
|
||||||
this.currentDeviceChannelsLenth = channels.length;
|
this.currentDeviceChannelsLength = channels.length;
|
||||||
}
|
}
|
||||||
return channels;
|
return channels;
|
||||||
}
|
}
|
||||||
|
@ -164,6 +161,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData: function () {
|
initData: function () {
|
||||||
|
// 获取平台信息
|
||||||
|
this.showInfo(false)
|
||||||
this.getDeviceList();
|
this.getDeviceList();
|
||||||
},
|
},
|
||||||
currentChange: function (val) {
|
currentChange: function (val) {
|
||||||
|
@ -326,18 +325,19 @@ export default {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showInfo: function (){
|
showInfo: function (showConfigInfo){
|
||||||
|
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `/api/server/system/configInfo`,
|
url: `/api/server/system/configInfo`,
|
||||||
}).then( (res)=> {
|
}).then( (res)=> {
|
||||||
console.log(res)
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
console.log(2222)
|
this.serverId = res.data.data.addOn.serverId;
|
||||||
console.log(this.$refs.configInfo)
|
console.log(this.serverId);
|
||||||
|
if(showConfigInfo) {
|
||||||
this.$refs.configInfo.openDialog(res.data.data)
|
this.$refs.configInfo.openDialog(res.data.data)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).catch( (error)=> {
|
}).catch( (error)=> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue