临时提交
parent
9aad6ac719
commit
8ab88c0f02
|
@ -102,4 +102,7 @@ public class ParentPlatform {
|
||||||
|
|
||||||
@Schema(description = "是否使用自定义业务分组")
|
@Schema(description = "是否使用自定义业务分组")
|
||||||
private Boolean customCatalog;
|
private Boolean customCatalog;
|
||||||
|
|
||||||
|
@Schema(description = "是否自动推送通道变化")
|
||||||
|
private Boolean autoPushChannel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,9 +146,9 @@ public interface CommonGBChannelMapper {
|
||||||
int update(CommonGBChannel commonGBChannel);
|
int update(CommonGBChannel commonGBChannel);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
"UPDATE wvp_device_channel " +
|
" UPDATE wvp_device_channel " +
|
||||||
"SET gb_status = #{gbStatus}" +
|
" SET gb_status = #{status}" +
|
||||||
"WHERE id = #{gbId}"+
|
" WHERE id = #{gbId}"+
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int updateStatusById(@Param("gbId") int gbId, @Param("status") int status);
|
int updateStatusById(@Param("gbId") int gbId, @Param("status") int status);
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class ChannelProvider {
|
||||||
sqlBuild.append(getBaseSelectSql());
|
sqlBuild.append(getBaseSelectSql());
|
||||||
sqlBuild.append("where gb_status=#{status} and id in ( ");
|
sqlBuild.append("where gb_status=#{status} and id in ( ");
|
||||||
|
|
||||||
List<CommonGBChannel> commonGBChannelList = (List<CommonGBChannel>)params.get("ids");
|
List<CommonGBChannel> commonGBChannelList = (List<CommonGBChannel>)params.get("commonGBChannelList");
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (CommonGBChannel channel : commonGBChannelList) {
|
for (CommonGBChannel channel : commonGBChannelList) {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
|
|
|
@ -315,7 +315,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
},
|
},
|
||||||
(parentPlatform.getKeepTimeout())*1000);
|
(parentPlatform.getKeepTimeout())*1000);
|
||||||
}
|
}
|
||||||
if (parentPlatform.isAutoPushChannel()) {
|
if (parentPlatform.getAutoPushChannel() != null && parentPlatform.getAutoPushChannel()) {
|
||||||
if (subscribeHolder.getCatalogSubscribe(parentPlatform.getServerGBId()) == null) {
|
if (subscribeHolder.getCatalogSubscribe(parentPlatform.getServerGBId()) == null) {
|
||||||
log.info("[国标级联]:{}, 添加自动通道推送模拟订阅信息", parentPlatform.getServerGBId());
|
log.info("[国标级联]:{}, 添加自动通道推送模拟订阅信息", parentPlatform.getServerGBId());
|
||||||
addSimulatedSubscribeInfo(parentPlatform);
|
addSimulatedSubscribeInfo(parentPlatform);
|
||||||
|
|
|
@ -197,7 +197,8 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
log.error("未处理的异常 ", e);
|
log.error("未处理的异常 ", e);
|
||||||
}
|
}
|
||||||
if (subscribeHolder.getCatalogSubscribe(platformId) == null && platform.isAutoPushChannel()) {
|
if (subscribeHolder.getCatalogSubscribe(platformId) == null
|
||||||
|
&& platform.getAutoPushChannel() != null && platform.getAutoPushChannel()) {
|
||||||
platformService.addSimulatedSubscribeInfo(platform);
|
platformService.addSimulatedSubscribeInfo(platform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -692,7 +692,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||||
@Override
|
@Override
|
||||||
public void addPushListItem(String app, String stream, MediaArrivalEvent event) {
|
public void addPushListItem(String app, String stream, MediaArrivalEvent event) {
|
||||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||||
redisTemplate.opsForValue().set(key, event.getHookParam());
|
redisTemplate.opsForValue().set(key, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
|
||||||
* 拉起离线推流
|
* 拉起离线推流
|
||||||
*/
|
*/
|
||||||
@Schema(description = "拉起离线推流")
|
@Schema(description = "拉起离线推流")
|
||||||
private boolean autoPushChannel;
|
private boolean startOfflinePush;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(@NotNull StreamPush streamPushItem) {
|
public int compareTo(@NotNull StreamPush streamPushItem) {
|
||||||
|
|
|
@ -4,10 +4,8 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
|
||||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||||
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||||
|
@ -20,7 +18,6 @@ import com.genersoft.iot.vmp.streamPush.service.IStreamPushPlayService;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
@ -46,21 +43,12 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DynamicTask dynamicTask;
|
private DynamicTask dynamicTask;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private HookSubscribe subscribe;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IRedisRpcService redisRpcService;
|
private IRedisRpcService redisRpcService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisTemplate<String, Object> redisTemplate;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisPushStreamResponseListener redisPushStreamResponseListener;
|
private RedisPushStreamResponseListener redisPushStreamResponseListener;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SendRtpPortManager sendRtpPortManager;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Integer id, ErrorCallback<StreamInfo> callback, String platformDeviceId, String platformName ) {
|
public void start(Integer id, ErrorCallback<StreamInfo> callback, String platformDeviceId, String platformName ) {
|
||||||
StreamPush streamPush = streamPushMapper.queryOne(id);
|
StreamPush streamPush = streamPushMapper.queryOne(id);
|
||||||
|
@ -76,7 +64,7 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
||||||
streamPush.getApp(), streamPush.getStream(), null, callId));
|
streamPush.getApp(), streamPush.getStream(), null, callId));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Assert.isTrue(streamPush.isAutoPushChannel(), "通道未推流");
|
Assert.isTrue(streamPush.isStartOfflinePush(), "通道未推流");
|
||||||
// 发送redis消息以使设备上线,流上线后被
|
// 发送redis消息以使设备上线,流上线后被
|
||||||
log.info("[ app={}, stream={} ]通道未推流,发送redis信息控制设备开始推流", streamPush.getApp(), streamPush.getStream());
|
log.info("[ app={}, stream={} ]通道未推流,发送redis信息控制设备开始推流", streamPush.getApp(), streamPush.getStream());
|
||||||
MessageForPushChannel messageForPushChannel = MessageForPushChannel.getInstance(1,
|
MessageForPushChannel messageForPushChannel = MessageForPushChannel.getInstance(1,
|
||||||
|
|
|
@ -197,7 +197,7 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: '/api/push/start',
|
url: '/api/push/start',
|
||||||
params: {
|
params: {
|
||||||
id: id
|
id: row.id
|
||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.getListLoading = false;
|
that.getListLoading = false;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
[api]
|
[api]
|
||||||
apiDebug=1
|
apiDebug=1
|
||||||
defaultSnap=./www/logo.png
|
defaultSnap=./www/logo.png
|
||||||
|
downloadRoot=./www
|
||||||
secret=034523TF8yT83wh5Wvz73f7
|
secret=034523TF8yT83wh5Wvz73f7
|
||||||
snapRoot=./www/snap/
|
snapRoot=./www/snap/
|
||||||
|
|
||||||
|
@ -14,9 +15,10 @@ timeout_sec=15
|
||||||
[ffmpeg]
|
[ffmpeg]
|
||||||
bin=/usr/bin/ffmpeg
|
bin=/usr/bin/ffmpeg
|
||||||
cmd=%s -re -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s
|
cmd=%s -re -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s
|
||||||
|
cmd2=%s -rtsp_transport tcp -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f rtsp %s
|
||||||
log=./ffmpeg/ffmpeg.log
|
log=./ffmpeg/ffmpeg.log
|
||||||
restart_sec=0
|
restart_sec=0
|
||||||
snap=%s -i %s -y -f mjpeg -t 0.001 %s
|
snap=%s -rtsp_transport tcp -i %s -y -f mjpeg -frames:v 1 %s
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
check_nvidia_dev=1
|
check_nvidia_dev=1
|
||||||
|
@ -24,10 +26,10 @@ enableVhost=0
|
||||||
enable_ffmpeg_log=0
|
enable_ffmpeg_log=0
|
||||||
flowThreshold=1024
|
flowThreshold=1024
|
||||||
maxStreamWaitMS=15000
|
maxStreamWaitMS=15000
|
||||||
mediaServerId=GQ3TF8yT83wh5Wvz
|
mediaServerId=XwFtVZrtZbHJq4UV
|
||||||
mergeWriteMS=0
|
mergeWriteMS=0
|
||||||
resetWhenRePlay=1
|
resetWhenRePlay=1
|
||||||
streamNoneReaderDelayMS=15000
|
streamNoneReaderDelayMS=20000
|
||||||
unready_frame_cache=100
|
unready_frame_cache=100
|
||||||
wait_add_track_ms=3000
|
wait_add_track_ms=3000
|
||||||
wait_track_ready_ms=10000
|
wait_track_ready_ms=10000
|
||||||
|
@ -35,26 +37,28 @@ wait_track_ready_ms=10000
|
||||||
[hls]
|
[hls]
|
||||||
broadcastRecordTs=0
|
broadcastRecordTs=0
|
||||||
deleteDelaySec=10
|
deleteDelaySec=10
|
||||||
|
fastRegister=0
|
||||||
fileBufSize=65536
|
fileBufSize=65536
|
||||||
|
segDelay=0
|
||||||
segDur=2
|
segDur=2
|
||||||
segKeep=0
|
segKeep=0
|
||||||
segNum=3
|
segNum=3
|
||||||
segRetain=5
|
segRetain=5
|
||||||
|
|
||||||
[hook]
|
[hook]
|
||||||
admin_params=secret=034523TF8yT83wh5Wvz73f7
|
alive_interval=10.0
|
||||||
alive_interval=30.000000
|
|
||||||
enable=1
|
enable=1
|
||||||
on_flow_report=
|
on_flow_report=
|
||||||
on_http_access=
|
on_http_access=
|
||||||
on_play=http://192.168.1.3:18082/index/hook/on_play
|
on_play=http://192.168.1.3:18082/index/hook/on_play
|
||||||
on_publish=http://192.168.1.3:18082/index/hook/on_publish
|
on_publish=http://192.168.1.3:18082/index/hook/on_publish
|
||||||
on_record_mp4=
|
on_record_mp4=http://192.168.1.3:18082/index/hook/on_record_mp4
|
||||||
on_record_ts=
|
on_record_ts=
|
||||||
on_rtp_server_timeout=http://192.168.1.3:18082/index/hook/on_rtp_server_timeout
|
on_rtp_server_timeout=http://192.168.1.3:18082/index/hook/on_rtp_server_timeout
|
||||||
on_rtsp_auth=
|
on_rtsp_auth=
|
||||||
on_rtsp_realm=
|
on_rtsp_realm=
|
||||||
on_send_rtp_stopped=http://192.168.1.3:18082/index/hook/on_send_rtp_stopped
|
on_send_rtp_stopped=http://192.168.1.3:18082/index/hook/on_send_rtp_stopped
|
||||||
|
on_server_exited=
|
||||||
on_server_keepalive=http://192.168.1.3:18082/index/hook/on_server_keepalive
|
on_server_keepalive=http://192.168.1.3:18082/index/hook/on_server_keepalive
|
||||||
on_server_started=http://192.168.1.3:18082/index/hook/on_server_started
|
on_server_started=http://192.168.1.3:18082/index/hook/on_server_started
|
||||||
on_shell_login=
|
on_shell_login=
|
||||||
|
@ -63,20 +67,23 @@ on_stream_none_reader=http://192.168.1.3:18082/index/hook/on_stream_none_reader
|
||||||
on_stream_not_found=http://192.168.1.3:18082/index/hook/on_stream_not_found
|
on_stream_not_found=http://192.168.1.3:18082/index/hook/on_stream_not_found
|
||||||
retry=1
|
retry=1
|
||||||
retry_delay=3.000000
|
retry_delay=3.000000
|
||||||
|
stream_changed_schemas=rtsp/rtmp/fmp4/ts/hls/hls.fmp4
|
||||||
timeoutSec=20
|
timeoutSec=20
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
|
allow_cross_domains=1
|
||||||
|
allow_ip_range=
|
||||||
charSet=utf-8
|
charSet=utf-8
|
||||||
dirMenu=1
|
dirMenu=1
|
||||||
forbidCacheSuffix=
|
forbidCacheSuffix=
|
||||||
forwarded_ip_header=
|
forwarded_ip_header=
|
||||||
keepAliveSecond=15
|
keepAliveSecond=15
|
||||||
maxReqSize=40960
|
maxReqSize=40960
|
||||||
notFound=<html><head><title>404 Not Found</title></head><body bgcolor="white"><center><h1>您访问的资源不存在!</h1></center><hr><center>ZLMediaKit(git hash:f6cba98/2023-02-06T14:18:21+08:00,branch:master,build time:2023-02-07T10:51:47)</center></body></html>
|
notFound=<html><head><title>404 Not Found</title></head><body bgcolor="white"><center><h1>您访问的资源不存在!</h1></center><hr><center>ZLMediaKit(git hash:f69f3b3/2023-09-09T10:59:27+08:00,branch:master,build time:2023-09-11T15:03:57)</center></body></html>
|
||||||
port=6080
|
port=7082
|
||||||
rootPath=./www
|
rootPath=./www
|
||||||
sendBufSize=65536
|
sendBufSize=65536
|
||||||
sslport=16080
|
sslport=11443
|
||||||
virtualPath=
|
virtualPath=
|
||||||
|
|
||||||
[multicast]
|
[multicast]
|
||||||
|
@ -86,10 +93,12 @@ udpTTL=64
|
||||||
|
|
||||||
[protocol]
|
[protocol]
|
||||||
add_mute_audio=1
|
add_mute_audio=1
|
||||||
|
auto_close=0
|
||||||
continue_push_ms=3000
|
continue_push_ms=3000
|
||||||
enable_audio=1
|
enable_audio=1
|
||||||
enable_fmp4=1
|
enable_fmp4=1
|
||||||
enable_hls=1
|
enable_hls=1
|
||||||
|
enable_hls_fmp4=0
|
||||||
enable_mp4=0
|
enable_mp4=0
|
||||||
enable_rtmp=1
|
enable_rtmp=1
|
||||||
enable_rtsp=1
|
enable_rtsp=1
|
||||||
|
@ -97,52 +106,64 @@ enable_ts=1
|
||||||
fmp4_demand=0
|
fmp4_demand=0
|
||||||
hls_demand=0
|
hls_demand=0
|
||||||
hls_save_path=./www
|
hls_save_path=./www
|
||||||
modify_stamp=2
|
modify_stamp=1
|
||||||
mp4_as_player=0
|
mp4_as_player=0
|
||||||
mp4_max_second=300
|
mp4_max_second=300
|
||||||
mp4_save_path=./www
|
mp4_save_path=./www
|
||||||
|
paced_sender_ms=0
|
||||||
rtmp_demand=0
|
rtmp_demand=0
|
||||||
rtsp_demand=0
|
rtsp_demand=0
|
||||||
ts_demand=0
|
ts_demand=0
|
||||||
|
|
||||||
[record]
|
[record]
|
||||||
appName=record
|
appName=record
|
||||||
|
enableFmp4=0
|
||||||
fastStart=0
|
fastStart=0
|
||||||
fileBufSize=65536
|
fileBufSize=65536
|
||||||
fileRepeat=0
|
fileRepeat=0
|
||||||
sampleMS=500
|
sampleMS=500
|
||||||
|
|
||||||
[rtc]
|
[rtc]
|
||||||
|
datachannel_echo=1
|
||||||
externIP=192.168.1.3
|
externIP=192.168.1.3
|
||||||
port=8000
|
max_bitrate=0
|
||||||
preferredCodecA=PCMA,PCMU,opus,mpeg4-generic
|
min_bitrate=0
|
||||||
|
port=11340
|
||||||
|
preferredCodecA=PCMA,opus,mpeg4-generic
|
||||||
preferredCodecV=H264,H265,AV1,VP9,VP8
|
preferredCodecV=H264,H265,AV1,VP9,VP8
|
||||||
rembBitRate=0
|
rembBitRate=0
|
||||||
tcpPort=8000
|
start_bitrate=0
|
||||||
|
tcpPort=11340
|
||||||
timeoutSec=15
|
timeoutSec=15
|
||||||
|
|
||||||
[rtmp]
|
[rtmp]
|
||||||
|
directProxy=1
|
||||||
|
enhanced=0
|
||||||
handshakeSecond=15
|
handshakeSecond=15
|
||||||
keepAliveSecond=15
|
keepAliveSecond=15
|
||||||
modifyStamp=0
|
port=11935
|
||||||
port=1935
|
sslport=18350
|
||||||
sslport=19350
|
|
||||||
|
|
||||||
[rtp]
|
[rtp]
|
||||||
audioMtuSize=600
|
audioMtuSize=600
|
||||||
|
h264_stap_a=1
|
||||||
lowLatency=0
|
lowLatency=0
|
||||||
rtpMaxSize=10
|
rtpMaxSize=10
|
||||||
videoMtuSize=1400
|
videoMtuSize=1400
|
||||||
|
|
||||||
[rtp_proxy]
|
[rtp_proxy]
|
||||||
dumpDir=
|
aac_pt=101
|
||||||
|
dumpDir=./dump
|
||||||
|
gop_cache=1
|
||||||
h264_pt=98
|
h264_pt=98
|
||||||
h265_pt=99
|
h265_pt=99
|
||||||
opus_pt=100
|
opus_pt=100
|
||||||
port=10000
|
port=11000
|
||||||
port_range=40000-40500
|
port_range=30000-40000
|
||||||
ps_pt=96
|
ps_pt=96
|
||||||
|
rtp_g711_dur_ms=100
|
||||||
timeoutSec=15
|
timeoutSec=15
|
||||||
|
udp_recv_socket_buffer=4194304
|
||||||
|
|
||||||
[rtsp]
|
[rtsp]
|
||||||
authBasic=0
|
authBasic=0
|
||||||
|
@ -150,22 +171,22 @@ directProxy=1
|
||||||
handshakeSecond=15
|
handshakeSecond=15
|
||||||
keepAliveSecond=15
|
keepAliveSecond=15
|
||||||
lowLatency=0
|
lowLatency=0
|
||||||
port=10554
|
port=22554
|
||||||
sslport=
|
rtpTransportType=-1
|
||||||
|
sslport=11332
|
||||||
|
|
||||||
[shell]
|
[shell]
|
||||||
maxReqSize=1024
|
maxReqSize=1024
|
||||||
port=9000
|
port=9900
|
||||||
|
|
||||||
[srt]
|
[srt]
|
||||||
latencyMul=4
|
latencyMul=4
|
||||||
pktBufSize=8192
|
pktBufSize=8192
|
||||||
port=9000
|
port=9900
|
||||||
timeoutSec=5
|
timeoutSec=5
|
||||||
|
|
||||||
|
|
||||||
[transcode]
|
[transcode]
|
||||||
acodec=pcma
|
acodec=mpeg4-generic
|
||||||
decoder_h264=h264_qsv,h264_videotoolbox,h264_bm,libopenh264
|
decoder_h264=h264_qsv,h264_videotoolbox,h264_bm,libopenh264
|
||||||
decoder_h265=hevc_qsv,hevc_videotoolbox,hevc_bm
|
decoder_h265=hevc_qsv,hevc_videotoolbox,hevc_bm
|
||||||
enable_ffmpeg_log=0
|
enable_ffmpeg_log=0
|
||||||
|
|
Loading…
Reference in New Issue