Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ab086355
Commit
ab086355
authored
Jan 04, 2017
by
Jacob Walser
Browse files
Change VideoReceiver destructor to close video file correctly
parent
0f9149b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/VideoStreaming/VideoReceiver.cc
View file @
ab086355
...
...
@@ -180,12 +180,12 @@ VideoReceiver::VideoReceiver(QObject* parent)
VideoReceiver
::~
VideoReceiver
()
{
#if defined(QGC_GST_STREAMING)
//
stop();
//
s
etVideoSink(NULL
);
//
if(_socket) {
//
delete
_socket
;
// }
EOS
();
stop
Recording
();
s
top
(
);
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
Supports
Markdown
0%
Try again
or
attach a new 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