|
@@ -388,17 +388,17 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
}
|
|
}
|
|
|
|
|
|
public String heartbeatgetUrl(String cameraCode, String channel, boolean type) throws Exception {
|
|
public String heartbeatgetUrl(String cameraCode, String channel, boolean type) throws Exception {
|
|
- CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> {
|
|
|
|
- CamerasVo camerasVo = new CamerasVo();
|
|
|
|
- camerasVo.setCameraIndexCode(cameraCode);
|
|
|
|
- String s = previewURLs(camerasVo, channel);
|
|
|
|
- if (s.contains("无视频")) {
|
|
|
|
- return s;
|
|
|
|
- } else {
|
|
|
|
- return getPlayFlvRtsp(cameraCode, channel, type);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return future.get();
|
|
|
|
|
|
+ CamerasVo camerasVo = new CamerasVo();
|
|
|
|
+ camerasVo.setCameraIndexCode(cameraCode);
|
|
|
|
+ String s = previewURLs(camerasVo, channel);
|
|
|
|
+ log.info("-------heartbeatgetUrl---------" + s);
|
|
|
|
+ if (s.contains("无视频")) {
|
|
|
|
+ log.info("-------无视频---------");
|
|
|
|
+ return s;
|
|
|
|
+ } else {
|
|
|
|
+ log.info("-------getPlayFlvRtsp---------" + getPlayFlvRtsp(cameraCode, channel, type));
|
|
|
|
+ return getPlayFlvRtsp(cameraCode, channel, type);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public String heartbeatgetUrls(String cameraCode, String channel, boolean type) throws Exception {
|
|
public String heartbeatgetUrls(String cameraCode, String channel, boolean type) throws Exception {
|
|
@@ -1187,7 +1187,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
} else {
|
|
} else {
|
|
return "天网无视频-" + camerasVo.getCameraIndexCode();
|
|
return "天网无视频-" + camerasVo.getCameraIndexCode();
|
|
}
|
|
}
|
|
- return null;
|
|
|
|
|
|
+ return "正常输出";
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1428,23 +1428,23 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
* @param baseCameraManagement
|
|
* @param baseCameraManagement
|
|
*/
|
|
*/
|
|
public String getQueryRecords(String streamPath, String date) {
|
|
public String getQueryRecords(String streamPath, String date) {
|
|
- log.info("-----getQueryRecords------streamPath-----"+streamPath);
|
|
|
|
- log.info("-----getQueryRecords-------date----"+date);
|
|
|
|
|
|
+ log.info("-----getQueryRecords------streamPath-----" + streamPath);
|
|
|
|
+ log.info("-----getQueryRecords-------date----" + date);
|
|
String param = "{\n" +
|
|
String param = "{\n" +
|
|
" \"streamPath\":\"" + streamPath + "\",\n" +
|
|
" \"streamPath\":\"" + streamPath + "\",\n" +
|
|
" \"date\":\"" + date + "\"\n" +
|
|
" \"date\":\"" + date + "\"\n" +
|
|
"}";
|
|
"}";
|
|
|
|
|
|
String jsonStr = HttpUtils.sendPost("http://10.48.36.47:9080" + "/recordpro/api/query/records", param);
|
|
String jsonStr = HttpUtils.sendPost("http://10.48.36.47:9080" + "/recordpro/api/query/records", param);
|
|
- log.info("-----getQueryRecords-------jsonStr----"+jsonStr);
|
|
|
|
|
|
+ log.info("-----getQueryRecords-------jsonStr----" + jsonStr);
|
|
JSONObject jsonObj = JSON.parseObject(jsonStr);
|
|
JSONObject jsonObj = JSON.parseObject(jsonStr);
|
|
- log.info("-----getQueryRecords-------jsonObj----"+jsonObj);
|
|
|
|
|
|
+ log.info("-----getQueryRecords-------jsonObj----" + jsonObj);
|
|
JSONArray resultArray = jsonObj.getJSONArray("result");
|
|
JSONArray resultArray = jsonObj.getJSONArray("result");
|
|
- log.info("-----getQueryRecords-------resultArray----"+resultArray);
|
|
|
|
|
|
+ log.info("-----getQueryRecords-------resultArray----" + resultArray);
|
|
JSONObject resultObj = resultArray.getJSONObject(0);
|
|
JSONObject resultObj = resultArray.getJSONObject(0);
|
|
- log.info("-----getQueryRecords-------resultObj----"+resultObj);
|
|
|
|
|
|
+ log.info("-----getQueryRecords-------resultObj----" + resultObj);
|
|
String path = resultObj.getString("Path");
|
|
String path = resultObj.getString("Path");
|
|
- log.info("-----getQueryRecords-------path----"+path);
|
|
|
|
- return caneraConfig.getRecordUrl()+Constants.RESOURCE_PREFIX+path;
|
|
|
|
|
|
+ log.info("-----getQueryRecords-------path----" + path);
|
|
|
|
+ return caneraConfig.getRecordUrl() + Constants.RESOURCE_PREFIX + path;
|
|
}
|
|
}
|
|
}
|
|
}
|