| | |
| | | |
| | | import com.hbbh.adapter.controller.api.MonibucaAPI; |
| | | import com.hbbh.adapter.manager.MonibucaManager; |
| | | import com.hbbh.adapter.vo.CallResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @CrossOrigin(origins = "*", maxAge = 3600) |
| | | @Api |
| | |
| | | MonibucaManager monibucaManager; |
| | | |
| | | @Override |
| | | @RequestMapping(value = "/test/video", method = RequestMethod.GET) |
| | | @ApiOperation("parse") |
| | | public String parseVideoRTSP() { |
| | | try { |
| | | String result = monibucaManager.parseVideo(); |
| | |
| | | } catch (Exception e) { |
| | | log.error("接口:com.hbbh.adapter.controller.api.MonibucaAPIController.parseVideoRTSP 调用失败"); |
| | | e.printStackTrace(); |
| | | return "-1"; |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @RequestMapping(value = "/video/stop", method = RequestMethod.GET) |
| | | @ApiOperation("stop") |
| | | public void stopStream(@RequestParam("param")String param) { |
| | | try { |
| | | monibucaManager.stopStream(param); |
| | | } catch (Exception e) { |
| | | log.error("接口:com.hbbh.adapter.controller.api.MonibucaAPIController.parseVideoRTSP 调用失败"); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |