1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 11:34:09 -04:00

FileSink: enable record button only when plugin is running

This commit is contained in:
f4exb
2021-02-23 08:26:42 +01:00
parent 75b08c0dee
commit e50e228984
4 changed files with 49 additions and 9 deletions
+13
View File
@@ -43,6 +43,7 @@
#include "filesink.h"
MESSAGE_CLASS_DEFINITION(FileSink::MsgConfigureFileSink, Message)
MESSAGE_CLASS_DEFINITION(FileSink::MsgReportStartStop, Message)
const char* const FileSink::m_channelIdURI = "sdrangel.channel.filesink";
const char* const FileSink::m_channelId = "FileSink";
@@ -116,6 +117,12 @@ void FileSink::start()
FileSinkBaseband::MsgConfigureFileSinkBaseband *msg = FileSinkBaseband::MsgConfigureFileSinkBaseband::create(m_settings, true);
m_basebandSink->getInputMessageQueue()->push(msg);
if (getMessageQueueToGUI())
{
MsgReportStartStop *msg = MsgReportStartStop::create(true);
getMessageQueueToGUI()->push(msg);
}
}
void FileSink::stop()
@@ -124,6 +131,12 @@ void FileSink::stop()
m_basebandSink->stopWork();
m_thread.exit();
m_thread.wait();
if (getMessageQueueToGUI())
{
MsgReportStartStop *msg = MsgReportStartStop::create(false);
getMessageQueueToGUI()->push(msg);
}
}
bool FileSink::handleMessage(const Message& cmd)