修复录制计划以来全局录像配置, 目前去除依赖,目前录制计划开启录像
This commit is contained in:
@@ -129,17 +129,19 @@ public class MediaServiceImpl implements IMediaService {
|
||||
ResultForOnPublish result = new ResultForOnPublish();
|
||||
result.setEnable_audio(true);
|
||||
|
||||
// 是否录像
|
||||
if ("rtp".equals(app)) {
|
||||
result.setEnable_mp4(userSetting.getRecordSip());
|
||||
} else {
|
||||
result.setEnable_mp4(userSetting.getRecordPushLive());
|
||||
}
|
||||
// 国标流
|
||||
if ("rtp".equals(app)) {
|
||||
|
||||
InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, stream);
|
||||
|
||||
if (inviteInfo != null) {
|
||||
result.setEnable_mp4(inviteInfo.getRecord());
|
||||
}else {
|
||||
result.setEnable_mp4(userSetting.getRecordSip());
|
||||
}
|
||||
|
||||
result.setEnable_mp4(inviteInfo.getRecord());
|
||||
|
||||
// 单端口模式下修改流 ID
|
||||
if (!mediaServer.isRtpEnable() && inviteInfo == null) {
|
||||
String ssrc = String.format("%010d", Long.parseLong(stream, 16));
|
||||
@@ -190,8 +192,12 @@ public class MediaServiceImpl implements IMediaService {
|
||||
}
|
||||
} else if (app.equals("broadcast")) {
|
||||
result.setEnable_audio(true);
|
||||
result.setEnable_mp4(userSetting.getRecordSip());
|
||||
} else if (app.equals("talk")) {
|
||||
result.setEnable_audio(true);
|
||||
result.setEnable_mp4(userSetting.getRecordSip());
|
||||
}else {
|
||||
result.setEnable_mp4(userSetting.getRecordPushLive());
|
||||
}
|
||||
if (app.equalsIgnoreCase("rtp")) {
|
||||
String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + stream;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
||||
return;
|
||||
}
|
||||
// 开启点播,
|
||||
channelPlayService.play(channel, null, ((code, msg, streamInfo) -> {
|
||||
channelPlayService.play(channel, null, true, ((code, msg, streamInfo) -> {
|
||||
if (code == InviteErrorCode.SUCCESS.getCode() && streamInfo != null) {
|
||||
log.info("[录像] 流离开时拉起需要录像的流, 开启成功, 通道ID: {}", channel.getGbId());
|
||||
recordStreamMap.put(channel.getGbId(), streamInfo);
|
||||
@@ -110,7 +110,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
||||
// 查找是否已经开启录像, 如果没有则开启录像
|
||||
for (CommonGBChannel channel : channelList) {
|
||||
// 开启点播,
|
||||
channelPlayService.play(channel, null, ((code, msg, streamInfo) -> {
|
||||
channelPlayService.play(channel, null, true, ((code, msg, streamInfo) -> {
|
||||
if (code == InviteErrorCode.SUCCESS.getCode() && streamInfo != null) {
|
||||
log.info("[录像] 开启成功, 通道ID: {}", channel.getGbId());
|
||||
recordStreamMap.put(channel.getGbId(), streamInfo);
|
||||
|
||||
Reference in New Issue
Block a user