合并主线

结构优化
648540858 2022-07-12 16:54:58 +08:00
parent 66e6756909
commit cfed860667
6 changed files with 7 additions and 13 deletions

View File

@ -1024,7 +1024,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
AudioBroadcastResult audioBroadcastResult = new AudioBroadcastResult();
audioBroadcastResult.setApp(app);
audioBroadcastResult.setStream(stream);
audioBroadcastResult.setStreamInfo(mediaService.getStreamInfoByAppAndStream(mediaServerItem, app, stream, null, null, false));
audioBroadcastResult.setStreamInfo(mediaService.getStreamInfoByAppAndStream(mediaServerItem, app, stream, null, null, null,false));
audioBroadcastResult.setCodec("G.711");
wvpResult.setData(audioBroadcastResult);
RequestMessage requestMessage = new RequestMessage();

View File

@ -200,7 +200,7 @@ public class ZLMHttpHookListener {
logger.info("[ ZLM HOOK ]on_publish API调用参数" + json.toString());
JSONObject ret = new JSONObject();
if (!"rtp".equals(param.getApp())) {
if (!"rtp".equals(param.getApp()) && !"broadcast".equals(param.getApp())) {
// 推流鉴权
if (param.getParams() == null) {
logger.info("推流鉴权失败: 缺少不要参数sign=md5(user表的pushKey)");

View File

@ -40,6 +40,5 @@ public interface IMediaService {
* @param stream
* @return
*/
StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String addr, String callId);
StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String addr, boolean isPlay);
StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String addr, String callId, boolean isPlay);
}

View File

@ -517,7 +517,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
param.put("general.continue_push_ms", "3000" );
// 最多等待未初始化的Track时间单位毫秒超时之后会忽略未初始化的Track, 设置此选项优化那些音频错误的不规范流,
// 等zlm支持给每个rtpServer设置关闭音频的时候可以不设置此选项
param.put("general.wait_track_ready_ms", "3000" );
// param.put("general.wait_track_ready_ms", "3000" );
if (mediaServerItem.isRtpEnable() && !StringUtils.isEmpty(mediaServerItem.getRtpPortRange())) {
param.put("rtp_proxy.port_range", mediaServerItem.getRtpPortRange().replace(",", "-"));
}

View File

@ -40,7 +40,7 @@ public class MediaServiceImpl implements IMediaService {
@Override
public StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String callId) {
return getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, null, callId);
return getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, null, callId, true);
}
@Override
@ -67,7 +67,7 @@ public class MediaServiceImpl implements IMediaService {
JSONObject mediaJSON = JSON.parseObject(JSON.toJSONString(data.get(0)), JSONObject.class);
JSONArray tracks = mediaJSON.getJSONArray("tracks");
if (authority) {
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, streamAuthorityInfo.getCallId());
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, null, streamAuthorityInfo.getCallId(), true);
}else {
streamInfo = getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, null);
}
@ -84,11 +84,6 @@ public class MediaServiceImpl implements IMediaService {
return getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, null, authority);
}
@Override
public StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String addr) {
return getStreamInfoByAppAndStream(mediaInfo, app, stream, tracks, addr, true);
}
@Override
public StreamInfo getStreamInfoByAppAndStream(MediaServerItem mediaInfo, String app, String stream, Object tracks, String addr, String callId, boolean isPlay) {
StreamInfo streamInfoResult = new StreamInfo();

View File

@ -915,7 +915,7 @@ export default {
this.broadcastStatus = 0;
}else if (e === "connected") {
this.broadcastStatus = 1;
}else {
}else if (e === "disconnected") {
this.broadcastStatus = -1;
}
});