Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gamera_videos_no_ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liusq
gamera_videos_no_ui
Commits
6c388318
Commit
6c388318
authored
Sep 03, 2024
by
“liusq”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复ping命令进程生命周期问题
parent
402424fb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
CameraHandle.cpp
+5
-2
MqttSubscriber.cpp
+7
-3
gamera_videos.pro
+2
-2
No files found.
CameraHandle.cpp
View file @
6c388318
...
@@ -436,7 +436,9 @@ void CameraHandle::sdkDevSnapSyn(XSDK_HANDLE hDevice, int nChannel){
...
@@ -436,7 +436,9 @@ void CameraHandle::sdkDevSnapSyn(XSDK_HANDLE hDevice, int nChannel){
QString
ip
=
QString
::
fromUtf8
(
loginParam
->
sDevId
);
QString
ip
=
QString
::
fromUtf8
(
loginParam
->
sDevId
);
bool
is_ping
=
vides_data
::
pingAddress
(
ip
);
bool
is_ping
=
vides_data
::
pingAddress
(
ip
);
if
(
!
is_ping
){
qInfo
()
<<
"ping 的结果"
<<
is_ping
;
if
(
is_ping
){
deviceReboot
();
deviceReboot
();
}
else
{
}
else
{
QString
ip
=
QString
::
fromUtf8
(
loginParam
->
sDevId
);
QString
ip
=
QString
::
fromUtf8
(
loginParam
->
sDevId
);
...
@@ -932,9 +934,10 @@ void CameraHandle::licensePlateRecognitionResults(vides_data::requestLicensePlat
...
@@ -932,9 +934,10 @@ void CameraHandle::licensePlateRecognitionResults(vides_data::requestLicensePlat
for
(
auto
&
plate
:
location
.
plates
)
{
for
(
auto
&
plate
:
location
.
plates
)
{
plate
.
img
.
clear
();
plate
.
img
.
clear
();
}
}
httpService
.
setHttpUrl
(
httpUrl
);
vides_data
::
response
*
img_resp
=
httpService
.
httpLicensePlateRecognition
(
location
,
result
);
vides_data
::
response
*
img_resp
=
httpService
.
httpLicensePlateRecognition
(
location
,
result
);
if
(
img_resp
->
code
!=
0
)
{
if
(
img_resp
->
code
!=
0
)
{
qInfo
()
<<
"
不加图片上次
失败"
;
qInfo
()
<<
"
车牌不加图片上传
失败"
;
}
}
instace
.
deleteObj
(
img_resp
);
instace
.
deleteObj
(
img_resp
);
}
else
{
}
else
{
...
...
MqttSubscriber.cpp
View file @
6c388318
...
@@ -114,7 +114,7 @@ int MqttSubscriber::messageArrived(char* topicName, int topicLen, MQTTAsync_mess
...
@@ -114,7 +114,7 @@ int MqttSubscriber::messageArrived(char* topicName, int topicLen, MQTTAsync_mess
qInfo
()
<<
"Failed to parse JSON payload"
;
qInfo
()
<<
"Failed to parse JSON payload"
;
}
}
int
res
=-
2
;
int
res
=-
2
;
//1开 2关 3 重启
//1开 2关 3 重启
4 GB28181开 5 GB28181关
CameraHandle
*
cameraHandle
=
MainWindow
::
sp_this
->
findHandle
(
response
.
sn
);
CameraHandle
*
cameraHandle
=
MainWindow
::
sp_this
->
findHandle
(
response
.
sn
);
if
(
cameraHandle
==
nullptr
){
if
(
cameraHandle
==
nullptr
){
qInfo
()
<<
"不存在该相机"
;
qInfo
()
<<
"不存在该相机"
;
...
@@ -126,10 +126,14 @@ int MqttSubscriber::messageArrived(char* topicName, int topicLen, MQTTAsync_mess
...
@@ -126,10 +126,14 @@ int MqttSubscriber::messageArrived(char* topicName, int topicLen, MQTTAsync_mess
if
(
response
.
msg_type
==
3
){
if
(
response
.
msg_type
==
3
){
res
=
cameraHandle
->
deviceReboot
();
res
=
cameraHandle
->
deviceReboot
();
}
}
if
(
response
.
msg_type
==
4
){
res
=
cameraHandle
->
updateSdkDevStatus
(
true
);
}
if
(
response
.
msg_type
==
5
){
res
=
cameraHandle
->
updateSdkDevStatus
(
false
);
}
}
}
vides_data
::
requestMqttData
request
;
vides_data
::
requestMqttData
request
;
qInfo
()
<<
"res"
<<
res
;
request
.
code
=
res
>=
0
?
0
:
0x01
;
request
.
code
=
res
>=
0
?
0
:
0x01
;
request
.
uniq
=
response
.
uniq
;
request
.
uniq
=
response
.
uniq
;
request
.
sn
=
response
.
sn
;
request
.
sn
=
response
.
sn
;
...
...
gamera_videos.pro
View file @
6c388318
...
@@ -134,5 +134,5 @@ qnx: target.path = /tmp/$${TARGET}/bin
...
@@ -134,5 +134,5 @@ qnx: target.path = /tmp/$${TARGET}/bin
else
:
unix
:
!
android
:
target
.
path
=
/
opt
/
$$
{
TARGET
}
/
bin
else
:
unix
:
!
android
:
target
.
path
=
/
opt
/
$$
{
TARGET
}
/
bin
!
isEmpty
(
target
.
path
)
:
INSTALLS
+=
target
!
isEmpty
(
target
.
path
)
:
INSTALLS
+=
target
RESOURCES
+=
\
#
RESOURCES += \
BG
.
qrc
#
BG.qrc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment