Merge branch '2.7.0'
commit
7d0aebd311
|
@ -305,4 +305,33 @@ public class SendRtpItem {
|
||||||
public void setReceiveStream(String receiveStream) {
|
public void setReceiveStream(String receiveStream) {
|
||||||
this.receiveStream = receiveStream;
|
this.receiveStream = receiveStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SendRtpItem{" +
|
||||||
|
"ip='" + ip + '\'' +
|
||||||
|
", port=" + port +
|
||||||
|
", ssrc='" + ssrc + '\'' +
|
||||||
|
", platformId='" + platformId + '\'' +
|
||||||
|
", deviceId='" + deviceId + '\'' +
|
||||||
|
", app='" + app + '\'' +
|
||||||
|
", channelId='" + channelId + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", stream='" + stream + '\'' +
|
||||||
|
", tcp=" + tcp +
|
||||||
|
", tcpActive=" + tcpActive +
|
||||||
|
", localPort=" + localPort +
|
||||||
|
", mediaServerId='" + mediaServerId + '\'' +
|
||||||
|
", serverId='" + serverId + '\'' +
|
||||||
|
", CallId='" + CallId + '\'' +
|
||||||
|
", fromTag='" + fromTag + '\'' +
|
||||||
|
", toTag='" + toTag + '\'' +
|
||||||
|
", pt=" + pt +
|
||||||
|
", usePs=" + usePs +
|
||||||
|
", onlyAudio=" + onlyAudio +
|
||||||
|
", rtcp=" + rtcp +
|
||||||
|
", playType=" + playType +
|
||||||
|
", receiveStream='" + receiveStream + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
|
||||||
|
|
||||||
if (parentPlatform != null) {
|
if (parentPlatform != null) {
|
||||||
Map<String, Object> param = getSendRtpParam(sendRtpItem);
|
Map<String, Object> param = getSendRtpParam(sendRtpItem);
|
||||||
if (mediaInfo == null) {
|
if (!userSetting.getServerId().equals(sendRtpItem.getServerId())) {
|
||||||
RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(
|
RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(
|
||||||
sendRtpItem.getMediaServerId(), sendRtpItem.getApp(), sendRtpItem.getStream(),
|
sendRtpItem.getMediaServerId(), sendRtpItem.getApp(), sendRtpItem.getStream(),
|
||||||
sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isTcp(),
|
sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isTcp(),
|
||||||
|
|
|
@ -575,15 +575,21 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("push".equals(gbStream.getStreamType())) {
|
if ("push".equals(gbStream.getStreamType())) {
|
||||||
if (streamPushItem != null && streamPushItem.isPushIng()) {
|
if (streamPushItem != null) {
|
||||||
|
// 从redis查询是否正在接收这个推流
|
||||||
|
OnStreamChangedHookParam pushListItem = redisCatchStorage.getPushListItem(gbStream.getApp(), gbStream.getStream());
|
||||||
|
if (pushListItem != null) {
|
||||||
|
StreamPushItem transform = streamPushService.transform(pushListItem);
|
||||||
|
transform.setSelf(userSetting.getServerId().equals(pushListItem.getSeverId()));
|
||||||
// 推流状态
|
// 推流状态
|
||||||
pushStream(evt, request, gbStream, streamPushItem, platform, callIdHeader, mediaServerItem, port, tcpActive,
|
pushStream(evt, request, gbStream, transform, platform, callIdHeader, mediaServerItem, port, tcpActive,
|
||||||
mediaTransmissionTCP, channelId, addressStr, ssrc, requesterId);
|
mediaTransmissionTCP, channelId, addressStr, ssrc, requesterId);
|
||||||
} else {
|
}else {
|
||||||
// 未推流 拉起
|
// 未推流 拉起
|
||||||
notifyStreamOnline(evt, request, gbStream, streamPushItem, platform, callIdHeader, mediaServerItem, port, tcpActive,
|
notifyStreamOnline(evt, request, gbStream, streamPushItem, platform, callIdHeader, mediaServerItem, port, tcpActive,
|
||||||
mediaTransmissionTCP, channelId, addressStr, ssrc, requesterId);
|
mediaTransmissionTCP, channelId, addressStr, ssrc, requesterId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if ("proxy".equals(gbStream.getStreamType())) {
|
} else if ("proxy".equals(gbStream.getStreamType())) {
|
||||||
if (null != proxyByAppAndStream) {
|
if (null != proxyByAppAndStream) {
|
||||||
if (proxyByAppAndStream.isStatus()) {
|
if (proxyByAppAndStream.isStatus()) {
|
||||||
|
|
|
@ -509,7 +509,19 @@ public class ZLMHttpHookListener {
|
||||||
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream());
|
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream());
|
||||||
if (!sendRtpItems.isEmpty()) {
|
if (!sendRtpItems.isEmpty()) {
|
||||||
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
||||||
if (sendRtpItem != null && sendRtpItem.getApp().equals(param.getApp())) {
|
if (sendRtpItem == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sendRtpItem.getApp().equals(param.getApp())) {
|
||||||
|
logger.info(sendRtpItem.toString());
|
||||||
|
if (userSetting.getServerId().equals(sendRtpItem.getServerId())) {
|
||||||
|
MessageForPushChannel messageForPushChannel = MessageForPushChannel.getInstance(0,
|
||||||
|
sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getChannelId(),
|
||||||
|
sendRtpItem.getPlatformId(), null, userSetting.getServerId(), param.getMediaServerId());
|
||||||
|
// 通知其他wvp停止发流
|
||||||
|
redisCatchStorage.sendPushStreamClose(messageForPushChannel);
|
||||||
|
}else {
|
||||||
String platformId = sendRtpItem.getPlatformId();
|
String platformId = sendRtpItem.getPlatformId();
|
||||||
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);
|
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);
|
||||||
Device device = deviceService.getDevice(platformId);
|
Device device = deviceService.getDevice(platformId);
|
||||||
|
@ -536,6 +548,8 @@ public class ZLMHttpHookListener {
|
||||||
logger.error("[命令发送失败] 发送BYE: {}", e.getMessage());
|
logger.error("[命令发送失败] 发送BYE: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1166,7 +1166,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
dynamicTask.startDelay(key, ()->{
|
dynamicTask.startDelay(key, ()->{
|
||||||
logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
||||||
stopAudioBroadcast(device.getDeviceId(), channelId);
|
stopAudioBroadcast(device.getDeviceId(), channelId);
|
||||||
}, 2000);
|
}, 10*1000);
|
||||||
}, eventResultForError -> {
|
}, eventResultForError -> {
|
||||||
// 发送失败
|
// 发送失败
|
||||||
logger.error("语音广播发送失败: {}:{}", channelId, eventResultForError.msg);
|
logger.error("语音广播发送失败: {}:{}", channelId, eventResultForError.msg);
|
||||||
|
|
|
@ -8,7 +8,6 @@ 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.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
|
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
|
import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
||||||
|
@ -25,7 +24,6 @@ import com.genersoft.iot.vmp.service.IStreamProxyService;
|
||||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||||
import com.genersoft.iot.vmp.storager.dao.GbStreamMapper;
|
import com.genersoft.iot.vmp.storager.dao.GbStreamMapper;
|
||||||
import com.genersoft.iot.vmp.storager.dao.ParentPlatformMapper;
|
|
||||||
import com.genersoft.iot.vmp.storager.dao.PlatformGbStreamMapper;
|
import com.genersoft.iot.vmp.storager.dao.PlatformGbStreamMapper;
|
||||||
import com.genersoft.iot.vmp.storager.dao.StreamProxyMapper;
|
import com.genersoft.iot.vmp.storager.dao.StreamProxyMapper;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
|
@ -333,8 +331,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||||
result = zlmresTfulUtils.addStreamProxy(mediaServerItem, param.getApp(), param.getStream(), param.getUrl().trim(),
|
result = zlmresTfulUtils.addStreamProxy(mediaServerItem, param.getApp(), param.getStream(), param.getUrl().trim(),
|
||||||
param.isEnableAudio(), param.isEnableMp4(), param.getRtpType());
|
param.isEnableAudio(), param.isEnableMp4(), param.getRtpType());
|
||||||
}
|
}
|
||||||
System.out.println("addStreamProxyToZlm====");
|
|
||||||
System.out.println(result);
|
|
||||||
if (result != null && result.getInteger("code") == 0) {
|
if (result != null && result.getInteger("code") == 0) {
|
||||||
JSONObject data = result.getJSONObject("data");
|
JSONObject data = result.getJSONObject("data");
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
|
|
|
@ -2,12 +2,10 @@ package com.genersoft.iot.vmp.service.redisMsg;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.InviteStreamType;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
||||||
import com.genersoft.iot.vmp.service.IMediaServerService;
|
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||||
import com.genersoft.iot.vmp.service.IStreamPushService;
|
import com.genersoft.iot.vmp.service.IStreamPushService;
|
||||||
|
@ -25,7 +23,6 @@ import org.springframework.stereotype.Component;
|
||||||
import javax.sip.InvalidArgumentException;
|
import javax.sip.InvalidArgumentException;
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@ -86,26 +83,6 @@ public class RedisPushStreamCloseResponseListener implements MessageListener {
|
||||||
logger.error("[命令发送失败] 国标级联 发送BYE: {}", e.getMessage());
|
logger.error("[命令发送失败] 国标级联 发送BYE: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (push.isSelf()) {
|
|
||||||
// 停止向上级推流
|
|
||||||
String streamId = sendRtpItem.getStream();
|
|
||||||
Map<String, Object> param = new HashMap<>();
|
|
||||||
param.put("vhost","__defaultVhost__");
|
|
||||||
param.put("app",sendRtpItem.getApp());
|
|
||||||
param.put("stream",streamId);
|
|
||||||
param.put("ssrc",sendRtpItem.getSsrc());
|
|
||||||
logger.info("[REDIS消息-推流结束] 停止向上级推流:{}", streamId);
|
|
||||||
MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
|
|
||||||
redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getCallId(), sendRtpItem.getStream());
|
|
||||||
zlmServerFactory.stopSendRtpStream(mediaInfo, param);
|
|
||||||
if (InviteStreamType.PUSH == sendRtpItem.getPlayType()) {
|
|
||||||
MessageForPushChannel messageForPushChannel = MessageForPushChannel.getInstance(0,
|
|
||||||
sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getChannelId(),
|
|
||||||
sendRtpItem.getPlatformId(), parentPlatform.getName(), userSetting.getServerId(), sendRtpItem.getMediaServerId());
|
|
||||||
messageForPushChannel.setPlatFormIndex(parentPlatform.getId());
|
|
||||||
redisCatchStorage.sendPlatformStopPlayMsg(messageForPushChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
package com.genersoft.iot.vmp.service.redisMsg;
|
package com.genersoft.iot.vmp.service.redisMsg;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMMediaListManager;
|
import com.genersoft.iot.vmp.media.zlm.ZLMMediaListManager;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -41,52 +37,52 @@ public class RedisStreamMsgListener implements MessageListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Message message, byte[] bytes) {
|
public void onMessage(Message message, byte[] bytes) {
|
||||||
boolean isEmpty = taskQueue.isEmpty();
|
// boolean isEmpty = taskQueue.isEmpty();
|
||||||
taskQueue.offer(message);
|
// taskQueue.offer(message);
|
||||||
if (isEmpty) {
|
// if (isEmpty) {
|
||||||
taskExecutor.execute(() -> {
|
// taskExecutor.execute(() -> {
|
||||||
while (!taskQueue.isEmpty()) {
|
// while (!taskQueue.isEmpty()) {
|
||||||
Message msg = taskQueue.poll();
|
// Message msg = taskQueue.poll();
|
||||||
try {
|
// try {
|
||||||
JSONObject steamMsgJson = JSON.parseObject(msg.getBody(), JSONObject.class);
|
// JSONObject steamMsgJson = JSON.parseObject(msg.getBody(), JSONObject.class);
|
||||||
if (steamMsgJson == null) {
|
// if (steamMsgJson == null) {
|
||||||
logger.warn("[收到redis 流变化]消息解析失败");
|
// logger.warn("[收到redis 流变化]消息解析失败");
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
String serverId = steamMsgJson.getString("serverId");
|
// String serverId = steamMsgJson.getString("serverId");
|
||||||
|
//
|
||||||
if (userSetting.getServerId().equals(serverId)) {
|
// if (userSetting.getServerId().equals(serverId)) {
|
||||||
// 自己发送的消息忽略即可
|
// // 自己发送的消息忽略即可
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
logger.info("[收到redis 流变化]: {}", new String(message.getBody()));
|
// logger.info("[收到redis 流变化]: {}", new String(message.getBody()));
|
||||||
String app = steamMsgJson.getString("app");
|
// String app = steamMsgJson.getString("app");
|
||||||
String stream = steamMsgJson.getString("stream");
|
// String stream = steamMsgJson.getString("stream");
|
||||||
boolean register = steamMsgJson.getBoolean("register");
|
// boolean register = steamMsgJson.getBoolean("register");
|
||||||
String mediaServerId = steamMsgJson.getString("mediaServerId");
|
// String mediaServerId = steamMsgJson.getString("mediaServerId");
|
||||||
OnStreamChangedHookParam onStreamChangedHookParam = new OnStreamChangedHookParam();
|
// OnStreamChangedHookParam onStreamChangedHookParam = new OnStreamChangedHookParam();
|
||||||
onStreamChangedHookParam.setSeverId(serverId);
|
// onStreamChangedHookParam.setSeverId(serverId);
|
||||||
onStreamChangedHookParam.setApp(app);
|
// onStreamChangedHookParam.setApp(app);
|
||||||
onStreamChangedHookParam.setStream(stream);
|
// onStreamChangedHookParam.setStream(stream);
|
||||||
onStreamChangedHookParam.setRegist(register);
|
// onStreamChangedHookParam.setRegist(register);
|
||||||
onStreamChangedHookParam.setMediaServerId(mediaServerId);
|
// onStreamChangedHookParam.setMediaServerId(mediaServerId);
|
||||||
onStreamChangedHookParam.setCreateStamp(System.currentTimeMillis()/1000);
|
// onStreamChangedHookParam.setCreateStamp(System.currentTimeMillis()/1000);
|
||||||
onStreamChangedHookParam.setAliveSecond(0L);
|
// onStreamChangedHookParam.setAliveSecond(0L);
|
||||||
onStreamChangedHookParam.setTotalReaderCount("0");
|
// onStreamChangedHookParam.setTotalReaderCount("0");
|
||||||
onStreamChangedHookParam.setOriginType(0);
|
// onStreamChangedHookParam.setOriginType(0);
|
||||||
onStreamChangedHookParam.setOriginTypeStr("0");
|
// onStreamChangedHookParam.setOriginTypeStr("0");
|
||||||
onStreamChangedHookParam.setOriginTypeStr("unknown");
|
// onStreamChangedHookParam.setOriginTypeStr("unknown");
|
||||||
if (register) {
|
// if (register) {
|
||||||
zlmMediaListManager.addPush(onStreamChangedHookParam);
|
// zlmMediaListManager.addPush(onStreamChangedHookParam);
|
||||||
}else {
|
// }else {
|
||||||
zlmMediaListManager.removeMedia(app, stream);
|
// zlmMediaListManager.removeMedia(app, stream);
|
||||||
}
|
// }
|
||||||
}catch (Exception e) {
|
// }catch (Exception e) {
|
||||||
logger.warn("[REDIS消息-流变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
|
// logger.warn("[REDIS消息-流变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
|
||||||
logger.error("[REDIS消息-流变化] 异常内容: ", e);
|
// logger.error("[REDIS消息-流变化] 异常内容: ", e);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,5 +211,10 @@ public interface IRedisCatchStorage {
|
||||||
|
|
||||||
void addPushListItem(String app, String stream, OnStreamChangedHookParam param);
|
void addPushListItem(String app, String stream, OnStreamChangedHookParam param);
|
||||||
|
|
||||||
|
OnStreamChangedHookParam getPushListItem(String app, String stream);
|
||||||
|
|
||||||
void removePushListItem(String app, String stream, String mediaServerId);
|
void removePushListItem(String app, String stream, String mediaServerId);
|
||||||
|
|
||||||
|
void sendPushStreamClose(MessageForPushChannel messageForPushChannel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -656,6 +656,12 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||||
redisTemplate.opsForValue().set(key, param);
|
redisTemplate.opsForValue().set(key, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OnStreamChangedHookParam getPushListItem(String app, String stream) {
|
||||||
|
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||||
|
return (OnStreamChangedHookParam)redisTemplate.opsForValue().get(key);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removePushListItem(String app, String stream, String mediaServerId) {
|
public void removePushListItem(String app, String stream, String mediaServerId) {
|
||||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||||
|
@ -665,4 +671,11 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendPushStreamClose(MessageForPushChannel msg) {
|
||||||
|
String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_CLOSE_REQUESTED;
|
||||||
|
logger.info("[redis发送通知] 发送 停止向上级推流 {}: {}/{}->{}", key, msg.getApp(), msg.getStream(), msg.getPlatFormId());
|
||||||
|
redisTemplate.convertAndSend(key, JSON.toJSON(msg));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package com.genersoft.iot.vmp.vmanager.cloudRecord;
|
package com.genersoft.iot.vmp.vmanager.cloudRecord;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
|
||||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||||
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||||
import com.genersoft.iot.vmp.service.ICloudRecordService;
|
import com.genersoft.iot.vmp.service.ICloudRecordService;
|
||||||
import com.genersoft.iot.vmp.service.IMediaServerService;
|
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||||
|
@ -22,7 +18,6 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
|
@ -152,7 +152,8 @@ public class PlayController {
|
||||||
wvpResult.setMsg(msg);
|
wvpResult.setMsg(msg);
|
||||||
}
|
}
|
||||||
requestMessage.setData(wvpResult);
|
requestMessage.setData(wvpResult);
|
||||||
resultHolder.invokeResult(requestMessage);
|
// 此处必须释放所有请求
|
||||||
|
resultHolder.invokeAllResult(requestMessage);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue