| | |
| | | import com.ruoyi.common.annotation.Anonymous;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | | import com.ruoyi.common.core.domain.BaseEntity;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.uuid.IdUtils;
|
| | | import com.ruoyi.media.domain.Config;
|
| | | import com.ruoyi.media.domain.Paths;
|
| | | import com.ruoyi.media.domain.StreamInfo;
|
| | | import com.ruoyi.media.domain.Vtdu;
|
| | | import com.ruoyi.media.service.IMediaService;
|
| | |
| | | @PreAuthorize("@ss.hasPermi('media:stream:remove')")
|
| | | @DeleteMapping("/{sessionId}")
|
| | | public AjaxResult removePullStreamSession(@PathVariable String sessionId) {
|
| | | List<StreamInfo> pullStreamList = mediaService.getPullStreamList();
|
| | | List<StreamInfo> pullStreamList = mediaService.getPullStreamList(1,1000);
|
| | | StreamInfo streamInfo = pullStreamList.stream()
|
| | | .filter(object -> object.getId().equals(sessionId))
|
| | | .collect(Collectors.toList()).get(0);
|
| | |
| | | @GetMapping("/path/list")
|
| | | @ApiOperation("获取当前通道列表")
|
| | | @ApiOperationSupport(order = 5)
|
| | | public TableDataInfo getPaths() {
|
| | | public TableDataInfo getPaths(Integer pageNum,Integer pageSize) {
|
| | | startPage();
|
| | | return getDataTable(mediaService.paths());
|
| | | return getDataTable(mediaService.paths(pageNum,pageSize));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @GetMapping("/getRtspSessionById")
|
| | | @ApiOperation("按ID查询拉流详情")
|
| | | public AjaxResult getRtspSessionById(String sessionId) {
|
| | | List<StreamInfo> pullStreamList = mediaService.getPullStreamList();
|
| | | List<StreamInfo> pullStreamList = mediaService.getPullStreamList(1,1000);
|
| | | StreamInfo streamInfo = pullStreamList.stream()
|
| | | .filter(object -> object.getId().equals(sessionId))
|
| | | .collect(Collectors.toList()).get(0);
|
| | |
| | | @GetMapping("/pushList")
|
| | | @ApiOperation("获取推流列表")
|
| | | @ApiOperationSupport(order = 6)
|
| | | public TableDataInfo getPushStreamList() {
|
| | | public TableDataInfo getPushStreamList(Integer pageNum,Integer pageSize) {
|
| | | startPage();
|
| | | return getDataTable(mediaService.getPushStreamList());
|
| | | return getDataTable(mediaService.getPushStreamList(pageNum,pageSize));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @GetMapping("/pullList")
|
| | | @ApiOperation("获取拉流列表")
|
| | | @ApiOperationSupport(order = 7)
|
| | | public TableDataInfo getPullStreamList() {
|
| | | public TableDataInfo getPullStreamList(Integer pageNum,Integer pageSize) {
|
| | | startPage();
|
| | | return getDataTable(mediaService.getPullStreamList());
|
| | | return getDataTable(mediaService.getPullStreamList(pageNum,pageSize));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 配置流媒体参数
|
| | | */
|
| | | @PostMapping("/setConfig")
|
| | | @ApiOperation("配置流媒体参数")
|
| | | @ApiOperationSupport(order = 8)
|
| | | public AjaxResult setConfig(@RequestBody Config config) {
|
| | | return AjaxResult.success(mediaService.setConfig(config));
|
| | | }
|
| | | }
|