19个文件已修改
17 文件已重命名
1个文件已删除
| | |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("全部") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | @Bean |
| | | public Docket createRestGBApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("国标") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager.gb28181")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | @Bean |
| | | public Docket createRestStreamProxyApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("拉流转发") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager.streamProxy")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | @Bean |
| | | public Docket createRestStreamPushApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("推流管理") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager.streamPush")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | |
| | | |
| | | @Bean |
| | | public Docket createServerApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("服务管理") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager.server")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | @Bean |
| | | public Docket createUserApi() { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .groupName("用户管理") |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.genersoft.iot.vmp.vmanager.user")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .pathMapping("/"); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory;
|
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
|
| | | import com.genersoft.iot.vmp.vmanager.play.bean.PlayResult;
|
| | | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult;
|
| | | import com.genersoft.iot.vmp.service.IPlayService;
|
| | | import gov.nist.javax.sip.address.AddressImpl;
|
| | | import gov.nist.javax.sip.address.SipUri;
|
| | |
| | | import com.genersoft.iot.vmp.utils.GpsUtil;
|
| | | import com.genersoft.iot.vmp.utils.SpringBeanFactory;
|
| | | import com.genersoft.iot.vmp.utils.redis.RedisUtil;
|
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce;
|
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
| | |
|
| | | import gov.nist.javax.sip.SipStackImpl;
|
| | | import gov.nist.javax.sip.address.AddressImpl;
|
| | |
| | | String streamId = json.getString("stream");
|
| | | String schema = json.getString("schema");
|
| | | JSONArray tracks = json.getJSONArray("tracks");
|
| | | String regist = json.getString("regist");
|
| | | boolean regist = json.getBoolean("regist");
|
| | | if (tracks != null) {
|
| | | System.out.println("222222" + schema);
|
| | | }
|
| | | if ("rtmp".equals(schema)){
|
| | |
|
| | | if ("rtp".equals(app) && regist != null ) {
|
| | | if ("rtp".equals(app) && !regist ) {
|
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId);
|
| | | if (streamInfo!=null){
|
| | | redisCatchStorage.stopPlay(streamInfo);
|
| | |
| | | }
|
| | | }else {
|
| | | if (!"rtp".equals(app) ){
|
| | | if (regist == null) {
|
| | | if (regist) {
|
| | | zlmMediaListManager.addMedia(app, streamId);
|
| | | }else {
|
| | | zlmMediaListManager.removeMedia(app, streamId);
|
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe; |
| | | import com.genersoft.iot.vmp.vmanager.play.bean.PlayResult; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult; |
| | | |
| | | /** |
| | | * 点播处理 |
| | |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.vmanager.play.bean.PlayResult; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult; |
| | | import com.genersoft.iot.vmp.service.IMediaService; |
| | | import com.genersoft.iot.vmp.service.IPlayService; |
| | | import org.slf4j.Logger; |
| | |
| | | import com.genersoft.iot.vmp.gb28181.bean.*;
|
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
|
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce;
|
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
| | | import com.github.pagehelper.PageInfo;
|
| | |
|
| | | /**
|
| | |
| | | package com.genersoft.iot.vmp.storager.dao; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.dao.*; |
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/MobilePosition/MobilePositionController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.MobilePosition; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.MobilePosition; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询历史轨迹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", required = true), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/history/{deviceId}") |
| | | public ResponseEntity<List<MobilePosition>> positions(@PathVariable String deviceId, |
| | |
| | | */ |
| | | @ApiOperation("查询设备最新位置") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/latest/{deviceId}") |
| | | public ResponseEntity<MobilePosition> latestPosition(@PathVariable String deviceId) { |
| | |
| | | */ |
| | | @ApiOperation("获取移动位置信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/realtime/{deviceId}") |
| | | public DeferredResult<ResponseEntity<MobilePosition>> realTimePosition(@PathVariable String deviceId) { |
| | |
| | | */ |
| | | @ApiOperation("订阅位置信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "expires", value = "订阅超时时间"), |
| | | @ApiImplicitParam(name = "interval", value = "上报时间间隔"), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "expires", value = "订阅超时时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "interval", value = "上报时间间隔", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/subscribe/{deviceId}") |
| | | public ResponseEntity<String> positionSubscribe(@PathVariable String deviceId, |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/SseController/SseController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.SseController; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.SseController; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEventListener; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | |
| | | * @author: lawrencehj |
| | | * @data: 2021-01-20 |
| | | */ |
| | | |
| | | @Api(tags = "SSE推送") |
| | | @CrossOrigin |
| | | @Controller |
| | | @RequestMapping("/api") |
| | |
| | | @Autowired |
| | | AlarmEventListener alarmEventListener; |
| | | |
| | | //设置响应 |
| | | @ApiOperation("设置响应") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "browserId", value = "浏览器ID", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping("/emit") |
| | | public SseEmitter emit(@RequestParam String browserId) { |
| | | final SseEmitter sseEmitter = new SseEmitter(0L); |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/device/DeviceConfig.java |
| | |
| | | * @date 2021年2月2日 |
| | | */ |
| | | |
| | | package com.genersoft.iot.vmp.vmanager.device; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.device; |
| | | |
| | | import javax.sip.message.Response; |
| | | |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.async.DeferredResult; |
| | |
| | | @ApiOperation("看守位控制命令") |
| | | @GetMapping("/basicParam/{deviceId}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID" ), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID" ), |
| | | @ApiImplicitParam(name = "name", value ="名称" ), |
| | | @ApiImplicitParam(name = "expiration", value ="到期时间" ), |
| | | @ApiImplicitParam(name = "heartBeatInterval", value ="心跳间隔" ), |
| | | @ApiImplicitParam(name = "heartBeatCount", value ="心跳计数" ), |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID",dataTypeClass = String.class ), |
| | | @ApiImplicitParam(name = "name", value ="名称" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "expiration", value ="到期时间" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "heartBeatInterval", value ="心跳间隔" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "heartBeatCount", value ="心跳计数" ,dataTypeClass = String.class), |
| | | }) |
| | | public DeferredResult<ResponseEntity<String>> homePositionApi(@PathVariable String deviceId, |
| | | @RequestParam(required = false) String channelId, |
| | |
| | | */ |
| | | @ApiOperation("设备配置查询请求") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID" ), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID" ), |
| | | @ApiImplicitParam(name = "configType", value ="配置类型" ), |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "configType", value ="配置类型" ,dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/query/{deviceId}/{configType}") |
| | | public DeferredResult<ResponseEntity<String>> configDownloadApi(@PathVariable String deviceId, |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/device/DeviceControl.java |
| | |
| | | * @date 2021年2月1日 |
| | | */ |
| | | |
| | | package com.genersoft.iot.vmp.vmanager.device; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.device; |
| | | |
| | | import javax.sip.message.Response; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("远程启动控制命令") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/teleboot/{deviceId}") |
| | | public ResponseEntity<String> teleBootApi(@PathVariable String deviceId) { |
| | |
| | | */ |
| | | @ApiOperation("录像控制命令") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID", required = true), |
| | | @ApiImplicitParam(name = "channelId", value ="通道编码"), |
| | | @ApiImplicitParam(name = "deviceId", value ="设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value ="通道编码" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "recordCmdStr", value ="命令, 可选值:Record(手动录像),StopRecord(停止手动录像)", |
| | | required = true), |
| | | required = true ,dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/record/{deviceId}/{recordCmdStr}") |
| | | public DeferredResult<ResponseEntity<String>> recordApi(@PathVariable String deviceId, |
| | |
| | | */ |
| | | @ApiOperation("录像控制命令") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "guardCmdStr", value ="命令, 可选值:SetGuard(布防),ResetGuard(撤防)", required = true) |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "guardCmdStr", value ="命令, 可选值:SetGuard(布防),ResetGuard(撤防)", required = true, |
| | | dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/guard/{deviceId}/{guardCmdStr}") |
| | | public DeferredResult<ResponseEntity<String>> guardApi(@PathVariable String deviceId, @PathVariable String guardCmdStr) { |
| | |
| | | */ |
| | | @ApiOperation("报警复位") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "alarmMethod", value ="报警方式"), |
| | | @ApiImplicitParam(name = "alarmType", value ="报警类型"), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "alarmMethod", value ="报警方式", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "alarmType", value ="报警类型", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/reset_alarm/{deviceId}") |
| | | public DeferredResult<ResponseEntity<String>> resetAlarmApi(@PathVariable String deviceId, |
| | |
| | | */ |
| | | @ApiOperation("强制关键帧") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/i_frame/{deviceId}") |
| | | public ResponseEntity<String> iFrame(@PathVariable String deviceId, |
| | |
| | | */ |
| | | @ApiOperation("看守位控制") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "enabled", value = "是否开启看守位 1:开启,0:关闭", required = true), |
| | | @ApiImplicitParam(name = "resetTime", value = "自动归位时间间隔"), |
| | | @ApiImplicitParam(name = "presetIndex", value = "调用预置位编号"), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID"), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "enabled", value = "是否开启看守位 1:开启,0:关闭", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "resetTime", value = "自动归位时间间隔", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "presetIndex", value = "调用预置位编号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value ="通道ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/home_position/{deviceId}/{enabled}") |
| | | public DeferredResult<ResponseEntity<String>> homePositionApi(@PathVariable String deviceId, |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/device/DeviceQuery.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.device; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.device; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | |
| | | |
| | | import javax.sip.message.Response; |
| | | |
| | | @Api(tags = "国标设备查询1", value = "国标设备查询") |
| | | @Api(tags = "国标设备查询", value = "国标设备查询") |
| | | @SuppressWarnings("rawtypes") |
| | | @CrossOrigin |
| | | @RestController |
| | |
| | | */ |
| | | @ApiOperation("使用ID查询国标设备") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/devices/{deviceId}") |
| | | public ResponseEntity<Device> devices(@PathVariable String deviceId){ |
| | |
| | | */ |
| | | @ApiOperation("分页查询国标设备") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", required = true), |
| | | @ApiImplicitParam(name = "count", value = "每页查询数量", required = true), |
| | | @ApiImplicitParam(name = "page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页查询数量", required = true, dataTypeClass = Integer.class), |
| | | }) |
| | | @GetMapping("/devices") |
| | | public PageInfo<Device> devices(int page, int count){ |
| | |
| | | @ApiOperation("分页查询通道") |
| | | @GetMapping("/devices/{deviceId}/channels") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true), |
| | | @ApiImplicitParam(name="query", value = "查询内容"), |
| | | @ApiImplicitParam(name="online", value = "是否在线"), |
| | | @ApiImplicitParam(name="channelType", value = "设备/子目录-> false/true"), |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true ,dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true ,dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容" ,dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线" ,dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="channelType", value = "设备/子目录-> false/true" ,dataTypeClass = Boolean.class), |
| | | }) |
| | | public ResponseEntity<PageInfo> channels(@PathVariable String deviceId, |
| | | int page, int count, |
| | |
| | | */ |
| | | @ApiOperation("同步设备通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true ,dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping("/devices/{deviceId}/sync") |
| | | public DeferredResult<ResponseEntity<Device>> devicesSync(@PathVariable String deviceId){ |
| | |
| | | */ |
| | | @ApiOperation("移除设备") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @DeleteMapping("/devices/{deviceId}/delete") |
| | | public ResponseEntity<String> delete(@PathVariable String deviceId){ |
| | |
| | | */ |
| | | @ApiOperation("分页查询子目录通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name="channelId", value = "通道id", required = true), |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true), |
| | | @ApiImplicitParam(name="count", value = "每页条数", required = true), |
| | | @ApiImplicitParam(name="query", value = "查询内容"), |
| | | @ApiImplicitParam(name="online", value = "是否在线"), |
| | | @ApiImplicitParam(name="channelType", value = "通道类型, 子目录"), |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="channelId", value = "通道id", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页条数", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="channelType", value = "通道类型, 子目录", dataTypeClass = Boolean.class), |
| | | }) |
| | | @GetMapping("/sub_channels/{deviceId}/{channelId}/channels") |
| | | public ResponseEntity<PageInfo> subChannels(@PathVariable String deviceId, |
| | |
| | | */ |
| | | @ApiOperation("更新通道信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name="channel", value = "通道", required = true), |
| | | @ApiImplicitParam(name="deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="channel", value = "通道", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping("/channel/update/{deviceId}") |
| | | public ResponseEntity<PageInfo> updateChannel(@PathVariable String deviceId,DeviceChannel channel){ |
| | |
| | | */ |
| | | @ApiOperation("修改数据流传输模式") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "streamMode", value = "数据流传输模式, 取值:" + |
| | | "UDP(udp传输),TCP-ACTIVE(tcp主动模式,暂不支持),TCP-PASSIVE(tcp被动模式)"), |
| | | }) |
| | |
| | | */ |
| | | @ApiOperation("设备状态查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/devices/{deviceId}/status") |
| | | public DeferredResult<ResponseEntity<String>> deviceStatusApi(@PathVariable String deviceId) { |
| | |
| | | */ |
| | | @ApiOperation("设备报警查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true), |
| | | @ApiImplicitParam(name = "startPriority", value = "报警起始级别"), |
| | | @ApiImplicitParam(name = "endPriority", value = "报警终止级别"), |
| | | @ApiImplicitParam(name = "alarmMethod", value = "报警方式条件"), |
| | | @ApiImplicitParam(name = "alarmType", value = "报警类型"), |
| | | @ApiImplicitParam(name = "startTime", value = "报警发生起始时间"), |
| | | @ApiImplicitParam(name = "endTime", value = "报警发生终止时间"), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备id", required = true, dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "startPriority", value = "报警起始级别", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "endPriority", value = "报警终止级别", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "alarmMethod", value = "报警方式条件", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "alarmType", value = "报警类型", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "startTime", value = "报警发生起始时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "endTime", value = "报警发生终止时间", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/alarm/{deviceId}") |
| | | public DeferredResult<ResponseEntity<String>> alarmApi(@PathVariable String deviceId, |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/gbStream/GbStreamController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.gbStream; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.gbStream; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.vmanager.gbStream.bean.GbStreamParam; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.gbStream.bean.GbStreamParam; |
| | | import com.genersoft.iot.vmp.service.IGbStreamService; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | */ |
| | | @ApiOperation("查询国标通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", required = true ), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", required = true ), |
| | | @ApiImplicitParam(name = "page", value = "当前页", required = true , dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", required = true , dataTypeClass = Integer.class), |
| | | }) |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | |
| | | */ |
| | | @ApiOperation("移除国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true ), |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true , |
| | | dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @DeleteMapping(value = "/del") |
| | | @ResponseBody |
| | |
| | | */ |
| | | @ApiOperation("保存国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true ), |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true , dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/gbStream/bean/GbStreamParam.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.gbStream.bean; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.gbStream.bean; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/media/MediaController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.media; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.media; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import com.genersoft.iot.vmp.gb28181.bean.PlatformGbStream; |
| | | import com.genersoft.iot.vmp.service.IStreamPushService; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.service.IMediaService; |
| | | import com.genersoft.iot.vmp.service.IStreamProxyService; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | */ |
| | | @ApiOperation("根据应用名和流id获取播放地址") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "app", value = "应用名"), |
| | | @ApiImplicitParam(name = "stream", value = "流id"), |
| | | @ApiImplicitParam(name = "app", value = "应用名", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "stream", value = "流id", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping(value = "/getStreamInfoByAppAndStream") |
| | | @ResponseBody |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.platform; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.platform; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.platform.bean.UpdateChannelParam; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.UpdateChannelParam; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 级联平台管理 |
| | | */ |
| | | @Api("级联平台管理") |
| | | @Api(tags = "级联平台管理") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api/platform") |
| | |
| | | @Autowired |
| | | private SipConfig sipConfig; |
| | | |
| | | /** |
| | | * 获取国标服务的配置 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取国标服务的配置") |
| | | @GetMapping("/server_config") |
| | | public ResponseEntity<JSONObject> serverConfig() { |
| | | JSONObject result = new JSONObject(); |
| | |
| | | return new ResponseEntity<>(result, HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询级联平台 |
| | | * @param page 当前页 |
| | | * @param count 每页条数 |
| | | * @return |
| | | */ |
| | | @ApiOperation("分页查询级联平台") |
| | | @GetMapping("/query/{count}/{page}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", dataTypeClass = Integer.class), |
| | | }) |
| | | public PageInfo<ParentPlatform> platforms(@PathVariable int page, @PathVariable int count){ |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | |
| | | return storager.queryParentPlatformList(page, count); |
| | | } |
| | | |
| | | /** |
| | | * 保存上级平台信息 |
| | | * @param parentPlatform |
| | | * @return |
| | | */ |
| | | @ApiOperation("保存上级平台信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "parentPlatform", value = "上级平台信息", dataTypeClass = ParentPlatform.class), |
| | | }) |
| | | @PostMapping("/save") |
| | | @ResponseBody |
| | | public ResponseEntity<String> savePlatform(@RequestBody ParentPlatform parentPlatform){ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除上级平台 |
| | | * @param serverGBId 上级平台国标ID |
| | | * @return |
| | | */ |
| | | @ApiOperation("删除上级平台") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "serverGBId", value = "上级平台国标ID", dataTypeClass = String.class), |
| | | }) |
| | | @DeleteMapping("/delete/{serverGBId}") |
| | | @ResponseBody |
| | | public ResponseEntity<String> deletePlatform(@PathVariable String serverGBId){ |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/exit/{deviceGbId}") |
| | | /** |
| | | * 查询上级平台是否存在 |
| | | * @param serverGBId 上级平台国标ID |
| | | * @return |
| | | */ |
| | | @ApiOperation("查询上级平台是否存在") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "serverGBId", value = "上级平台国标ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/exit/{serverGBId}") |
| | | @ResponseBody |
| | | public ResponseEntity<String> exitPlatform(@PathVariable String deviceGbId){ |
| | | public ResponseEntity<String> exitPlatform(@PathVariable String serverGBId){ |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug("查询上级平台是否存在API调用:" + deviceGbId); |
| | | logger.debug("查询上级平台是否存在API调用:" + serverGBId); |
| | | } |
| | | ParentPlatform parentPlatform = storager.queryParentPlatById(deviceGbId); |
| | | ParentPlatform parentPlatform = storager.queryParentPlatById(serverGBId); |
| | | return new ResponseEntity<>(String.valueOf(parentPlatform != null), HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询级联平台的所有所有通道 |
| | | * @param page 当前页 |
| | | * @param count 每页条数 |
| | | * @param platformId 上级平台ID |
| | | * @param query 查询内容 |
| | | * @param online 是否在线 |
| | | * @param choosed 是否已选中 |
| | | * @param channelType 通道类型 |
| | | * @return |
| | | */ |
| | | @ApiOperation("分页查询级联平台的所有所有通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "platformId", value = "上级平台ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "online", value = "是否在线", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name = "choosed", value = "是否已选中", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name = "channelType", value = "通道类型", dataTypeClass = Boolean.class), |
| | | }) |
| | | @GetMapping("/channel_list") |
| | | @ResponseBody |
| | | public PageInfo<ChannelReduce> channelList(int page, int count, |
| | |
| | | return channelReduces; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 向上级平台添加国标通道 |
| | | * @param param 通道关联参数 |
| | | * @return |
| | | */ |
| | | @ApiOperation("向上级平台添加国标通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "通道关联参数", dataTypeClass = UpdateChannelParam.class), |
| | | }) |
| | | @PostMapping("/update_channel_for_gb") |
| | | @ResponseBody |
| | | public ResponseEntity<String> updateChannelForGB(@RequestBody UpdateChannelParam param){ |
| | |
| | | return new ResponseEntity<>(String.valueOf(result > 0), HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 从上级平台移除国标通道 |
| | | * @param param 通道关联参数 |
| | | * @return |
| | | */ |
| | | @ApiOperation("从上级平台移除国标通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "通道关联参数", dataTypeClass = UpdateChannelParam.class), |
| | | }) |
| | | @DeleteMapping("/del_channel_for_gb") |
| | | @ResponseBody |
| | | public ResponseEntity<String> delChannelForGB(@RequestBody UpdateChannelParam param){ |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/platform/bean/ChannelReduce.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.platform.bean; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.platform.bean; |
| | | |
| | | /** |
| | | * 精简的channel信息展示,主要是选择通道的时候展示列表使用 |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/platform/bean/UpdateChannelParam.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.platform.bean; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.platform.bean; |
| | | |
| | | import java.util.List; |
| | | |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/platformGbStream/PlatformGbStreamController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.platformGbStream; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.platformGbStream; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.service.IGbStreamService; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | 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.*; |
| | | |
| | | @Api(tags = "级联平台关联视频流") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | @RequestMapping("/api/platform_gb_stream") |
| | | public class PlatformGbStreamController { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(PlatformGbStreamController.class); |
| | |
| | | @Autowired |
| | | private IVideoManagerStorager storager; |
| | | |
| | | @ApiOperation("分页查询级联平台关联的视频流") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", dataTypeClass = Integer.class), |
| | | }) |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<GbStream> list(@RequestParam(required = false)Integer page, |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.play; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.play; |
| | | |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | | import com.genersoft.iot.vmp.conf.MediaServerConfig; |
| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.vmanager.play.bean.PlayResult; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult; |
| | | import com.genersoft.iot.vmp.service.IMediaService; |
| | | import com.genersoft.iot.vmp.service.IPlayService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.sip.message.Response; |
| | | |
| | | @Api(tags = "国标设备点播") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api/play") |
| | |
| | | @Autowired |
| | | private IMediaService mediaService; |
| | | |
| | | @ApiOperation("开始点播") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/start/{deviceId}/{channelId}") |
| | | public DeferredResult<ResponseEntity<String>> play(@PathVariable String deviceId, |
| | | @PathVariable String channelId) { |
| | |
| | | return playResult.getResult(); |
| | | } |
| | | |
| | | @ApiOperation("停止点播") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "streamId", value = "视频流ID", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping("/stop/{streamId}") |
| | | public DeferredResult<ResponseEntity<String>> playStop(@PathVariable String streamId) { |
| | | |
| | |
| | | * @param streamId 流ID |
| | | * @return |
| | | */ |
| | | @ApiOperation("将不是h264的视频通过ffmpeg 转码为h264 + aac") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "streamId", value = "视频流ID", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping("/convert/{streamId}") |
| | | public ResponseEntity<String> playConvert(@PathVariable String streamId) { |
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId); |
| | |
| | | * @param key |
| | | * @return |
| | | */ |
| | | @ApiOperation("结束转码") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "key", value = "视频流key", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping("/convertStop/{key}") |
| | | public ResponseEntity<String> playConvertStop(@PathVariable String key) { |
| | | |
| | |
| | | return new ResponseEntity<String>( result.toJSONString(), HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 语音广播命令API接口 |
| | | * |
| | | * @param deviceId |
| | | */ |
| | | @ApiOperation("语音广播命令") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备Id", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/broadcast/{deviceId}") |
| | | @PostMapping("/broadcast/{deviceId}") |
| | | public DeferredResult<ResponseEntity<String>> broadcastApi(@PathVariable String deviceId) { |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/play/bean/PlayResult.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.play.bean; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.play.bean; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | | import org.springframework.http.ResponseEntity; |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.playback; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.playback; |
| | | |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| | |
| | | //import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.service.IPlayService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.sip.message.Response; |
| | | import java.util.UUID; |
| | | |
| | | @Api(tags = "视频回放") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api/playback") |
| | |
| | | @Autowired |
| | | private DeferredResultHolder resultHolder; |
| | | |
| | | @ApiOperation("开始视频回放") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "startTime", value = "开始时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "endTime", value = "结束时间", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/start/{deviceId}/{channelId}") |
| | | public DeferredResult<ResponseEntity<String>> play(@PathVariable String deviceId, @PathVariable String channelId, String startTime, |
| | | String endTime) { |
| | | public DeferredResult<ResponseEntity<String>> play(@PathVariable String deviceId, @PathVariable String channelId, |
| | | String startTime,String endTime) { |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug(String.format("设备回放 API调用,deviceId:%s ,channelId:%s", deviceId, channelId)); |
| | |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation("停止视频回放") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ssrc", value = "视频流标识", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping("/stop/{ssrc}") |
| | | public ResponseEntity<String> playStop(@PathVariable String ssrc) { |
| | | |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/ptz/PtzController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.ptz; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.ptz; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | |
| | | @Api(tags = "云台控制") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | @RequestMapping("/api/ptz") |
| | | public class PtzController { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(PtzController.class); |
| | |
| | | * @param zoomSpeed 缩放速度 |
| | | * @return String 控制结果 |
| | | */ |
| | | @PostMapping("/ptz/{deviceId}/{channelId}") |
| | | @ApiOperation("云台控制") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "cmdCode", value = "指令码", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "horizonSpeed", value = "水平速度", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "verticalSpeed", value = "垂直速度", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "zoomSpeed", value = "缩放速度", dataTypeClass = Integer.class), |
| | | }) |
| | | @PostMapping("/control/{deviceId}/{channelId}") |
| | | public ResponseEntity<String> ptz(@PathVariable String deviceId,@PathVariable String channelId,int cmdCode, int horizonSpeed, int verticalSpeed, int zoomSpeed){ |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | |
| | | return new ResponseEntity<String>("success",HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 通用前端控制命令API接口 |
| | | * |
| | | * @param deviceId |
| | | * @param channelId |
| | | * @param cmdCode |
| | | * @param parameter1 |
| | | * @param parameter2 |
| | | * @param combindCode2 |
| | | * @return |
| | | */ |
| | | @PostMapping("/frontEndCommand/{deviceId}/{channelId}") |
| | | @ApiOperation("通用前端控制命令") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "cmdCode", value = "指令码", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "parameter1", value = "数据一", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "parameter2", value = "数据二", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "combindCode2", value = "组合码二", dataTypeClass = Integer.class), |
| | | }) |
| | | @PostMapping("/front_end_command/{deviceId}/{channelId}") |
| | | public ResponseEntity<String> frontEndCommand(@PathVariable String deviceId,@PathVariable String channelId,int cmdCode, int parameter1, int parameter2, int combindCode2){ |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | |
| | | return new ResponseEntity<String>("success",HttpStatus.OK); |
| | | } |
| | | |
| | | /** |
| | | * 预置位查询命令API接口 |
| | | * |
| | | * @param deviceId |
| | | * @param channelId |
| | | * @return |
| | | */ |
| | | @GetMapping("/presetQuery/{deviceId}/{channelId}") |
| | | @ApiOperation("预置位查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/preset/query/{deviceId}/{channelId}") |
| | | public DeferredResult<ResponseEntity<String>> presetQueryApi(@PathVariable String deviceId, @PathVariable String channelId) { |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug("设备预置位查询API调用"); |
File was renamed from src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java |
| | |
| | | package com.genersoft.iot.vmp.vmanager.record; |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.record; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | |
| | | @Api(tags = "国标录像") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | @RequestMapping("/api/gb_record") |
| | | public class RecordController { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(RecordController.class); |
| | |
| | | @Autowired |
| | | private DeferredResultHolder resultHolder; |
| | | |
| | | @GetMapping("/record/{deviceId}/{channelId}") |
| | | @ApiOperation("录像查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "deviceId", value = "设备ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "channelId", value = "通道ID", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "startTime", value = "开始时间", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "endTime", value = "结束时间", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping("/query/{deviceId}/{channelId}") |
| | | public DeferredResult<ResponseEntity<RecordInfo>> recordinfo(@PathVariable String deviceId,@PathVariable String channelId, String startTime, String endTime){ |
| | | |
| | | if (logger.isDebugEnabled()) { |
| | |
| | | |
| | | import com.genersoft.iot.vmp.VManageBootstrap; |
| | | import com.genersoft.iot.vmp.utils.SpringBeanFactory; |
| | | import com.genersoft.iot.vmp.vmanager.gbStream.bean.GbStreamParam; |
| | | import gov.nist.javax.sip.SipStackImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.sip.SipProvider; |
| | | import java.util.Iterator; |
| | | |
| | | @Api(tags = "服务控制") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api/server") |
| | |
| | | private ConfigurableApplicationContext context; |
| | | |
| | | |
| | | @ApiOperation("重启服务") |
| | | @RequestMapping(value = "/restart") |
| | | @ResponseBody |
| | | public Object restart(){ |
| | |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.service.IStreamProxyService; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 拉流代理接口 |
| | | */ |
| | | @Api(tags = "拉流代理") |
| | | @Controller |
| | | @CrossOrigin |
| | | @RequestMapping(value = "/api/proxy") |
| | |
| | | private IStreamProxyService streamProxyService; |
| | | |
| | | |
| | | @ApiOperation("分页查询流代理") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), |
| | | }) |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<StreamProxyItem> list(@RequestParam(required = false)Integer page, |
| | | @RequestParam(required = false)Integer count, |
| | | @RequestParam(required = false)String q, |
| | | @RequestParam(required = false)String query, |
| | | @RequestParam(required = false)Boolean online ){ |
| | | |
| | | return streamProxyService.getAll(page, count); |
| | | } |
| | | |
| | | @ApiOperation("保存代理") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "代理参数", dataTypeClass = StreamProxyItem.class), |
| | | }) |
| | | @RequestMapping(value = "/save") |
| | | @ResponseBody |
| | | public Object save(@RequestBody StreamProxyItem param){ |
| | |
| | | return "success"; |
| | | } |
| | | |
| | | @ApiOperation("移除代理") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "app", value = "应用名", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "stream", value = "流ID", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping(value = "/del") |
| | | @ResponseBody |
| | | public Object del(String app, String stream){ |
| | |
| | | return "success"; |
| | | } |
| | | |
| | | @ApiOperation("启用代理") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "app", value = "应用名", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "stream", value = "流ID", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping(value = "/start") |
| | | @ResponseBody |
| | | public Object start(String app, String stream){ |
| | |
| | | return "success"; |
| | | } |
| | | |
| | | @ApiOperation("停用代理") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "app", value = "应用名", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "stream", value = "流ID", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping(value = "/stop") |
| | | @ResponseBody |
| | | public Object stop(String app, String stream){ |
| | |
| | | package com.genersoft.iot.vmp.vmanager.streamPush; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| | | import com.genersoft.iot.vmp.service.IStreamPushService; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.vmanager.media.MediaController; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "推流信息管理") |
| | | @Controller |
| | | @CrossOrigin |
| | | @RequestMapping(value = "/api/push") |
| | |
| | | @Autowired |
| | | private IStreamPushService streamPushService; |
| | | |
| | | @ApiOperation("推流列表查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), |
| | | }) |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<StreamPushItem> list(@RequestParam(required = false)Integer page, |
| | | @RequestParam(required = false)Integer count, |
| | | @RequestParam(required = false)String q, |
| | | @RequestParam(required = false)String query, |
| | | @RequestParam(required = false)Boolean online ){ |
| | | |
| | | PageInfo<StreamPushItem> pushList = streamPushService.getPushList(page - 1, page - 1 + count); |
| | | return pushList; |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveToGB") |
| | | @ApiOperation("将推流添加到国标") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "stream", value = "直播流关联国标平台", dataTypeClass = GbStream.class), |
| | | }) |
| | | @RequestMapping(value = "/save_to_gb") |
| | | @ResponseBody |
| | | public Object saveToGB(@RequestBody GbStream stream){ |
| | | if (streamPushService.saveToGB(stream)){ |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/removeFormGB") |
| | | |
| | | @ApiOperation("将推流移出到国标") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "stream", value = "直播流关联国标平台", dataTypeClass = GbStream.class), |
| | | }) |
| | | @RequestMapping(value = "/remove_form_gb") |
| | | @ResponseBody |
| | | public Object removeFormGB(@RequestBody GbStream stream){ |
| | | if (streamPushService.removeFromGB(stream)){ |
| | |
| | | package com.genersoft.iot.vmp.vmanager.user; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "用户管理") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | @RequestMapping("/api/user") |
| | | public class UserController { |
| | | |
| | | @Value("${auth.username}") |
| | |
| | | @Value("${auth.password}") |
| | | private String passwordConfig; |
| | | |
| | | @RequestMapping("/user/login") |
| | | @ApiOperation("登录") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "username", value = "用户名", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "password", value = "密码(32未md5加密)", dataTypeClass = String.class), |
| | | }) |
| | | @RequestMapping("/login") |
| | | public String login(String username, String password){ |
| | | if (!StringUtils.isEmpty(username) && username.equals(usernameConfig) |
| | | && !StringUtils.isEmpty(password) && password.equals(passwordConfig)) { |
| | |
| | | // import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| | | import com.genersoft.iot.vmp.vmanager.play.PlayController; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.play.PlayController; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | <title>国标28181</title> |
| | | </head> |
| | | <body> |
| | | <!-- <script type="text/javascript" src="./js/EasyWasmPlayer.js"></script> --> |
| | | <script type="text/javascript" src="./js/EasyWasmPlayer.js"></script> |
| | | <script type="text/javascript" src="/static/js/ZLMRTCClient.js"></script> |
| | | <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=rk73w8dv1rkE4UdZsataG68VarhYQzrx&s=1"></script> |
| | | <div id="app"></div> |
| | |
| | | }, |
| | | removeFromGB: function(row){ |
| | | var that = this; |
| | | that.$axios.post(`/api/push/removeFormGB`, row) |
| | | that.$axios.post(`/api/push/remove_form_gb`, row) |
| | | .then(function (res) { |
| | | console.log(res); |
| | | console.log(res.data == "success"); |
| | |
| | | console.log("onSubmit"); |
| | | var that = this; |
| | | that.$axios |
| | | .post(`/api/push/saveToGB`, that.proxyParam) |
| | | .post(`/api/push/save_to_gb`, that.proxyParam) |
| | | .then(function (res) { |
| | | console.log(res); |
| | | console.log(res.data == "success"); |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import player from '../dialog/rtcPlayer.vue' |
| | | // import player from '../dialog/rtcPlayer.vue' |
| | | import player from '../dialog/easyPlayer.vue' |
| | | export default { |
| | | name: 'devicePlayer', |
| | | props: {}, |
| | |
| | | |
| | | this.hasaudio = hasAudio; |
| | | this.isLoging = false; |
| | | this.videoUrl = streamInfo.rtc; |
| | | // this.videoUrl = streamInfo.rtc; |
| | | this.videoUrl = streamInfo.ws_flv; |
| | | this.streamId = streamInfo.streamId; |
| | | this.app = streamInfo.app; |
| | | this.playFromStreamInfo(false, streamInfo) |
| | |
| | | var endTime = this.videoHistory.date + " 23:59:59"; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: '/api/record/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime |
| | | url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime |
| | | }).then(function (res) { |
| | | // 处理时间信息 |
| | | that.videoHistory.searchHistoryResult = res.data.recordList; |
| | |
| | | method: 'post', |
| | | // url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?leftRight=' + leftRight + '&upDown=' + upDown + |
| | | // '&inOut=' + zoom + '&moveSpeed=50&zoomSpeed=50' |
| | | url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + (zoom * 16 + upDown * 4 + leftRight) + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed |
| | | url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + (zoom * 16 + upDown * 4 + leftRight) + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed |
| | | }).then(function (res) {}); |
| | | }, |
| | | //////////////////////播放器事件处理////////////////////////// |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' |
| | | }).then(function (res) {}); |
| | | }, |
| | | setSpeedOrTime: function (cmdCode, groupNum, parameter) { |
| | |
| | | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16)); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 |
| | | }).then(function (res) {}); |
| | | }, |
| | | setCommand: function (cmdCode, groupNum, parameter) { |
| | |
| | | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0'); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: '/api/frontEndCommand/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' |
| | | }).then(function (res) {}); |
| | | }, |
| | | formatTooltip: function (val) { |