| | |
| | | import com.ard.common.core.page.TableDataInfo; |
| | | import com.ard.vtdu.domain.ArdVtdu; |
| | | import com.ard.vtdu.domain.Conf; |
| | | import com.ard.vtdu.service.IMediaMTXService; |
| | | import com.ard.vtdu.service.IArdMediaService; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | |
| | |
| | | public class MediaMTXController extends BaseController { |
| | | |
| | | @Resource |
| | | private IMediaMTXService mediaService; |
| | | private IArdMediaService mediaService; |
| | | |
| | | /** |
| | | * 增加通道 |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation("增加通道") |
| | | @ApiOperationSupport(includeParameters = {"ardVtdu.name", "ardVtdu.rtspSource", "ardVtdu.mode", "ardVtdu.isCode", "ardVtdu.isRecord"}, order = 1) |
| | | @ApiOperationSupport(includeParameters = {"ardVtdu.name", "ardVtdu.rtspSource"}, order = 1) |
| | | public AjaxResult addPath(@RequestBody ArdVtdu ardVtdu) { |
| | | if (StringUtils.isEmpty(ardVtdu.getName())) { |
| | | return AjaxResult.error("通道名称不能为空"); |
| | |
| | | * 修改通道 |
| | | */ |
| | | @ApiOperation("修改通道") |
| | | @ApiOperationSupport(includeParameters = {"ardVtdu.name", "ardVtdu.rtspSource", "ardVtdu.mode", "ardVtdu.isCode", "ardVtdu.isRecord"}, order = 2) |
| | | @ApiOperationSupport(includeParameters = {"ardVtdu.name", "ardVtdu.rtspSource"}, order = 2) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdVtdu ardVtdu) { |
| | | return AjaxResult.success(mediaService.editPath(ardVtdu)); |
| | |
| | | @GetMapping("/pushList") |
| | | @ApiOperation("获取推流列表") |
| | | @ApiOperationSupport(order = 6) |
| | | public TableDataInfo getPushStreamList(Integer pageNum, Integer pageSize) { |
| | | public TableDataInfo getPushStreamList(@RequestParam(value = "pageNum", required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize", required = false) Integer pageSize) { |
| | | TableDataInfo tableDataInfo = mediaService.getPushStreamList(pageNum, pageSize); |
| | | return tableDataInfo; |
| | | } |
| | |
| | | @GetMapping("/getPullWebrtcStreamList") |
| | | @ApiOperation("获取WebRtc拉流列表") |
| | | @ApiOperationSupport(order = 7) |
| | | public TableDataInfo getPullWebrtcStreamList(Integer pageNum, Integer pageSize) { |
| | | public TableDataInfo getPullWebrtcStreamList(@RequestParam(value = "pageNum", required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize", required = false) Integer pageSize) { |
| | | return mediaService.getPullWebrtcStreamList(pageNum, pageSize); |
| | | } |
| | | |
| | |
| | | @GetMapping("/getPullRtspStreamList") |
| | | @ApiOperation("获取rtsp拉流列表") |
| | | @ApiOperationSupport(order = 8) |
| | | public TableDataInfo getPullRtspStreamList(Integer pageNum, Integer pageSize) { |
| | | public TableDataInfo getPullRtspStreamList(@RequestParam(value = "pageNum", required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize", required = false) Integer pageSize) { |
| | | return mediaService.getPullRtspStreamList(pageNum, pageSize); |
| | | |
| | | } |
| | |
| | | @GetMapping("/getPullRtmpStreamList") |
| | | @ApiOperation("获取rtmp拉流列表") |
| | | @ApiOperationSupport(order = 9) |
| | | public TableDataInfo getPullRtmpStreamList(Integer pageNum, Integer pageSize) { |
| | | public TableDataInfo getPullRtmpStreamList(@RequestParam(value = "pageNum", required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize", required = false) Integer pageSize) { |
| | | return mediaService.getPullRtmpStreamList(pageNum, pageSize); |
| | | } |
| | | |