Commit 0f9149b1 authored by Jacob Walser's avatar Jacob Walser

Fix repeated calls to restart VideoReceiver

parent efe64000
......@@ -236,7 +236,9 @@ void VideoManager::_updateTimer()
}
else
{
if(_videoSurface && _videoSurface->lastFrame()) {
// if(_videoSurface && _videoSurface->lastFrame()) {
if(_videoSurface && _videoReceiver->streaming()) {
qDebug() << _videoSurface->lastFrame();
if(!_videoRunning)
{
_videoRunning = true;
......
......@@ -30,6 +30,7 @@ class VideoReceiver : public QObject
Q_OBJECT
public:
Q_PROPERTY(bool recording READ recording NOTIFY recordingChanged)
Q_PROPERTY(bool streaming READ streaming NOTIFY streamingChanged)
explicit VideoReceiver(QObject* parent = 0);
~VideoReceiver();
......@@ -39,9 +40,11 @@ public:
#endif
bool recording() { return _recording; }
bool streaming() { return GST_STATE(_pipeline) == GST_STATE_PLAYING; }
signals:
void recordingChanged();
void streamingChanged();
public slots:
void start ();
......@@ -71,6 +74,7 @@ private:
} Sink;
bool _recording;
bool _streaming;
static Sink* _sink;
static GstElement* _tee;
......
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