支持推流鉴权
parent
9800fd6e7b
commit
8716160d96
|
@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.media.abl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
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.gb28181.event.EventPublisher;
|
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||||
import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
|
import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
|
||||||
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
||||||
|
@ -177,9 +178,13 @@ public class ABLHttpHookListener {
|
||||||
return new HookResultForOnPublish(0, "success");
|
return new HookResultForOnPublish(0, "success");
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultForOnPublish resultForOnPublish = mediaService.authenticatePublish(mediaServer, param.getApp(), param.getStream(), param.getParams());
|
try {
|
||||||
if (resultForOnPublish == null) {
|
ResultForOnPublish resultForOnPublish = mediaService.authenticatePublish(mediaServer, param.getApp(), param.getStream(), param.getParams());
|
||||||
logger.info("[ABL HOOK]推流鉴权 拒绝 响应:{}->{}", param.getMediaServerId(), param);
|
if (resultForOnPublish == null) {
|
||||||
|
logger.info("[ABL HOOK]推流鉴权 拒绝 响应:{}->{}", param.getMediaServerId(), param);
|
||||||
|
ablresTfulUtils.closeStreams(mediaServer, param.getApp(), param.getStream());
|
||||||
|
}
|
||||||
|
}catch (ControllerException e) {
|
||||||
ablresTfulUtils.closeStreams(mediaServer, param.getApp(), param.getStream());
|
ablresTfulUtils.closeStreams(mediaServer, param.getApp(), param.getStream());
|
||||||
}
|
}
|
||||||
return HookResult.SUCCESS();
|
return HookResult.SUCCESS();
|
||||||
|
|
|
@ -129,7 +129,6 @@ public class ABLMediaNodeServerService implements IMediaNodeServerService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StreamInfo> getMediaList(MediaServer mediaServer, String app, String stream, String callId) {
|
public List<StreamInfo> getMediaList(MediaServer mediaServer, String app, String stream, String callId) {
|
||||||
logger.warn("[abl-getMediaList] 未实现");
|
|
||||||
JSONObject jsonObject = ablresTfulUtils.getMediaList(mediaServer, app, stream);
|
JSONObject jsonObject = ablresTfulUtils.getMediaList(mediaServer, app, stream);
|
||||||
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
|
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue