Browse Source

修复关闭按需拉流无效的问题

pull/388/head
dengming 3 years ago
parent
commit
bef7fb2440
  1. 2
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
  2. 2
      src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java

2
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

@ -459,7 +459,7 @@ public class ZLMHttpHookListener {
} }
} }
MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId); MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId);
if (mediaServerItem != null && "-1".equals(mediaServerItem.getStreamNoneReaderDelayMS())) { if (mediaServerItem != null && mediaServerItem.getStreamNoneReaderDelayMS() == -1) {
ret.put("close", false); ret.put("close", false);
} }
return new ResponseEntity<String>(ret.toString(),HttpStatus.OK); return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);

2
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java

@ -512,7 +512,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
param.put("hook.on_stream_not_found",String.format("%s/on_stream_not_found", hookPrex)); param.put("hook.on_stream_not_found",String.format("%s/on_stream_not_found", hookPrex));
param.put("hook.on_server_keepalive",String.format("%s/on_server_keepalive", hookPrex)); param.put("hook.on_server_keepalive",String.format("%s/on_server_keepalive", hookPrex));
param.put("hook.timeoutSec","20"); param.put("hook.timeoutSec","20");
param.put("general.streamNoneReaderDelayMS","-1".equals(mediaServerItem.getStreamNoneReaderDelayMS())?"3600000":mediaServerItem.getStreamNoneReaderDelayMS() ); param.put("general.streamNoneReaderDelayMS",mediaServerItem.getStreamNoneReaderDelayMS()==-1?"3600000":mediaServerItem.getStreamNoneReaderDelayMS() );
JSONObject responseJSON = zlmresTfulUtils.setServerConfig(mediaServerItem, param); JSONObject responseJSON = zlmresTfulUtils.setServerConfig(mediaServerItem, param);

Loading…
Cancel
Save