|
@@ -1624,7 +1624,6 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
int count = 0;
|
|
|
boolean success = false;
|
|
|
JSONArray streamArray = null;
|
|
|
- List<BaseCameraManagementResponse> baseCameraManagementResponseList = new ArrayList<>();
|
|
|
while (!success && retryCount < maxRetries) {
|
|
|
try {
|
|
|
String data = HttpClientUtil.gets(url + "/api/summary");
|
|
@@ -1640,13 +1639,17 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
retryCount++;
|
|
|
}
|
|
|
}
|
|
|
- for (int i = 0; i < streamArray.size(); i++) {
|
|
|
- JSONObject subObj = streamArray.getJSONObject(i);
|
|
|
- String PathValue = subObj.getString("Path");
|
|
|
- if (PathValue.contains("/h264_720")) {
|
|
|
- count++;
|
|
|
+ if (!ObjectUtils.isEmpty(streamArray)) {
|
|
|
+ for (int i = 0; i < streamArray.size(); i++) {
|
|
|
+ JSONObject subObj = streamArray.getJSONObject(i);
|
|
|
+ String PathValue = subObj.getString("Path");
|
|
|
+ if (PathValue.contains("/h264_720")) {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
}
|
|
|
+ return count;
|
|
|
+ }else {
|
|
|
+ return count;
|
|
|
}
|
|
|
- return count;
|
|
|
}
|
|
|
}
|