Commit d7eca300 authored by Don Gagne's avatar Don Gagne

Fix no GST builds

parent 4729b98c
...@@ -40,11 +40,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver) ...@@ -40,11 +40,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver)
return; return;
} }
_videoReceiver = videoReceiver; _videoReceiver = videoReceiver;
#if defined(QGC_GST_STREAMING)
// Only start writing subtitles once the recording pipeline actually starts // Only start writing subtitles once the recording pipeline actually starts
connect(_videoReceiver, &VideoReceiver::gotFirstRecordingKeyFrame, this, &SubtitleWriter::_startCapturingTelemetry); connect(_videoReceiver, &VideoReceiver::gotFirstRecordingKeyFrame, this, &SubtitleWriter::_startCapturingTelemetry);
// Captures recordingChanged() signals to stop writing subtitles // Captures recordingChanged() signals to stop writing subtitles
connect(_videoReceiver, &VideoReceiver::recordingChanged, this, &SubtitleWriter::_onVideoRecordingChanged); connect(_videoReceiver, &VideoReceiver::recordingChanged, this, &SubtitleWriter::_onVideoRecordingChanged);
#endif
// Timer for telemetry capture and writing to file // Timer for telemetry capture and writing to file
connect(&_timer, &QTimer::timeout, this, &SubtitleWriter::_captureTelemetry); connect(&_timer, &QTimer::timeout, this, &SubtitleWriter::_captureTelemetry);
...@@ -52,12 +55,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver) ...@@ -52,12 +55,14 @@ void SubtitleWriter::setVideoReceiver(VideoReceiver* videoReceiver)
void SubtitleWriter::_onVideoRecordingChanged() void SubtitleWriter::_onVideoRecordingChanged()
{ {
#if defined(QGC_GST_STREAMING)
// Stop capturing data if recording stopped // Stop capturing data if recording stopped
if(!_videoReceiver->recording()) { if(!_videoReceiver->recording()) {
qCDebug(SubtitleWriterLog) << "Stopping writing"; qCDebug(SubtitleWriterLog) << "Stopping writing";
_timer.stop(); _timer.stop();
_file.close(); _file.close();
} }
#endif
} }
void SubtitleWriter::_startCapturingTelemetry() void SubtitleWriter::_startCapturingTelemetry()
......
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