Commit efe64000 authored by Jacob Walser's avatar Jacob Walser

Hide recording icon if no video stream present at startup

Other minor formatting and stability improvements
parent 9565d524
This diff is collapsed.
......@@ -35,7 +35,7 @@ public:
~VideoReceiver();
#if defined(QGC_GST_STREAMING)
void setVideoSink(GstElement* sink);
void setVideoSink(GstElement* _sink);
#endif
bool recording() { return _recording; }
......@@ -48,8 +48,8 @@ public slots:
void EOS ();
void stop ();
void setUri (const QString& uri);
void _stopRecording();
void _startRecording();
void stopRecording ();
void startRecording ();
private slots:
#if defined(QGC_GST_STREAMING)
......@@ -60,6 +60,7 @@ private slots:
private:
#if defined(QGC_GST_STREAMING)
typedef struct
{
GstPad* teepad;
......@@ -69,16 +70,15 @@ private:
gboolean removing;
} Sink;
static Sink* sink;
bool _recording;
static Sink* _sink;
static GstElement* _tee;
void _onBusMessage(GstMessage* message);
static gboolean _onBusMessage(GstBus* bus, GstMessage* msg, gpointer user_data);
static gboolean _eosCB(GstBus* bus, GstMessage* message, gpointer user_data);
static GstPadProbeReturn _unlinkCB(GstPad* pad, GstPadProbeInfo* info, gpointer user_data);
bool _recording;
static GstElement* tee;
#endif
QString _uri;
......@@ -86,7 +86,6 @@ private:
#if defined(QGC_GST_STREAMING)
static GstElement* _pipeline;
static GstElement* _pipeline2;
GstElement* _videoSink;
#endif
......
......@@ -495,6 +495,7 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
visible: QGroundControl.videoManager.videoRunning
Rectangle {
anchors.top: parent.top
......@@ -506,7 +507,7 @@ Item {
MouseArea {
anchors.fill: parent
onClicked: QGroundControl.videoManager.videoReceiver.recording? QGroundControl.videoManager.videoReceiver._stopRecording() : QGroundControl.videoManager.videoReceiver._startRecording()
onClicked: QGroundControl.videoManager.videoReceiver.recording? QGroundControl.videoManager.videoReceiver.stopRecording() : QGroundControl.videoManager.videoReceiver.startRecording()
}
}
......
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