修复录像下载
parent
7a59acc8e6
commit
a1861038e5
|
@ -1,9 +1,6 @@
|
||||||
package com.genersoft.iot.vmp.media.event.hook;
|
package com.genersoft.iot.vmp.media.event.hook;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
import com.genersoft.iot.vmp.media.event.media.*;
|
||||||
import com.genersoft.iot.vmp.media.event.media.MediaDepartureEvent;
|
|
||||||
import com.genersoft.iot.vmp.media.event.media.MediaEvent;
|
|
||||||
import com.genersoft.iot.vmp.media.event.media.MediaPublishEvent;
|
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
@ -60,6 +57,14 @@ public class HookSubscribe {
|
||||||
public void onApplicationEvent(MediaPublishEvent event) {
|
public void onApplicationEvent(MediaPublishEvent event) {
|
||||||
sendNotify(HookType.on_publish, event);
|
sendNotify(HookType.on_publish, event);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 推流鉴权事件
|
||||||
|
*/
|
||||||
|
@Async("taskExecutor")
|
||||||
|
@EventListener
|
||||||
|
public void onApplicationEvent(MediaRecordMp4Event event) {
|
||||||
|
sendNotify(HookType.on_record_mp4, event);
|
||||||
|
}
|
||||||
|
|
||||||
private final Map<String, Event> allSubscribes = new ConcurrentHashMap<>();
|
private final Map<String, Event> allSubscribes = new ConcurrentHashMap<>();
|
||||||
private final Map<String, Hook> allHook = new ConcurrentHashMap<>();
|
private final Map<String, Hook> allHook = new ConcurrentHashMap<>();
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
@EventListener
|
@EventListener
|
||||||
public void onApplicationEvent(MediaSendRtpStoppedEvent event) {
|
public void onApplicationEvent(MediaSendRtpStoppedEvent event) {
|
||||||
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(event.getStream());
|
List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(event.getStream());
|
||||||
if (!sendRtpItems.isEmpty()) {
|
if (sendRtpItems != null && !sendRtpItems.isEmpty()) {
|
||||||
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
for (SendRtpItem sendRtpItem : sendRtpItems) {
|
||||||
ParentPlatform parentPlatform = platformMapper.getParentPlatByServerGBId(sendRtpItem.getPlatformId());
|
ParentPlatform parentPlatform = platformMapper.getParentPlatByServerGBId(sendRtpItem.getPlatformId());
|
||||||
ssrcFactory.releaseSsrc(sendRtpItem.getMediaServerId(), sendRtpItem.getSsrc());
|
ssrcFactory.releaseSsrc(sendRtpItem.getMediaServerId(), sendRtpItem.getSsrc());
|
||||||
|
|
Loading…
Reference in New Issue