视频拉流
This commit is contained in:
parent
d5c3d62d95
commit
7fd765d4b7
@ -52,7 +52,6 @@
|
||||
|
||||
<el-dialog :visible.sync="qrCodeVisible" width="500px">
|
||||
<div style="text-align: center"><img :src="baseApi + '/file/image/' + qrCodeUrl" /></div>
|
||||
<div style="text-align: center;"><h4 style="text-align: center;">可以截图保存,有效期只有一小时</h4></div>
|
||||
</el-dialog>
|
||||
|
||||
<!--表格渲染-->
|
||||
|
@ -17,20 +17,6 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- FFmpeg 包装器 -->
|
||||
<dependency>
|
||||
<groupId>ws.schild</groupId>
|
||||
<artifactId>jave-all-deps</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 视频流处理 -->
|
||||
<dependency>
|
||||
<groupId>org.bytedeco</groupId>
|
||||
<artifactId>javacv-platform</artifactId>
|
||||
<version>1.5.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成模块 -->
|
||||
<dependency>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
@ -44,16 +30,9 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- <!– tools 模块包含了 common 和 logging 模块 –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>me.zhengjie</groupId>-->
|
||||
<!-- <artifactId>eladmin-tools</artifactId>-->
|
||||
<!-- <version>1.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>me.zhengjie</groupId>
|
||||
<artifactId>eladmin-logging</artifactId>
|
||||
<artifactId>eladmin-flv</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
|
||||
|
@ -20,7 +20,7 @@ package me.zhengjie.modules.security.config.enums;
|
||||
*/
|
||||
public enum ErrorStatusEnum {
|
||||
|
||||
SDCP_PRINT_ERROR_DEFAULT(-1, "默认"),
|
||||
SDCP_PRINT_ERROR_DEFAULT(-1, "默认/断开"),
|
||||
SDCP_PRINT_ERROR_NONE(0 ,"正常"),
|
||||
SDCP_PRINT_ERROR_CHECKFILE(1 ,"文件校验失败"),
|
||||
SDCP_PRINT_ERROR_DEVICE(2 ,"设备或加密出错"),
|
||||
|
@ -5,7 +5,7 @@ package me.zhengjie.modules.security.config.enums;
|
||||
*/
|
||||
public enum PrintInfoStatusEnum {
|
||||
|
||||
SDCP_PRINT_STATUS_DEFAULT(-1, "默认"),
|
||||
SDCP_PRINT_STATUS_DEFAULT(-1, "默认/断开"),
|
||||
SDCP_PRINT_STATUS_IDLE(0, "空闲"),
|
||||
SDCP_PRINT_STATUS_HOMING(1,"归零中"),
|
||||
SDCP_PRINT_STATUS_DROPPING(2,"下降中"),
|
||||
|
@ -69,13 +69,13 @@ public class BusDevice implements Serializable {
|
||||
@ApiModelProperty(value = "放置位置")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value = "设备状态(-1=默认/断开,0=空闲,1=任务中,2=准备中,3=铲件中)")
|
||||
@ApiModelProperty(value = "设备状态(-1默认/断开,0空闲,1任务中,2准备中,3铲件中)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "打印状态(-1默认,0空闲,1归零中,2下降中,3曝光中,4抬升中,5正在执行暂停动作中,6已暂停,7正在执行停止动作中,8已停止,9打印完成,10文件检测中,11加液中,12铲件中)")
|
||||
@ApiModelProperty(value = "打印状态(-1默认/断开,0空闲,1归零中,2下降中,3曝光中,4抬升中,5正在执行暂停动作中,6已暂停,7正在执行停止动作中,8已停止,9打印完成,10文件检测中,11加液中,12铲件中)")
|
||||
private Integer printStatus;
|
||||
|
||||
@ApiModelProperty(value = "异常状态(-1默认,0正常,1文件校验失败,2设备或加密错误,3打印准备过程出错,4打印出错,5加液失败,6铲件失败,7图片异物)")
|
||||
@ApiModelProperty(value = "异常状态(-1默认/断开,0正常,1文件校验失败,2设备或加密错误,3打印准备过程出错,4打印出错,5加液失败,6铲件失败,7图片异物)")
|
||||
private Integer errorStatus;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
|
@ -137,6 +137,8 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
return;
|
||||
}
|
||||
WebSocketResDTO resDTO = JSON.parseObject(message, WebSocketResDTO.class);
|
||||
Map<String, Object> commandResult = new HashMap<>();
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
if (method == MethodEnum.response) {
|
||||
// 指令响应消息
|
||||
WebSocketResData data = param.getData();
|
||||
@ -144,21 +146,16 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
// 指令-获取图片
|
||||
if (cmd.equals(385)) {
|
||||
JSONObject cData = JSON.parseObject(data.getData().toString());
|
||||
Map<String, Object> commandResult = new HashMap<>();
|
||||
int Ack = Integer.parseInt(cData.get("Ack").toString());
|
||||
if (Ack == 0) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
commandResult.put("imageType", cData.get("ImageType"));
|
||||
commandResult.put("imageData", cData.get("ImageData"));
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "指令响应成功", MsgEnum.INFO)));
|
||||
} else if (Ack == 1) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "图片获取失败", MsgEnum.ERROR)));
|
||||
} else if (Ack == 2) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "不支持该类型图片", MsgEnum.ERROR)));
|
||||
} else if (Ack == 3) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "未知错误", MsgEnum.ERROR)));
|
||||
}
|
||||
}
|
||||
@ -166,19 +163,14 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
else if (cmd.equals(386)) {
|
||||
JSONObject cData = JSON.parseObject(data.getData().toString());
|
||||
int Ack = Integer.parseInt(cData.get("Ack").toString());
|
||||
Map<String, Object> commandResult = new HashMap<>();
|
||||
if (Ack == 0) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
commandResult.put("videoUrl", cData.get("VideoUrl"));
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "指令响应成功", MsgEnum.INFO)));
|
||||
} else if (Ack == 1) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "超过最大同时拉流限制", MsgEnum.ERROR)));
|
||||
} else if (Ack == 2) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "摄像头不存在", MsgEnum.ERROR)));
|
||||
} else if (Ack == 3) {
|
||||
commandResult.put("deviceSn", deviceSn);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "未知错误", MsgEnum.ERROR)));
|
||||
}
|
||||
}
|
||||
@ -192,7 +184,7 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
ErrorStatusEnum.SDCP_PRINT_ERROR_NONE,
|
||||
null
|
||||
);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(deviceSn, MsgEnum.INFO)));
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "状态更新", MsgEnum.INFO)));
|
||||
} else if (method == MethodEnum.attributes) {
|
||||
WebSocketResAttributes attributes = resDTO.getAttributes();
|
||||
// String[] capabilities = attributes.getCapabilities();
|
||||
@ -220,7 +212,7 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
ErrorStatusEnum.SDCP_PRINT_ERROR_NONE,
|
||||
null
|
||||
);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(deviceSn, MsgEnum.ERROR)));
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, "设备发生异常", MsgEnum.ERROR)));
|
||||
} else if (method == MethodEnum.notice) {
|
||||
|
||||
} else if (method == MethodEnum.close || method == MethodEnum.disconnect) {
|
||||
@ -233,7 +225,7 @@ public class WebSocketSdcpServiceImpl extends WebSocketService {
|
||||
ErrorStatusEnum.SDCP_PRINT_ERROR_DEFAULT,
|
||||
msg
|
||||
);
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(msg, en)));
|
||||
sendVueMessage(JSON.toJSONString(new SocketMsg(commandResult, msg, en)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
/*
|
||||
* Copyright 2019-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package me.zhengjie.sysrunner;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author Tz
|
||||
* @description 程序启动后处理数据
|
||||
* @date 2025-01-13
|
||||
**/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class SystemRunner implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
}
|
||||
}
|
||||
///*
|
||||
// * Copyright 2019-2020 the original author or authors.
|
||||
// *
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// * you may not use this file except in compliance with the License.
|
||||
// * You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing, software
|
||||
// * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// * See the License for the specific language governing permissions and
|
||||
// * limitations under the License.
|
||||
// */
|
||||
//package me.zhengjie.sysrunner;
|
||||
//
|
||||
//import lombok.RequiredArgsConstructor;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.boot.ApplicationArguments;
|
||||
//import org.springframework.boot.ApplicationRunner;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
///**
|
||||
// * @author Tz
|
||||
// * @description 程序启动后处理数据
|
||||
// * @date 2025-01-13
|
||||
// **/
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//@RequiredArgsConstructor
|
||||
//public class SystemRunner implements ApplicationRunner {
|
||||
//
|
||||
// @Override
|
||||
// public void run(ApplicationArguments args) {
|
||||
// }
|
||||
//}
|
||||
|
@ -12,6 +12,7 @@
|
||||
<module>eladmin-logging</module>
|
||||
<module>eladmin-system</module>
|
||||
<module>eladmin-generator</module>
|
||||
<module>eladmin-flv</module>
|
||||
</modules>
|
||||
|
||||
<name>后台管理</name>
|
||||
|
Loading…
Reference in New Issue
Block a user