| | |
| | | ret.put("code", 0);
|
| | | ret.put("msg", "success");
|
| | | ret.put("enableHls", true);
|
| | | ret.put("enableMP4", userSetup.isRecordPushLive());
|
| | | String mediaServerId = json.getString("mediaServerId");
|
| | | ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json);
|
| | | if (subscribe != null) {
|
| | |
| | | }
|
| | | String app = json.getString("app");
|
| | | String stream = json.getString("stream");
|
| | | if ("rtp".equals(app)) {
|
| | | ret.put("enableMP4", userSetup.getRecordSip());
|
| | | }else {
|
| | | ret.put("enableMP4", userSetup.isRecordPushLive());
|
| | | }
|
| | | StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream);
|
| | |
|
| | | // 录像回放时不进行录像下载
|
| | |
| | | }else {
|
| | | mediaServerService.removeCount(mediaServerId);
|
| | | }
|
| | | if (item.getOriginType() == OriginType.PULL.ordinal()
|
| | | || item.getOriginType() == OriginType.FFMPEG_PULL.ordinal()) {
|
| | | // 设置拉流代理上线/离线
|
| | | streamProxyService.updateStatus(regist, app, streamId);
|
| | | }
|
| | | if ("rtp".equals(app) && !regist ) {
|
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId);
|
| | | if (streamInfo!=null){
|
| | |
| | | || item.getOriginType() == OriginType.RTC_PUSH.ordinal() ) {
|
| | | streamPushItem = zlmMediaListManager.addPush(item);
|
| | | }
|
| | |
|
| | | List<GbStream> gbStreams = new ArrayList<>();
|
| | | if (streamPushItem == null || streamPushItem.getGbId() == null) {
|
| | | GbStream gbStream = storager.getGbStream(app, streamId);
|
| | |
| | | }
|
| | | }
|
| | | if (gbStreams.size() > 0) {
|
| | | eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON);
|
| | | eventPublisher.catalogEventPublishForStream(null, gbStreams.toArray(new GbStream[0]), CatalogEvent.ON);
|
| | | }
|
| | |
|
| | | }else {
|