Skip to content

Commit d1e2a5e

Browse files
committed
v1.0
1 parent eb090c5 commit d1e2a5e

File tree

241 files changed

+293039
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+293039
-1
lines changed
717 KB
Loading

README.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1-
# AIMPPCamera_QTGUI
1+
# AI MPP Camera QT GUI APP
2+
3+
## 简介
4+
5+
​ AI MPP Camera QT GUI APP 是一个跨平台(Windows / Linux / macOS)的 Qt/C++ 上位机,专为 **全志 V853 IPC 方案** 设计与百问网AI音视频课程配套使用。
6+
​ 它通过 **RTSP** 拉取 V853 实时 H.264/H.265 码流,本地录制为 **MP4** 文件,同时通过 **TCP Socket** 与 V853 上的守护进程通信,完成摄像机启停、参数配置、AI 检测开关等远程控制。
7+
8+
​ 百问网AI音视频课程:[课程购买链接](https://detail.tmall.com/item.htm?abbucket=5&id=777414792957)
9+
10+
![18390bf618d0cdd9fc96559031f714fa](${images}/18390bf618d0cdd9fc96559031f714fa-1756091920268-3.png)
11+
12+
## 功能特性
13+
14+
| 功能 | 描述 |
15+
| -------------- | -------------------------------------------------------- |
16+
| **实时预览** | 多路 RTSP 码流同步播放,支持 1080p/720p 自适应 |
17+
| **本地录制** | 即时录制为 MP4,支持分段、暂停/恢复、自定义保存路径 |
18+
| **摄像机管理** | 添加/删除/编辑摄像机信息(IP、端口、通道) |
19+
| **远程控制** | 启动/停止/重启摄像机;开关行人检测、区域入侵、语音播报等 |
20+
| **参数配置** | 分辨率、帧率、码率、音量、检测区域绘制(可视化) |
21+
22+
23+
24+
## 环境搭建
25+
26+
开始前请请准备以下两个环境:
27+
28+
1、QT SDK的开发环境;(安装之后,自然就会包含Windows下C和C++的环境)
29+
30+
2、ffmpeg的Windows dll库;
31+
32+
33+
34+
使用QT Creator进行编译!
35+
36+
37+
38+
## 项目结构
39+
40+
```
41+
core
42+
├── CameraConfig.cpp #PC端GUI的摄像机配置文件,例如读取,写入,更新等操作
43+
├── CameraConfig.h
44+
├── CameraPaintItem.cpp #负责画面绘制功能,图像渲染等功能
45+
├── CameraPaintItem.h
46+
├── main.cpp #程序主入口
47+
├── mainBackend.cpp #程序一些后台操作
48+
├── mainBackend.h
49+
├── media #存放媒体功能的源码目录
50+
│   ├── MediaCore.cpp #辅助类,为录像和媒体流提供支撑
51+
│   ├── MediaCore.hpp
52+
│   ├── MediaRecord.cpp #录像功能
53+
│   ├── MediaRecord.hpp
54+
│   ├── MediaStream.cpp #媒体流的播放拉流功能
55+
│   ├── MediaStream.hpp
56+
│   ├── ffmpeg_common.cpp #辅助类,为录像和媒体流提供支撑
57+
│   └── ffmpeg_common.h #ffmpeg的公共头文件
58+
├── updata_common.h #与update_config_server当中的一致
59+
├── updateconfigclient.cpp #与update_config_server通讯层
60+
└── updateconfigclient.h
61+
```
62+
63+
64+
65+
## 通信协议
66+
67+
参数通信:上位机 ↔ V853 通过 **TCP SOCKET**(端口 80)交互。
68+
69+
视频流通信:V853-> 上位机通过RTSP获取码流,并进行封装MP4。
70+
71+
72+
73+
## 贡献指南
74+
75+
欢迎 Issue / PR。
76+
代码风格遵循 `clang-format`,提交前执行:
77+
78+
```
79+
clang-format -i src/**/*.cpp src/**/*.h
80+
```
81+
82+
83+
84+
85+

baiwenwang.pro

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
QT += quick network
2+
CONFIG += c++11
3+
4+
# The following define makes your compiler emit warnings if you use
5+
# any Qt feature that has been marked deprecated (the exact warnings
6+
# depend on your compiler). Refer to the documentation for the
7+
# deprecated API to know how to port your code away from it.
8+
DEFINES += QT_DEPRECATED_WARNINGS
9+
10+
# You can also make your code fail to compile if it uses deprecated APIs.
11+
# In order to do so, uncomment the following line.
12+
# You can also select to disable deprecated APIs only up to a certain version of Qt.
13+
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
14+
15+
SOURCES += \
16+
core/CameraPaintItem.cpp \
17+
core/main.cpp \
18+
core/mainBackend.cpp \
19+
core/media/MediaCore.cpp \
20+
core/UpdateConfigCLient.cpp \
21+
core/media/ffmpeg_common.cpp \
22+
core/CameraConfig.cpp \
23+
core/media/MediaRecord.cpp \
24+
core/media/MediaStream.cpp
25+
26+
RESOURCES += qml.qrc
27+
28+
# 设置FFmpeg库的根目录
29+
FFMPEG_DIR = $$PWD/ffmpeg
30+
message("FFmpeg path: " $$FFMPEG_DIR)
31+
32+
#x86或x64
33+
win32 {
34+
# 检测系统位数
35+
contains(QMAKE_HOST.arch, x86_64) {
36+
# 64位系统配置
37+
message("Building for 64-bit Windows")
38+
FFMPEG_LIB_DIR = $$FFMPEG_DIR/x64/lib
39+
FFMPEG_INS_DIR = $$FFMPEG_DIR/x64/include
40+
} else {
41+
# 32位系统配置
42+
message("Building for 32-bit Windows")
43+
FFMPEG_LIB_DIR = $$FFMPEG_DIR/x86/lib
44+
FFMPEG_INS_DIR = $$FFMPEG_DIR/x86/include
45+
}
46+
}
47+
48+
# 添加FFmpeg头文件路径
49+
INCLUDEPATH += $$FFMPEG_INS_DIR
50+
message("FFmpeg path: " $$INCLUDEPATH)
51+
# 添加FFmpeg库文件路径
52+
LIBS += -L$$FFMPEG_LIB_DIR
53+
54+
# 添加需要链接的FFmpeg库
55+
LIBS += -lavformat \
56+
-lavcodec \
57+
-lavutil \
58+
-lswscale \
59+
-lswresample \
60+
-lavdevice \
61+
-lavfilter
62+
63+
LIBS += -lws2_32 # 链接Winsock库
64+
65+
# Additional import path used to resolve QML modules in Qt Creator's code model
66+
QML_IMPORT_PATH =
67+
68+
# Additional import path used to resolve QML modules just for Qt Quick Designer
69+
QML_DESIGNER_IMPORT_PATH =
70+
71+
# Default rules for deployment.
72+
qnx: target.path = /tmp/$${TARGET}/bin
73+
else: unix:!android: target.path = /opt/$${TARGET}/bin
74+
!isEmpty(target.path): INSTALLS += target
75+
76+
HEADERS += \
77+
core/CameraPaintItem.h \
78+
core/mainBackend.h \
79+
core/media/ffmpeg_common.h \
80+
core/media/MediaCore.hpp \
81+
core/UpdateConfigCLient.h \
82+
core/updata_common.h \
83+
core/CameraConfig.h \
84+
core/media/MediaRecord.hpp \
85+
core/media/MediaStream.hpp
86+
87+
#
88+
89+
SUBDIRS +=
90+
91+
DISTFILES += \
92+
CameraView.qml \
93+
qml/main.js

0 commit comments

Comments
 (0)