| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: |
| | | * @Description: 流媒体业务 |
| | | * @ClassName: controller |
| | | * @Author: 刘苏义 |
| | | * @Date: 2023年07月13日9:26 |
| | |
| | | @PreAuthorize("@ss.hasPermi('media:stream:edit')") |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody StreamInfo streamInfo) { |
| | | mediaService.removePath(new String[]{streamInfo.getName()}); |
| | | vtduService.deleteVtduByName(streamInfo.getName()); |
| | | Map<String, String> map = mediaService.addPath(streamInfo.getName(), streamInfo.getRtspSource(), streamInfo.getMode(), streamInfo.getIsCode()); |
| | | Map<String, String> map = mediaService.editPath(streamInfo.getName(), streamInfo.getRtspSource(), streamInfo.getMode(), streamInfo.getIsCode()); |
| | | Vtdu vtdu = new Vtdu(); |
| | | vtdu.setName(streamInfo.getName()); |
| | | vtdu.setSourceUrl(streamInfo.getRtspSource()); |
| | |
| | | vtdu.setRtspUrl(map.get("rtspUrl")); |
| | | vtdu.setRtmpUrl(map.get("rtmpUrl")); |
| | | vtdu.setWebrtcUrl(map.get("webrtcUrl")); |
| | | vtduService.updateVtdu(vtdu); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |