| | |
| | | } |
| | | // 如果是录像下载就设置视频间隔十秒 |
| | | if (ssrcTransactionForAll.get(0).getType() == InviteSessionType.DOWNLOAD) { |
| | | result.setMp4_max_second(10); |
| | | result.setMp4_max_second(30); |
| | | result.setEnable_mp4(true); |
| | | } |
| | | } |
| | | if (mediaInfo.getRecordAssistPort() > 0 && userSetting.getRecordPath() == null) { |
| | | logger.info("推流时发现尚未设置录像路径,从assist服务中读取"); |
| | | JSONObject info = assistRESTfulUtils.getInfo(mediaInfo, null); |
| | | if (info != null && info.getInteger("code") != null && info.getInteger("code") == 0 ) { |
| | | JSONObject dataJson = info.getJSONObject("data"); |
| | | if (dataJson != null) { |
| | | String recordPath = dataJson.getString("record"); |
| | | userSetting.setRecordPath(recordPath); |
| | | result.setMp4_save_path(recordPath); |
| | | // 修改zlm中的录像路径 |
| | | if (mediaInfo.isAutoConfig()) { |
| | | taskExecutor.execute(() -> { |
| | | mediaServerService.setZLMConfig(mediaInfo, false); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (param.getApp().equalsIgnoreCase("rtp")) { |