| | |
| | | import com.dtflys.forest.exceptions.ForestNetworkException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.media.domain.*; |
| | | import com.ruoyi.media.service.IMediaService; |
| | | import com.ruoyi.media.service.IMediaV2Service; |
| | | import com.ruoyi.utils.forest.MediaClient; |
| | | import com.ruoyi.utils.tools.ArdTool; |
| | |
| | | conf.setSourceProtocol("tcp"); |
| | | |
| | | List<String> nameList = new ArrayList<>(); |
| | | String paths = mediaClient.paths(); |
| | | JsonsRoot jsonsRoot = JSONObject.parseObject(paths, JsonsRoot.class); |
| | | List<Items> items = jsonsRoot.getItems(); |
| | | Paths paths = mediaClient.paths(); |
| | | List<Items> items = paths.getItems(); |
| | | for (Items item : items) { |
| | | nameList.add(item.getName()); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<StreamInfo> paths() { |
| | | String list = mediaClient.paths(); |
| | | JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class); |
| | | List<Items> items = jsonsRoot.getItems(); |
| | | Paths paths = mediaClient.paths(); |
| | | List<Items> items = paths.getItems(); |
| | | List<StreamInfo> pathInfoList = new ArrayList<>(); |
| | | for (Items item : items) { |
| | | StreamInfo info = new StreamInfo(); |
| | |
| | | @Override |
| | | public List<StreamInfo> getPushStreamList() { |
| | | List<StreamInfo> PushStreamInfoList = new ArrayList<>(); |
| | | String list = mediaClient.paths(); |
| | | JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class); |
| | | List<Items> items = jsonsRoot.getItems(); |
| | | Paths paths = mediaClient.paths(); |
| | | List<Items> items = paths.getItems(); |
| | | for (Items item : items) { |
| | | StreamInfo info = new StreamInfo(); |
| | | //ID |
| | |
| | | @Override |
| | | public List<StreamInfo> getPullStreamList() { |
| | | List<StreamInfo> PullStreamInfoList = new ArrayList<>(); |
| | | String list = mediaClient.paths(); |
| | | JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class); |
| | | List<Items> items = jsonsRoot.getItems(); |
| | | Paths paths = mediaClient.paths(); |
| | | List<Items> items = paths.getItems(); |
| | | for (Items item : items) { |
| | | List<Readers> readers = item.getReaders(); |
| | | for (Readers reader : readers) { |
| | |
| | | public List<String> getNameList() { |
| | | List<String> nameList = new ArrayList<>(); |
| | | try { |
| | | String paths = mediaClient.paths(); |
| | | JsonsRoot jsonsRoot = JSONObject.parseObject(paths, JsonsRoot.class); |
| | | List<Items> items = jsonsRoot.getItems(); |
| | | Paths paths = mediaClient.paths(); |
| | | List<Items> items = paths.getItems(); |
| | | for (Items item : items) { |
| | | nameList.add(item.getName()); |
| | | } |