mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 06:57:50 +08:00
Compare commits
3 Commits
912c5ccef1
...
956b6951cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
956b6951cf | ||
|
|
54f6ff9f81 | ||
|
|
da98101aac |
@ -118,6 +118,7 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
|
||||
@Override
|
||||
public void play(CommonGBChannel channel, Platform platform, Boolean record, ErrorCallback<StreamInfo> callback) {
|
||||
log.info("[通用通道] 播放, 类型: {}, 编号:{}", channel.getDataType(), channel.getGbDeviceId());
|
||||
if (channel.getDataType() == ChannelDataType.GB28181.value) {
|
||||
// 国标通道
|
||||
playGbDeviceChannel(channel, record, callback);
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.genersoft.iot.vmp.streamProxy.service.impl;
|
||||
|
||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
@ -12,9 +11,9 @@ import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookType;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcPlayService;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcPlayService;
|
||||
import com.genersoft.iot.vmp.streamProxy.bean.StreamProxy;
|
||||
import com.genersoft.iot.vmp.streamProxy.dao.StreamProxyMapper;
|
||||
import com.genersoft.iot.vmp.streamProxy.service.IStreamProxyPlayService;
|
||||
@ -107,6 +106,7 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
|
||||
|
||||
@Override
|
||||
public StreamInfo start(int id, Boolean record, ErrorCallback<StreamInfo> callback) {
|
||||
log.info("[拉流代理], 开始拉流,ID:{}", id);
|
||||
StreamProxy streamProxy = streamProxyMapper.select(id);
|
||||
if (streamProxy == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR404.getCode(), "代理信息未找到");
|
||||
@ -114,6 +114,15 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
|
||||
if (record != null) {
|
||||
streamProxy.setEnableMp4(record);
|
||||
}
|
||||
if (streamProxy.getMediaServerId() != null) {
|
||||
StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStreamWithCheck(streamProxy.getApp(), streamProxy.getStream(), streamProxy.getMediaServerId(), false);
|
||||
if (streamInfo != null) {
|
||||
callbackMap.remove(id);
|
||||
streamInfoMap.remove(id);
|
||||
callback.run(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), streamInfo);
|
||||
return streamInfo;
|
||||
}
|
||||
}
|
||||
|
||||
StreamInfo streamInfo = startProxy(streamProxy);
|
||||
if (callback != null) {
|
||||
@ -121,6 +130,7 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
|
||||
String timeOutTaskKey = UUID.randomUUID().toString();
|
||||
Hook rtpHook = Hook.getInstance(HookType.on_media_arrival, streamProxy.getApp(), streamProxy.getStream(), streamInfo.getMediaServer().getId());
|
||||
dynamicTask.startDelay(timeOutTaskKey, () -> {
|
||||
log.info("[拉流代理], 收流超时,ID:{}", id);
|
||||
// 收流超时
|
||||
subscribe.removeSubscribe(rtpHook);
|
||||
callback.run(InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode(), InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getMsg(), streamInfo);
|
||||
|
||||
@ -861,7 +861,7 @@
|
||||
320623,如东县,3206
|
||||
320681,启东市,3206
|
||||
320682,如皋市,3206
|
||||
320684,海门市,3206
|
||||
320684,海门区,3206
|
||||
320685,海安市,3206
|
||||
3207,连云港市,32
|
||||
320703,连云区,3207
|
||||
@ -918,8 +918,6 @@
|
||||
33,浙江省,
|
||||
3301,杭州市,33
|
||||
330102,上城区,3301
|
||||
330103,下城区,3301
|
||||
330104,江干区,3301
|
||||
330105,拱墅区,3301
|
||||
330106,西湖区,3301
|
||||
330108,滨江区,3301
|
||||
@ -927,6 +925,8 @@
|
||||
330110,余杭区,3301
|
||||
330111,富阳区,3301
|
||||
330112,临安区,3301
|
||||
330113,临平区,3301
|
||||
330114,钱塘区,3301
|
||||
330122,桐庐县,3301
|
||||
330127,淳安县,3301
|
||||
330182,建德市,3301
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div id="linkChannelRecord" style="width: 100%; background-color: #FFFFFF; display: grid; grid-template-columns: 200px auto;">
|
||||
<div id="linkChannelRecord" style="width: 100%; background-color: #FFFFFF;">
|
||||
<el-dialog v-el-drag-dialog v-if="showDialog" v-loading="dialogLoading" title="通道关联" top="2rem" width="80%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
||||
<div style="display: grid; grid-template-columns: 100px auto;">
|
||||
<div style="display: grid; grid-template-columns: 100px minmax(0, 1fr);">
|
||||
<el-tabs v-model="hasLink" tab-position="left" style="" @tab-click="search">
|
||||
<el-tab-pane label="未关联" name="false" />
|
||||
<el-tab-pane label="已关联" name="true" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user