Commit 95699d00 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4631 from DonLakeFlyer/VideoSourceSignal

Handle videoSource changes correctly
parents 418631ac 141b4285
......@@ -56,6 +56,7 @@ VideoManager::setToolbox(QGCToolbox *toolbox)
_videoSettings = toolbox->settingsManager()->videoSettings();
QString videoSource = _videoSettings->videoSource()->rawValue().toString();
connect(_videoSettings->videoSource(), &Fact::rawValueChanged, this, &VideoManager::_videoSourceChanged);
#if defined(QGC_GST_STREAMING)
#ifndef QGC_DISABLE_UVC
......@@ -91,6 +92,12 @@ VideoManager::setToolbox(QGCToolbox *toolbox)
#endif
}
void VideoManager::_videoSourceChanged(void)
{
emit hasVideoChanged();
emit isGStreamerChanged();
}
//-----------------------------------------------------------------------------
bool
VideoManager::hasVideo()
......
......@@ -67,11 +67,13 @@ signals:
void isGStreamerChanged ();
void videoSourceIDChanged ();
private slots:
void _videoSourceChanged(void);
private:
void _updateTimer ();
void _updateVideo ();
private:
VideoSurface* _videoSurface;
VideoReceiver* _videoReceiver;
bool _videoRunning;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment