Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
caa0e2cb
Commit
caa0e2cb
authored
Apr 09, 2020
by
Matej Frančeškin
Committed by
Andrew Voznytsa
Apr 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start/stop recording for secondary video stream
parent
17a591ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
VideoManager.cc
src/VideoManager/VideoManager.cc
+17
-7
No files found.
src/VideoManager/VideoManager.cc
View file @
caa0e2cb
...
@@ -295,22 +295,31 @@ VideoManager::startRecording(const QString& videoFile)
...
@@ -295,22 +295,31 @@ VideoManager::startRecording(const QString& videoFile)
qgcApp
()
->
showAppMessage
(
tr
(
"Invalid video format defined."
));
qgcApp
()
->
showAppMessage
(
tr
(
"Invalid video format defined."
));
return
;
return
;
}
}
QString
ext
=
kFileExtension
[
fileFormat
-
VideoReceiver
::
FILE_FORMAT_MIN
];
//-- Disk usage maintenance
//-- Disk usage maintenance
_cleanupOldVideos
();
_cleanupOldVideos
();
QString
savePath
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
videoSavePath
();
QString
savePath
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
videoSavePath
();
if
(
savePath
.
isEmpty
())
{
if
(
savePath
.
isEmpty
())
{
qgcApp
()
->
showAppMessage
(
tr
(
"Unabled to record video. Video save path must be specified in Settings."
));
qgcApp
()
->
showAppMessage
(
tr
(
"Unabled to record video. Video save path must be specified in Settings."
));
return
;
return
;
}
}
_videoFile
=
savePath
+
"/"
_videoFile
=
savePath
+
"/"
+
(
videoFile
.
isEmpty
()
?
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd_hh.mm.ss"
)
:
videoFile
)
+
(
videoFile
.
isEmpty
()
?
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd_hh.mm.ss"
)
:
videoFile
)
+
"."
+
kFileExtension
[
fileFormat
-
VideoReceiver
::
FILE_FORMAT_MIN
];
+
"."
;
QString
videoFile2
=
_videoFile
+
"2."
+
ext
;
_videoFile
+=
ext
;
if
(
_videoReceiver
[
0
]
&&
_videoStarted
[
0
])
{
_videoReceiver
[
0
]
->
startRecording
(
_videoFile
,
fileFormat
);
}
if
(
_videoReceiver
[
1
]
&&
_videoStarted
[
1
])
{
_videoReceiver
[
1
]
->
startRecording
(
videoFile2
,
fileFormat
);
}
_videoReceiver
[
0
]
->
startRecording
(
_videoFile
,
fileFormat
);
#else
#else
Q_UNUSED
(
videoFile
)
Q_UNUSED
(
videoFile
)
#endif
#endif
...
@@ -323,11 +332,12 @@ VideoManager::stopRecording()
...
@@ -323,11 +332,12 @@ VideoManager::stopRecording()
return
;
return
;
}
}
#if defined(QGC_GST_STREAMING)
#if defined(QGC_GST_STREAMING)
if
(
!
_videoReceiver
[
0
])
{
return
;
}
_videoReceiver
[
0
]
->
stopRecording
();
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
if
(
_videoReceiver
[
i
])
{
_videoReceiver
[
i
]
->
stopRecording
();
}
}
#endif
#endif
}
}
...
...
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