Merge branch 'master' into dev/录制计划
commit
a739701621
|
@ -261,21 +261,7 @@ public class CommonChannelController {
|
||||||
result.setResult(WVPResult.fail(code, msg));
|
result.setResult(WVPResult.fail(code, msg));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
channelPlayService.play(channel, null, callback);
|
||||||
if (channel.getGbDeviceDbId() != null) {
|
|
||||||
// 国标通道
|
|
||||||
channelPlayService.playGbDeviceChannel(channel, callback);
|
|
||||||
} else if (channel.getStreamProxyId() != null) {
|
|
||||||
// 拉流代理
|
|
||||||
channelPlayService.playProxy(channel, callback);
|
|
||||||
} else if (channel.getStreamPushId() != null) {
|
|
||||||
// 推流
|
|
||||||
channelPlayService.playPush(channel, null, null, callback);
|
|
||||||
} else {
|
|
||||||
// 通道数据异常
|
|
||||||
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ public interface IGbChannelPlayService {
|
||||||
|
|
||||||
void start(CommonGBChannel channel, InviteInfo inviteInfo, Platform platform, ErrorCallback<StreamInfo> callback);
|
void start(CommonGBChannel channel, InviteInfo inviteInfo, Platform platform, ErrorCallback<StreamInfo> callback);
|
||||||
|
|
||||||
|
void play(CommonGBChannel channel, Platform platform, ErrorCallback<StreamInfo> callback);
|
||||||
|
|
||||||
void playGbDeviceChannel(CommonGBChannel channel, ErrorCallback<StreamInfo> callback);
|
void playGbDeviceChannel(CommonGBChannel channel, ErrorCallback<StreamInfo> callback);
|
||||||
|
|
||||||
void playProxy(CommonGBChannel channel, ErrorCallback<StreamInfo> callback);
|
void playProxy(CommonGBChannel channel, ErrorCallback<StreamInfo> callback);
|
||||||
|
|
|
@ -39,20 +39,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||||
}
|
}
|
||||||
log.info("[点播通用通道] 类型:{}, 通道: {}({})", inviteInfo.getSessionName(), channel.getGbName(), channel.getGbDeviceId());
|
log.info("[点播通用通道] 类型:{}, 通道: {}({})", inviteInfo.getSessionName(), channel.getGbName(), channel.getGbDeviceId());
|
||||||
if ("Play".equalsIgnoreCase(inviteInfo.getSessionName())) {
|
if ("Play".equalsIgnoreCase(inviteInfo.getSessionName())) {
|
||||||
if (channel.getGbDeviceDbId() != null) {
|
play(channel, platform, callback);
|
||||||
// 国标通道
|
|
||||||
playGbDeviceChannel(channel, callback);
|
|
||||||
} else if (channel.getStreamProxyId() != null) {
|
|
||||||
// 拉流代理
|
|
||||||
playProxy(channel, callback);
|
|
||||||
} else if (channel.getStreamPushId() != null) {
|
|
||||||
// 推流
|
|
||||||
playPush(channel, platform.getServerGBId(), platform.getName(), callback);
|
|
||||||
} else {
|
|
||||||
// 通道数据异常
|
|
||||||
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
|
||||||
}
|
|
||||||
}else if ("Playback".equals(inviteInfo.getSessionName())) {
|
}else if ("Playback".equals(inviteInfo.getSessionName())) {
|
||||||
if (channel.getGbDeviceDbId() != null) {
|
if (channel.getGbDeviceDbId() != null) {
|
||||||
// 国标通道
|
// 国标通道
|
||||||
|
@ -101,6 +88,29 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void play(CommonGBChannel channel, Platform platform, ErrorCallback<StreamInfo> callback) {
|
||||||
|
if (channel.getGbDeviceDbId() != null) {
|
||||||
|
// 国标通道
|
||||||
|
playGbDeviceChannel(channel, callback);
|
||||||
|
} else if (channel.getStreamProxyId() != null) {
|
||||||
|
// 拉流代理
|
||||||
|
playProxy(channel, callback);
|
||||||
|
} else if (channel.getStreamPushId() != null) {
|
||||||
|
if (platform != null) {
|
||||||
|
// 推流
|
||||||
|
playPush(channel, platform.getServerGBId(), platform.getName(), callback);
|
||||||
|
}else {
|
||||||
|
// 推流
|
||||||
|
playPush(channel, null, null, callback);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 通道数据异常
|
||||||
|
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
||||||
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playGbDeviceChannel(CommonGBChannel channel, ErrorCallback<StreamInfo> callback){
|
public void playGbDeviceChannel(CommonGBChannel channel, ErrorCallback<StreamInfo> callback){
|
||||||
// 国标通道
|
// 国标通道
|
||||||
|
|
|
@ -53,7 +53,7 @@ public interface CloudRecordServiceMapper {
|
||||||
" <if test= 'ids != null ' > and id in " +
|
" <if test= 'ids != null ' > and id in " +
|
||||||
" <foreach collection='ids' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
|
" <foreach collection='ids' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
|
||||||
" </if>" +
|
" </if>" +
|
||||||
" order by start_time ASC" +
|
" order by start_time desc" +
|
||||||
" </script>")
|
" </script>")
|
||||||
List<CloudRecordItem> getList(@Param("query") String query, @Param("app") String app, @Param("stream") String stream,
|
List<CloudRecordItem> getList(@Param("query") String query, @Param("app") String app, @Param("stream") String stream,
|
||||||
@Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,
|
@Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,
|
||||||
|
|
|
@ -7,26 +7,28 @@
|
||||||
|
|
||||||
<div class="page-header-btn">
|
<div class="page-header-btn">
|
||||||
搜索:
|
搜索:
|
||||||
<el-input @input="getRecordList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
|
<el-input @input="initData" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
|
||||||
prefix-icon="el-icon-search" v-model="search" clearable></el-input>
|
prefix-icon="el-icon-search" v-model="search" clearable></el-input>
|
||||||
开始时间:
|
开始时间:
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="startTime"
|
v-model="startTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
|
size="mini"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
@change="getMediaServerList"
|
@change="initData"
|
||||||
placeholder="选择日期时间">
|
placeholder="选择日期时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
结束时间:
|
结束时间:
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="endTime"
|
v-model="endTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
|
size="mini"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
@change="getMediaServerList"
|
@change="initData"
|
||||||
placeholder="选择日期时间">
|
placeholder="选择日期时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
节点选择:
|
节点选择:
|
||||||
<el-select size="mini" @change="getMediaServerList" style="width: 16rem; margin-right: 1rem;"
|
<el-select size="mini" @change="initData" style="width: 16rem; margin-right: 1rem;"
|
||||||
v-model="mediaServerId" placeholder="请选择" >
|
v-model="mediaServerId" placeholder="请选择" >
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -38,7 +40,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteRecord()">批量删除</el-button>-->
|
<!-- <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteRecord()">批量删除</el-button>-->
|
||||||
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="loading"
|
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="loading"
|
||||||
@click="getRecordList()"></el-button>
|
@click="initData()"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--设备列表-->
|
<!--设备列表-->
|
||||||
|
@ -146,14 +148,13 @@ export default {
|
||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
this.getMediaServerList();
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.$destroy('recordVideoPlayer');
|
this.$destroy('recordVideoPlayer');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData: function () {
|
initData: function () {
|
||||||
// 获取媒体节点列表
|
|
||||||
this.getMediaServerList();
|
|
||||||
this.getRecordList();
|
this.getRecordList();
|
||||||
},
|
},
|
||||||
currentChange: function (val) {
|
currentChange: function (val) {
|
||||||
|
|
Loading…
Reference in New Issue