mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 14:07:50 +08:00
commit
c9ded07e31
@ -10,6 +10,8 @@ import lombok.Data;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频信息
|
* 视频信息
|
||||||
*/
|
*/
|
||||||
@ -82,6 +84,8 @@ public class MediaInfo {
|
|||||||
Long bytesSpeed = jsonObject.getLong("bytesSpeed");
|
Long bytesSpeed = jsonObject.getLong("bytesSpeed");
|
||||||
if (totalReaderCount != null) {
|
if (totalReaderCount != null) {
|
||||||
mediaInfo.setReaderCount(totalReaderCount);
|
mediaInfo.setReaderCount(totalReaderCount);
|
||||||
|
} else {
|
||||||
|
mediaInfo.setReaderCount(0);
|
||||||
}
|
}
|
||||||
if (online != null) {
|
if (online != null) {
|
||||||
mediaInfo.setOnline(online);
|
mediaInfo.setOnline(online);
|
||||||
@ -106,7 +110,7 @@ public class MediaInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSONArray jsonArray = jsonObject.getJSONArray("tracks");
|
JSONArray jsonArray = jsonObject.getJSONArray("tracks");
|
||||||
if (!jsonArray.isEmpty()) {
|
if (!ObjectUtils.isEmpty(jsonArray)) {
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
JSONObject trackJson = jsonArray.getJSONObject(i);
|
JSONObject trackJson = jsonArray.getJSONObject(i);
|
||||||
Integer channels = trackJson.getInteger("channels");
|
Integer channels = trackJson.getInteger("channels");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user