| | |
| | | package com.genersoft.iot.vmp.vmanager.server; |
| | | |
| | | import com.genersoft.iot.vmp.VManageBootstrap; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| | | import com.genersoft.iot.vmp.service.IMediaServerService; |
| | | import com.genersoft.iot.vmp.utils.SpringBeanFactory; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | import gov.nist.javax.sip.SipStackImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import javax.sip.ObjectInUseException; |
| | | import javax.sip.SipProvider; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Api(tags = "服务控制") |
| | | @CrossOrigin |
| | | @RestController |
| | |
| | | @Autowired |
| | | private ConfigurableApplicationContext context; |
| | | |
| | | @Autowired |
| | | private IMediaServerService mediaServerService; |
| | | |
| | | |
| | | @ApiOperation("流媒体服务列表") |
| | | @GetMapping(value = "/media_server/list") |
| | | @ResponseBody |
| | | public WVPResult<List<MediaServerItem>> getMediaServerList(){ |
| | | WVPResult<List<MediaServerItem>> result = new WVPResult<>(); |
| | | result.setCode(0); |
| | | result.setMsg("success"); |
| | | result.setData(mediaServerService.getAll()); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation("在线流媒体服务列表") |
| | | @GetMapping(value = "/media_server/online/list") |
| | | @ResponseBody |
| | | public WVPResult<List<MediaServerItem>> getOnlineMediaServerList(){ |
| | | WVPResult<List<MediaServerItem>> result = new WVPResult<>(); |
| | | result.setCode(0); |
| | | result.setMsg("success"); |
| | | result.setData(mediaServerService.getAllOnline()); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation("获取流媒体服务") |
| | | @GetMapping(value = "/media_server/one/{id}") |
| | | @ResponseBody |
| | | public WVPResult<MediaServerItem> getMediaServer(@PathVariable String id){ |
| | | WVPResult<MediaServerItem> result = new WVPResult<>(); |
| | | result.setCode(0); |
| | | result.setMsg("success"); |
| | | result.setData(mediaServerService.getOne(id)); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation("重启服务") |
| | | @GetMapping(value = "/restart") |