From d7eca3002f37925cf36a2c357516049d46a9f10f Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 5 Jun 2019 16:13:02 -0700 Subject: [PATCH] Fix no GST builds --- src/VideoStreaming/SubtitleWriter.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/VideoStreaming/SubtitleWriter.cc b/src/VideoStreaming/SubtitleWriter.cc index 338851db0..051e22918 100644 --- a/src/VideoStreaming/SubtitleWriter.cc +++ b/src/VideoStreaming/SubtitleWriter.cc @@ -40,11 +40,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver) return; } _videoReceiver = videoReceiver; + +#if defined(QGC_GST_STREAMING) // Only start writing subtitles once the recording pipeline actually starts connect(_videoReceiver, &VideoReceiver::gotFirstRecordingKeyFrame, this, &SubtitleWriter::_startCapturingTelemetry); // Captures recordingChanged() signals to stop writing subtitles connect(_videoReceiver, &VideoReceiver::recordingChanged, this, &SubtitleWriter::_onVideoRecordingChanged); +#endif // Timer for telemetry capture and writing to file connect(&_timer, &QTimer::timeout, this, &SubtitleWriter::_captureTelemetry); @@ -52,12 +55,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver) void SubtitleWriter::_onVideoRecordingChanged() { +#if defined(QGC_GST_STREAMING) // Stop capturing data if recording stopped if(!_videoReceiver->recording()) { qCDebug(SubtitleWriterLog) << "Stopping writing"; _timer.stop(); _file.close(); } +#endif } void SubtitleWriter::_startCapturingTelemetry() -- 2.22.0