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
ab086355
Commit
ab086355
authored
Jan 04, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change VideoReceiver destructor to close video file correctly
parent
0f9149b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
VideoReceiver.cc
src/VideoStreaming/VideoReceiver.cc
+7
-12
VideoReceiver.h
src/VideoStreaming/VideoReceiver.h
+0
-1
No files found.
src/VideoStreaming/VideoReceiver.cc
View file @
ab086355
...
...
@@ -180,12 +180,12 @@ VideoReceiver::VideoReceiver(QObject* parent)
VideoReceiver
::~
VideoReceiver
()
{
#if defined(QGC_GST_STREAMING)
// stop
();
// setVideoSink(NULL
);
// if(_socket) {
// delete _socket;
// }
EOS
();
stopRecording
();
stop
(
);
setVideoSink
(
NULL
);
if
(
_socket
)
{
delete
_socket
;
}
#endif
}
...
...
@@ -463,14 +463,9 @@ void VideoReceiver::start()
#endif
}
void
VideoReceiver
::
EOS
()
{
gst_element_send_event
(
_pipeline
,
gst_event_new_eos
());
}
void
VideoReceiver
::
stop
()
{
#if defined(QGC_GST_STREAMING)
qDebug
()
<<
"stop()"
;
if
(
_pipeline
!=
NULL
)
{
qDebug
()
<<
"Stopping pipeline"
;
gst_element_set_state
(
_pipeline
,
GST_STATE_NULL
);
...
...
@@ -495,7 +490,7 @@ void VideoReceiver::_onBusMessage(GstMessage* msg)
switch
(
GST_MESSAGE_TYPE
(
msg
))
{
case
GST_MESSAGE_EOS
:
qDebug
()
<<
"Got EOS"
;
//
stop();
stop
();
break
;
case
GST_MESSAGE_ERROR
:
do
{
...
...
src/VideoStreaming/VideoReceiver.h
View file @
ab086355
...
...
@@ -48,7 +48,6 @@ signals:
public
slots
:
void
start
();
void
EOS
();
void
stop
();
void
setUri
(
const
QString
&
uri
);
void
stopRecording
();
...
...
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