| | |
| | | |
| | | import com.genersoft.iot.vmp.conf.DynamicTask; |
| | | import com.genersoft.iot.vmp.conf.exception.ControllerException; |
| | | import com.genersoft.iot.vmp.service.bean.MediaServerLoad; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | @Autowired |
| | | private DynamicTask dynamicTask; |
| | | |
| | | @Autowired |
| | | private IRedisCatchStorage redisCatchStorage; |
| | | |
| | | /** |
| | | * 初始化 |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public MediaServerLoad getLoad(MediaServerItem mediaServerItem) { |
| | | MediaServerLoad result = new MediaServerLoad(); |
| | | result.setId(mediaServerItem.getId()); |
| | | result.setPush(redisCatchStorage.getPushStreamCount(mediaServerItem.getId())); |
| | | result.setProxy(redisCatchStorage.getProxyStreamCount(mediaServerItem.getId())); |
| | | result.setGbReceive(redisCatchStorage.getGbReceiveCount(mediaServerItem.getId())); |
| | | result.setGbSend(redisCatchStorage.getGbSendCount(mediaServerItem.getId())); |
| | | return result; |
| | | } |
| | | } |