| | |
| | | @PostMapping("/add") |
| | | @ApiOperation("增加转码") |
| | | public AjaxResult addPath(@RequestBody MediaInfo mediaInfo) { |
| | | String rtsp = mediaService.addPath(mediaInfo.getName(), mediaInfo.getRtspPath()); |
| | | String rtsp = mediaService.addPath(mediaInfo.getCameraId(), mediaInfo.getRtspPath()); |
| | | return AjaxResult.success(rtsp); |
| | | } |
| | | @PostMapping("/remove") |
| | | @ApiOperation("移除转码") |
| | | @ApiOperationSupport(includeParameters={"mediaInfo.name"}) |
| | | @ApiOperationSupport(includeParameters={"mediaInfo.cameraId"}) |
| | | public AjaxResult removePath(@RequestBody MediaInfo mediaInfo) { |
| | | mediaService.removePath(mediaInfo.getName()); |
| | | mediaService.removePath(mediaInfo.getCameraId()); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getList") |
| | | @GetMapping("/getPaths") |
| | | @ApiOperation("获取当前转码列表") |
| | | public AjaxResult getList() { |
| | | return AjaxResult.success(mediaService.list()); |
| | | public AjaxResult getPaths() { |
| | | return AjaxResult.success(mediaService.paths()); |
| | | } |
| | | @GetMapping("/getRtspSessions") |
| | | @ApiOperation("获取rtsp会话列表") |
| | | public AjaxResult getRtspSessions() { |
| | | return AjaxResult.success(mediaService.rtspsessions()); |
| | | } |
| | | @GetMapping("/getRtspConns") |
| | | @ApiOperation("获取rtsp连接列表") |
| | | public AjaxResult getRtspConns() { |
| | | return AjaxResult.success(mediaService.rtspconns()); |
| | | } |
| | | } |