|
|
@@ -17,6 +17,7 @@ import org.jetlinks.community.media.entity.MediaDevice;
|
|
|
import org.jetlinks.community.media.entity.MediaDeviceChannel;
|
|
|
import org.jetlinks.community.media.gb28181.event.SipSubscribe;
|
|
|
import org.jetlinks.community.media.gb28181.result.WVPResult;
|
|
|
+import org.jetlinks.community.media.message.MediaMessageReply;
|
|
|
import org.jetlinks.community.media.session.VideoStreamSessionManager;
|
|
|
import org.jetlinks.community.media.storage.impl.RedisCacheStorageImpl;
|
|
|
import org.jetlinks.community.media.transmit.callback.DeferredResultHolder;
|
|
|
@@ -26,9 +27,12 @@ import org.jetlinks.community.media.gb28181.result.PlayResult;
|
|
|
import org.jetlinks.community.media.zlm.ZLMHttpHookSubscribe;
|
|
|
import org.jetlinks.community.media.zlm.ZLMRESTfulUtils;
|
|
|
import org.jetlinks.community.media.zlm.entity.MediaServerItem;
|
|
|
+import org.jetlinks.community.utils.SubscribeKeyGenerate;
|
|
|
import org.jetlinks.core.cluster.ClusterEventBus;
|
|
|
+import org.jetlinks.core.device.StandaloneDeviceMessageBroker;
|
|
|
import org.jetlinks.core.event.EventBus;
|
|
|
import org.jetlinks.core.event.Subscription;
|
|
|
+import org.jetlinks.core.exception.DeviceOperationException;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
@@ -52,9 +56,6 @@ import java.util.function.Function;
|
|
|
@Slf4j
|
|
|
@AllArgsConstructor
|
|
|
public class LocalPlayService {
|
|
|
-
|
|
|
- // @Autowired
|
|
|
-// private IVideoManagerStorager storager;
|
|
|
private final SipCommander cmder;
|
|
|
|
|
|
private final RedisCacheStorageImpl redisCatchStorage;
|
|
|
@@ -70,189 +71,168 @@ public class LocalPlayService {
|
|
|
private final ZLMRESTfulUtils zlmresTfulUtils;
|
|
|
|
|
|
private final UserSetup userSetup;
|
|
|
- public Mono<PlayResult> play(MediaServerItem mediaServerItem, String deviceId, String channelId,
|
|
|
- ZLMHttpHookSubscribe.Event hookEvent, SipSubscribe.Event errorEvent) {
|
|
|
- PlayResult playResult = new PlayResult();
|
|
|
- RequestMessage msg = new RequestMessage();
|
|
|
- String key = DeferredResultHolder.CALLBACK_CMD_PLAY + deviceId + channelId;
|
|
|
- msg.setKey(key);
|
|
|
- String uuid = UUID.randomUUID().toString();
|
|
|
- msg.setId(uuid);
|
|
|
- playResult.setUuid(uuid);
|
|
|
- DeferredResult<ResponseEntity<String>> result = new DeferredResult<>(userSetup.getPlayTimeout());
|
|
|
- playResult.setResult(result);
|
|
|
- resultHolder.put(key, uuid, result);
|
|
|
+
|
|
|
+ private final StandaloneDeviceMessageBroker messageBroker;
|
|
|
+
|
|
|
+ public Flux<MediaMessageReply> play(MediaServerItem mediaServerItem, String deviceId, String channelId,
|
|
|
+ ZLMHttpHookSubscribe.Event hookEvent, SipSubscribe.Event errorEvent) {
|
|
|
+ String key = SubscribeKeyGenerate.getSubscribeKey(DeferredResultHolder.CALLBACK_CMD_PLAY,deviceId,channelId);
|
|
|
if (mediaServerItem == null) {
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(-1);
|
|
|
- wvpResult.setMsg("未找到可用的zlm");
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeResult(msg);
|
|
|
- return Mono.just(playResult);
|
|
|
+ return Flux.error(new BusinessException("未找到可用的zlm"));
|
|
|
}
|
|
|
-
|
|
|
MediaDevice device = redisCatchStorage.getDevice(deviceId);
|
|
|
- StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId);
|
|
|
- playResult.setDevice(device);
|
|
|
- // 超时处理
|
|
|
- playResult.onTimeout(Mono.fromRunnable(()->{
|
|
|
- log.warn(String.format("设备点播超时,deviceId:%s ,channelId:%s", deviceId, channelId));
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(-1);
|
|
|
- SIPDialog dialog = streamSessionManager.getDialog(deviceId, channelId);
|
|
|
- if (dialog != null) {
|
|
|
- wvpResult.setMsg("收流超时,请稍候重试");
|
|
|
- }else {
|
|
|
- wvpResult.setMsg("点播超时,请稍候重试");
|
|
|
- }
|
|
|
- msg.setData(wvpResult);
|
|
|
- // 点播超时回复BYE
|
|
|
- cmder.streamByeCmd(device.getId(), channelId)
|
|
|
- .doOnNext(ignore->
|
|
|
- // 释放rtpserver
|
|
|
- mediaServerItemService.closeRTPServer(playResult.getDevice(), channelId))
|
|
|
- .doOnNext(ignore->
|
|
|
- // 回复之前所有的点播请求
|
|
|
- resultHolder.invokeAllResult(msg))
|
|
|
- .subscribe();
|
|
|
- }));
|
|
|
-// playResult.onComplete(Mono.fromRunnable(()->{
|
|
|
-// // 点播结束时调用截图接口
|
|
|
-// String fileName = deviceId + "_" + channelId + ".jpg";
|
|
|
-// ResponseEntity responseEntity = (ResponseEntity)result.getResult();
|
|
|
-// if (responseEntity != null && responseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
-// WVPResult wvpResult = (WVPResult)responseEntity.getBody();
|
|
|
-// if (Objects.requireNonNull(wvpResult).getCode() == 0) {
|
|
|
-// StreamInfo streamInfoForSuccess = (StreamInfo)wvpResult.getData();
|
|
|
-// mediaServerItemService.findById(streamInfoForSuccess.getMediaServerId())
|
|
|
-// .doOnNext(mediaInfo->{
|
|
|
-// String classPath = null;
|
|
|
-// try {
|
|
|
-// classPath = ResourceUtils.getURL("classpath:").getPath();
|
|
|
-// // 兼容打包为jar的class路径
|
|
|
-// if(classPath.contains("jar")) {
|
|
|
-// classPath = classPath.substring(0, classPath.lastIndexOf("."));
|
|
|
-// classPath = classPath.substring(0, classPath.lastIndexOf("/") + 1);
|
|
|
-// }
|
|
|
-// if (classPath.startsWith("file:")) {
|
|
|
-// classPath = classPath.substring(classPath.indexOf(":") + 1);
|
|
|
-// }
|
|
|
-// String path = classPath + "static/static/snap/";
|
|
|
-// // 兼容Windows系统路径(去除前面的“/”)
|
|
|
-// if(System.getProperty("os.name").contains("indows")) {
|
|
|
-// path = path.substring(1);
|
|
|
-// }
|
|
|
-// String streamUrl = streamInfoForSuccess.getRtsp();
|
|
|
-// // 请求截图
|
|
|
-// log.info("[请求截图]: " + fileName);
|
|
|
-// zlmresTfulUtils.getSnap(mediaInfo, streamUrl, 15, 1, path, fileName);
|
|
|
-// } catch (FileNotFoundException e) {
|
|
|
-// log.error("存放截图文件路径不存在,",e);
|
|
|
-// }
|
|
|
-// })
|
|
|
-// .subscribe();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }));
|
|
|
- if (streamInfo == null) {
|
|
|
- SSRCInfo ssrcInfo;
|
|
|
- String streamId = null;
|
|
|
- if (mediaServerItem.isRtpEnable()) {
|
|
|
- streamId = String.format("%s_%s", device.getId(), channelId);
|
|
|
- }
|
|
|
-
|
|
|
- ssrcInfo = mediaServerItemService.openRTPServer(mediaServerItem, streamId);
|
|
|
-
|
|
|
- // 发送点播消息
|
|
|
- return cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInUse,JSONObject response) -> {
|
|
|
- log.info("收到订阅消息: " + response.toString());
|
|
|
- onPublishHandlerForPlay(mediaServerItemInUse, response, deviceId, channelId, uuid).subscribe();
|
|
|
- if (hookEvent != null) {
|
|
|
- hookEvent.accept(mediaServerItem, response);
|
|
|
+ return Mono.justOrEmpty(redisCatchStorage.queryPlayByDevice(deviceId, channelId))
|
|
|
+ .switchIfEmpty(Mono.defer(()->{
|
|
|
+ SSRCInfo ssrcInfo;
|
|
|
+ String streamId = null;
|
|
|
+ if (mediaServerItem.isRtpEnable()) {
|
|
|
+ streamId = String.format("%s_%s", device.getId(), channelId);
|
|
|
}
|
|
|
- }, (event) -> {
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(-1);
|
|
|
- // 点播返回sip错误
|
|
|
- mediaServerItemService.closeRTPServer(playResult.getDevice(), channelId);
|
|
|
- wvpResult.setMsg(String.format("点播失败, 错误码: %s, %s", event.statusCode, event.msg));
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
- if (errorEvent != null) {
|
|
|
- errorEvent.accept(event);
|
|
|
+ ssrcInfo = mediaServerItemService.openRTPServer(mediaServerItem, streamId);
|
|
|
+ // 发送点播消息
|
|
|
+ return cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInUse,JSONObject response) -> {
|
|
|
+ log.info("收到订阅消息: " + response.toString());
|
|
|
+ onPublishHandlerForPlay(mediaServerItemInUse, response, deviceId, channelId).subscribe();
|
|
|
+ if (hookEvent != null) {
|
|
|
+ hookEvent.accept(mediaServerItem, response);
|
|
|
+ }
|
|
|
+ }, (event) -> {
|
|
|
+ // 点播返回sip错误
|
|
|
+ mediaServerItemService.closeRTPServer(device, channelId);
|
|
|
+ MediaMessageReply messageReply = MediaMessageReply.of(String.format("点播失败, 错误码: %s, %s", event.statusCode, event.msg),null);
|
|
|
+ messageReply.setSuccess(false);
|
|
|
+ if (errorEvent != null) {
|
|
|
+ errorEvent.accept(event);
|
|
|
+ }
|
|
|
+ messageBroker.reply(messageReply).subscribe();
|
|
|
+ }).then(Mono.empty());
|
|
|
+ }))
|
|
|
+ .flatMap(streamInfo->{
|
|
|
+ String streamId = streamInfo.getStreamId();
|
|
|
+ if (streamId == null) {
|
|
|
+ MediaMessageReply messageReply = MediaMessageReply.of("点播失败, redis缓存streamId等于null",null);
|
|
|
+ messageReply.setSuccess(false);
|
|
|
+ return Mono.just(messageReply);
|
|
|
}
|
|
|
- })
|
|
|
- .thenReturn(playResult);
|
|
|
- } else {
|
|
|
- String streamId = streamInfo.getStreamId();
|
|
|
- if (streamId == null) {
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(-1);
|
|
|
- wvpResult.setMsg("点播失败, redis缓存streamId等于null");
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
- return Mono.just(playResult);
|
|
|
- }
|
|
|
- return mediaServerItemService.findById(streamInfo.getMediaServerId())
|
|
|
- .flatMap(mediaInfo->{
|
|
|
- JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaInfo, streamId);
|
|
|
- if (rtpInfo != null && rtpInfo.getBool("exist")) {
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(0);
|
|
|
- wvpResult.setMsg("success");
|
|
|
- wvpResult.setData(streamInfo);
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
- if (hookEvent != null) {
|
|
|
- try {
|
|
|
- hookEvent.accept(mediaServerItem, JSONUtil.parseObj(JSON.toJSONString(streamInfo)));
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("点播回调函数失败,",e);
|
|
|
+ return mediaServerItemService.findById(streamInfo.getMediaServerId())
|
|
|
+ .flatMap(mediaInfo->{
|
|
|
+ JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaInfo, streamId);
|
|
|
+ if (rtpInfo != null && rtpInfo.getBool("exist")) {
|
|
|
+ MediaMessageReply messageReply = MediaMessageReply.of(null, streamInfo);
|
|
|
+ messageReply.setSuccess(true);
|
|
|
+ messageBroker.reply(messageReply).subscribe();
|
|
|
+ if (hookEvent != null) {
|
|
|
+ try {
|
|
|
+ hookEvent.accept(mediaServerItem, JSONUtil.parseObj(JSON.toJSONString(streamInfo)));
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("点播回调函数失败,",e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // TODO 点播前是否重置状态
|
|
|
+ redisCatchStorage.stopPlay(streamInfo);
|
|
|
+ deviceChannelService.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
|
|
+ SSRCInfo ssrcInfo;
|
|
|
+ String streamId2 = null;
|
|
|
+ if (mediaServerItem.isRtpEnable()) {
|
|
|
+ streamId2 = String.format("%s_%s", device.getId(), channelId);
|
|
|
}
|
|
|
+ ssrcInfo = mediaServerItemService.openRTPServer(mediaServerItem, streamId2);
|
|
|
+
|
|
|
+ return cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> {
|
|
|
+ log.info("收到订阅消息: " + response.toString());
|
|
|
+ onPublishHandlerForPlay(mediaServerItemInuse, response, deviceId, channelId).subscribe();
|
|
|
+ }, (event) -> {
|
|
|
+ mediaServerItemService.closeRTPServer(device, channelId);
|
|
|
+ MediaMessageReply messageReply = MediaMessageReply.of(String.format("点播失败, 错误码: %s, %s", event.statusCode, event.msg), null);
|
|
|
+ messageBroker.reply(messageReply).subscribe();
|
|
|
+ });
|
|
|
}
|
|
|
- } else {
|
|
|
- // TODO 点播前是否重置状态
|
|
|
- redisCatchStorage.stopPlay(streamInfo);
|
|
|
- deviceChannelService.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
|
|
- SSRCInfo ssrcInfo;
|
|
|
- String streamId2 = null;
|
|
|
- if (mediaServerItem.isRtpEnable()) {
|
|
|
- streamId2 = String.format("%s_%s", device.getId(), channelId);
|
|
|
+ return Mono.empty();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .thenMany(messageBroker.handleReply(deviceId,key,Duration.ofSeconds(10))
|
|
|
+ .onErrorResume(DeviceOperationException.class,error->
|
|
|
+ //超时响应处理
|
|
|
+ Mono.defer(()->{
|
|
|
+ log.warn(String.format("设备点播超时,deviceId:%s ,channelId:%s", deviceId, channelId));
|
|
|
+ MediaMessageReply messageReply = new MediaMessageReply();
|
|
|
+ messageReply.setDeviceId(deviceId);
|
|
|
+ messageReply.setMessageId(key);
|
|
|
+ messageReply.setSuccess(false);
|
|
|
+ SIPDialog dialog = streamSessionManager.getDialog(deviceId, channelId);
|
|
|
+ if (dialog != null) {
|
|
|
+ messageReply.setErrMsg("收流超时,请稍候重试");
|
|
|
+ }else {
|
|
|
+ messageReply.setErrMsg("点播超时,请稍候重试");
|
|
|
+ }
|
|
|
+ // 点播超时回复BYE
|
|
|
+ return cmder.streamByeCmd(device.getId(), channelId)
|
|
|
+ .doOnNext(ignore->
|
|
|
+ // 释放rtpserver
|
|
|
+ mediaServerItemService.closeRTPServer(device, channelId))
|
|
|
+ .flatMap(ignore->
|
|
|
+ // 回复之前所有的点播请求
|
|
|
+ messageBroker.reply(messageReply));
|
|
|
+ }).then(Mono.error(error))
|
|
|
+ )
|
|
|
+ .flatMap(reply->{
|
|
|
+ if(reply instanceof MediaMessageReply){
|
|
|
+ MediaMessageReply<StreamInfo> messageReply= (MediaMessageReply<StreamInfo>) reply;
|
|
|
+ if(reply.isSuccess()){
|
|
|
+ return Flux.just(messageReply);
|
|
|
+ }else {
|
|
|
+ return Flux.error(new BusinessException(Optional.ofNullable(messageReply.getErrMsg()).orElse("响应错误,请重试")));
|
|
|
}
|
|
|
- ssrcInfo = mediaServerItemService.openRTPServer(mediaServerItem, streamId2);
|
|
|
-
|
|
|
- return cmder.playStreamCmd(mediaServerItem, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> {
|
|
|
- log.info("收到订阅消息: " + response.toString());
|
|
|
- onPublishHandlerForPlay(mediaServerItemInuse, response, deviceId, channelId, uuid).subscribe();
|
|
|
- }, (event) -> {
|
|
|
- mediaServerItemService.closeRTPServer(playResult.getDevice(), channelId);
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(-1);
|
|
|
- wvpResult.setMsg(String.format("点播失败, 错误码: %s, %s", event.statusCode, event.msg));
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
- });
|
|
|
}
|
|
|
- return Mono.empty();
|
|
|
- })
|
|
|
- .thenReturn(playResult);
|
|
|
- }
|
|
|
+ return Flux.error(new BusinessException("服务器响应错误"));
|
|
|
+ }));
|
|
|
}
|
|
|
|
|
|
- public Mono<Void> onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) {
|
|
|
- RequestMessage msg = new RequestMessage();
|
|
|
- msg.setId(uuid);
|
|
|
- msg.setKey(DeferredResultHolder.CALLBACK_CMD_PLAY + deviceId + channelId);
|
|
|
- return onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid)
|
|
|
- .doOnNext(streamInfo -> {
|
|
|
+ private Mono<Void> getSnap(String deviceId,String channelId,StreamInfo streamInfo){
|
|
|
+ return Mono.fromRunnable(()->{
|
|
|
+ // 点播结束时调用截图接口
|
|
|
+ String fileName = deviceId + "_" + channelId + ".jpg";
|
|
|
+ mediaServerItemService.findById(streamInfo.getMediaServerId())
|
|
|
+ .doOnNext(mediaInfo->{
|
|
|
+ String classPath = null;
|
|
|
+ try {
|
|
|
+ classPath = ResourceUtils.getURL("classpath:").getPath();
|
|
|
+ // 兼容打包为jar的class路径
|
|
|
+ if(classPath.contains("jar")) {
|
|
|
+ classPath = classPath.substring(0, classPath.lastIndexOf("."));
|
|
|
+ classPath = classPath.substring(0, classPath.lastIndexOf("/") + 1);
|
|
|
+ }
|
|
|
+ if (classPath.startsWith("file:")) {
|
|
|
+ classPath = classPath.substring(classPath.indexOf(":") + 1);
|
|
|
+ }
|
|
|
+ String path = classPath + "static/static/snap/";
|
|
|
+ // 兼容Windows系统路径(去除前面的“/”)
|
|
|
+ if(System.getProperty("os.name").contains("indows")) {
|
|
|
+ path = path.substring(1);
|
|
|
+ }
|
|
|
+ String streamUrl = streamInfo.getRtsp();
|
|
|
+ // 请求截图
|
|
|
+ log.info("[请求截图]: " + fileName);
|
|
|
+ zlmresTfulUtils.getSnap(mediaInfo, streamUrl, 15, 1, path, fileName);
|
|
|
+ } catch (FileNotFoundException e) {
|
|
|
+ log.error("存放截图文件路径不存在,",e);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .subscribe();
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ public Mono<Void> onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId) {
|
|
|
+ String key=SubscribeKeyGenerate.getSubscribeKey(DeferredResultHolder.CALLBACK_CMD_PLAY,deviceId,channelId);
|
|
|
+ return onPublishHandler(mediaServerItem, resonse, deviceId, channelId)
|
|
|
+ .flatMap(streamInfo -> {
|
|
|
redisCatchStorage.startPlay(streamInfo);
|
|
|
- msg.setData(JSON.toJSONString(streamInfo));
|
|
|
- WVPResult wvpResult = new WVPResult();
|
|
|
- wvpResult.setCode(0);
|
|
|
- wvpResult.setMsg("success");
|
|
|
- wvpResult.setData(streamInfo);
|
|
|
- msg.setData(wvpResult);
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
+ MediaMessageReply<StreamInfo> mediaMessageReply = MediaMessageReply.of(null, streamInfo);
|
|
|
+ mediaMessageReply.setMessageId(key);
|
|
|
+ mediaMessageReply.setSuccess(true);
|
|
|
+ return messageBroker.reply(mediaMessageReply)
|
|
|
+ .thenReturn(streamInfo);
|
|
|
})
|
|
|
.flatMap(streamInfo ->
|
|
|
deviceChannelService.createQuery()
|
|
|
@@ -267,12 +247,7 @@ public class LocalPlayService {
|
|
|
return Mono.empty();
|
|
|
})
|
|
|
.then()
|
|
|
- )
|
|
|
- .switchIfEmpty(Mono.fromRunnable(()->{
|
|
|
- log.warn("设备预览API调用失败!");
|
|
|
- msg.setData("设备预览API调用失败!");
|
|
|
- resultHolder.invokeAllResult(msg);
|
|
|
- }));
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -288,11 +263,10 @@ public class LocalPlayService {
|
|
|
return Mono.justOrEmpty(device.getMediaServerId())
|
|
|
.flatMap(mediaServerItemService::findById)
|
|
|
//找不到设备相应的媒体流服务器则根据负载均衡获取相应的媒体流服务器
|
|
|
- .switchIfEmpty(mediaServerItemService.getMediaServerForMinimumLoad())
|
|
|
- .switchIfEmpty(Mono.fromRunnable(()-> log.warn("点播时未找到可使用的ZLM...")));
|
|
|
+ .switchIfEmpty(mediaServerItemService.getMediaServerForMinimumLoad());
|
|
|
}
|
|
|
|
|
|
- private Mono<StreamInfo> onPublishHandler(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) {
|
|
|
+ private Mono<StreamInfo> onPublishHandler(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId) {
|
|
|
String streamId = resonse.getStr("stream");
|
|
|
JSONArray tracks = resonse.getJSONArray("tracks");
|
|
|
return mediaServerItemService.getStreamInfoByAppAndStream(mediaServerItem,"rtp", streamId, tracks)
|