Commit 287d42c1968a53c97ee2eff20bed444d842a41b5

Authored by 648540858
1 parent c42d3912

推流默认开启音频

src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -222,7 +222,7 @@ public class ZLMHttpHookListener { @@ -222,7 +222,7 @@ public class ZLMHttpHookListener {
222 222
223 223
224 HookResultForOnPublish result = HookResultForOnPublish.SUCCESS(); 224 HookResultForOnPublish result = HookResultForOnPublish.SUCCESS();
225 - 225 + result.setEnable_audio(true);
226 taskExecutor.execute(() -> { 226 taskExecutor.execute(() -> {
227 ZlmHttpHookSubscribe.Event subscribe = this.subscribe.sendNotify(HookType.on_publish, json); 227 ZlmHttpHookSubscribe.Event subscribe = this.subscribe.sendNotify(HookType.on_publish, json);
228 if (subscribe != null) { 228 if (subscribe != null) {
@@ -250,7 +250,6 @@ public class ZLMHttpHookListener { @@ -250,7 +250,6 @@ public class ZLMHttpHookListener {
250 // 如果是录像下载就设置视频间隔十秒 250 // 如果是录像下载就设置视频间隔十秒
251 if (ssrcTransactionForAll.get(0).getType() == VideoStreamSessionManager.SessionType.download) { 251 if (ssrcTransactionForAll.get(0).getType() == VideoStreamSessionManager.SessionType.download) {
252 result.setMp4_max_second(10); 252 result.setMp4_max_second(10);
253 - result.setEnable_audio(true);  
254 result.setEnable_mp4(true); 253 result.setEnable_mp4(true);
255 } 254 }
256 } 255 }
@@ -275,12 +274,8 @@ public class ZLMHttpHookListener { @@ -275,12 +274,8 @@ public class ZLMHttpHookListener {
275 } 274 }
276 if (param.getApp().equalsIgnoreCase("rtp")) { 275 if (param.getApp().equalsIgnoreCase("rtp")) {
277 String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + param.getStream(); 276 String receiveKey = VideoManagerConstants.WVP_OTHER_RECEIVE_RTP_INFO + userSetting.getServerId() + "_" + param.getStream();
278 - System.out.println(receiveKey);  
279 OtherRtpSendInfo otherRtpSendInfo = (OtherRtpSendInfo)redisTemplate.opsForValue().get(receiveKey); 277 OtherRtpSendInfo otherRtpSendInfo = (OtherRtpSendInfo)redisTemplate.opsForValue().get(receiveKey);
280 - System.out.println("otherRtpSendInfo != null ====>" + (otherRtpSendInfo != null));  
281 if (otherRtpSendInfo != null) { 278 if (otherRtpSendInfo != null) {
282 - System.out.println("otherRtpSendInfo != null");  
283 - result.setEnable_audio(true);  
284 result.setEnable_mp4(true); 279 result.setEnable_mp4(true);
285 } 280 }
286 } 281 }