|
@@ -1152,45 +1152,45 @@ public class GeoHazardMonitorTokenController {
|
|
|
ArrayList<String> list3 = new ArrayList<>();
|
|
|
//添加缓存
|
|
|
for (BaseCameraManagement baseCameraManagement : list1) {
|
|
|
- String code = baseCameraManagement.getCameraCode() + "/" + baseCameraManagement.getChannel();
|
|
|
+ String code = baseCameraManagement.getCameraCode() + "/" + baseCameraManagement.getChannel()+"/h264_720";
|
|
|
list3.add(code);
|
|
|
}
|
|
|
log.info("--------------heartbeat--------------:" + list3);
|
|
|
redisCache.setCacheObject("heartbeat", list3);
|
|
|
- //获取缓冲
|
|
|
- List<String> heartbeat = redisCache.getCacheObject("heartbeat");
|
|
|
- log.info("--------------heartbeat111--------------:" + heartbeat);
|
|
|
- List<String> cameraPlayList = redisCache.getCacheObject("cameraPlay");
|
|
|
- log.info("--------------cameraPlayList--------------:" + cameraPlayList);
|
|
|
- if (!ObjectUtils.isEmpty(heartbeat)) {
|
|
|
- if (!ObjectUtils.isEmpty(cameraPlayList)) {
|
|
|
- heartbeat.addAll(cameraPlayList);
|
|
|
- }
|
|
|
- log.info("--------------heartbeat222--------------:" + heartbeat);
|
|
|
- List<String> rtspApiList = cameraUtil.rtspApiList();
|
|
|
- log.info("--------------rtspApiList1111--------------:" + rtspApiList);
|
|
|
- if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
- rtspApiList.removeAll(heartbeat);
|
|
|
- }
|
|
|
- log.info("--------------rtspApiList2222--------------:" + rtspApiList);
|
|
|
- if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
- for (String str : rtspApiList) {
|
|
|
- log.info("--------------str--------------:" + str);
|
|
|
- String[] parts = str.split("/");
|
|
|
- log.info("--------------parts--------------:" + parts);
|
|
|
- if (parts.length == 2) {
|
|
|
- CompletableFuture.runAsync(() -> {
|
|
|
- try {
|
|
|
- TimeUnit.SECONDS.sleep(3);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- cameraUtil.stopStream(parts[0], parts[1]);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// //获取缓冲
|
|
|
+// List<String> heartbeat = redisCache.getCacheObject("heartbeat");
|
|
|
+// log.info("--------------heartbeat111--------------:" + heartbeat);
|
|
|
+// List<String> cameraPlayList = redisCache.getCacheObject("cameraPlay");
|
|
|
+// log.info("--------------cameraPlayList--------------:" + cameraPlayList);
|
|
|
+// if (!ObjectUtils.isEmpty(heartbeat)) {
|
|
|
+// if (!ObjectUtils.isEmpty(cameraPlayList)) {
|
|
|
+// heartbeat.addAll(cameraPlayList);
|
|
|
+// }
|
|
|
+// log.info("--------------heartbeat222--------------:" + heartbeat);
|
|
|
+// List<String> rtspApiList = cameraUtil.rtspApiList();
|
|
|
+// log.info("--------------rtspApiList1111--------------:" + rtspApiList);
|
|
|
+// if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
+// rtspApiList.removeAll(heartbeat);
|
|
|
+// }
|
|
|
+// log.info("--------------rtspApiList2222--------------:" + rtspApiList);
|
|
|
+// if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
+// for (String str : rtspApiList) {
|
|
|
+// log.info("--------------str--------------:" + str);
|
|
|
+// String[] parts = str.split("/");
|
|
|
+// log.info("--------------parts--------------:" + parts);
|
|
|
+// if (parts.length == 2) {
|
|
|
+// CompletableFuture.runAsync(() -> {
|
|
|
+// try {
|
|
|
+// TimeUnit.SECONDS.sleep(3);
|
|
|
+// } catch (InterruptedException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// cameraUtil.stopStream(parts[0], parts[1]);
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
// List<String> finalCodeList2 = codeList;
|
|
|
// CompletableFuture.runAsync(() -> {
|
|
|
// log.info("-------------->>finalCodeList2-------" + finalCodeList2);
|
|
@@ -1218,45 +1218,45 @@ public class GeoHazardMonitorTokenController {
|
|
|
ArrayList<String> list3 = new ArrayList<>();
|
|
|
//添加缓存
|
|
|
for (BaseCameraManagement baseCameraManagement : list1) {
|
|
|
- String code = baseCameraManagement.getCameraCode() + "/" + baseCameraManagement.getChannel();
|
|
|
+ String code = baseCameraManagement.getCameraCode() + "/" + baseCameraManagement.getChannel()+"/h264_720";
|
|
|
list3.add(code);
|
|
|
}
|
|
|
log.info("--------------heartbeat--------------:" + list3);
|
|
|
redisCache.setCacheObject("heartbeat", list3);
|
|
|
- //获取缓冲
|
|
|
- List<String> heartbeat = redisCache.getCacheObject("heartbeat");
|
|
|
- log.info("--------------heartbeat111--------------:" + heartbeat);
|
|
|
- List<String> cameraPlayList = redisCache.getCacheObject("cameraPlay");
|
|
|
- log.info("--------------cameraPlayList--------------:" + cameraPlayList);
|
|
|
- if (!ObjectUtils.isEmpty(heartbeat)) {
|
|
|
- if (!ObjectUtils.isEmpty(cameraPlayList)) {
|
|
|
- heartbeat.addAll(cameraPlayList);
|
|
|
- }
|
|
|
- log.info("--------------heartbeat222--------------:" + heartbeat);
|
|
|
- List<String> rtspApiList = cameraUtil.rtspApiList();
|
|
|
- log.info("--------------rtspApiList1111--------------:" + rtspApiList);
|
|
|
- if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
- rtspApiList.removeAll(heartbeat);
|
|
|
- }
|
|
|
- log.info("--------------rtspApiList2222--------------:" + rtspApiList);
|
|
|
- if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
- for (String str : rtspApiList) {
|
|
|
- log.info("--------------str--------------:" + str);
|
|
|
- String[] parts = str.split("/");
|
|
|
- log.info("--------------parts--------------:" + parts);
|
|
|
- if (parts.length == 2) {
|
|
|
- CompletableFuture.runAsync(() -> {
|
|
|
- try {
|
|
|
- TimeUnit.SECONDS.sleep(3);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- cameraUtil.stopStream(parts[0], parts[1]);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// //获取缓冲
|
|
|
+// List<String> heartbeat = redisCache.getCacheObject("heartbeat");
|
|
|
+// log.info("--------------heartbeat111--------------:" + heartbeat);
|
|
|
+// List<String> cameraPlayList = redisCache.getCacheObject("cameraPlay");
|
|
|
+// log.info("--------------cameraPlayList--------------:" + cameraPlayList);
|
|
|
+// if (!ObjectUtils.isEmpty(heartbeat)) {
|
|
|
+// if (!ObjectUtils.isEmpty(cameraPlayList)) {
|
|
|
+// heartbeat.addAll(cameraPlayList);
|
|
|
+// }
|
|
|
+// log.info("--------------heartbeat222--------------:" + heartbeat);
|
|
|
+// List<String> rtspApiList = cameraUtil.rtspApiList();
|
|
|
+// log.info("--------------rtspApiList1111--------------:" + rtspApiList);
|
|
|
+// if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
+// rtspApiList.removeAll(heartbeat);
|
|
|
+// }
|
|
|
+// log.info("--------------rtspApiList2222--------------:" + rtspApiList);
|
|
|
+// if (!ObjectUtils.isEmpty(rtspApiList)) {
|
|
|
+// for (String str : rtspApiList) {
|
|
|
+// log.info("--------------str--------------:" + str);
|
|
|
+// String[] parts = str.split("/");
|
|
|
+// log.info("--------------parts--------------:" + parts);
|
|
|
+// if (parts.length == 2) {
|
|
|
+// CompletableFuture.runAsync(() -> {
|
|
|
+// try {
|
|
|
+// TimeUnit.SECONDS.sleep(3);
|
|
|
+// } catch (InterruptedException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// cameraUtil.stopStream(parts[0], parts[1]);
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
twoMap.put("currentStream", playFlv);
|
|
|
twoMap.put("cameraCode", list1.get(0).getCameraCode());
|