mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
RTLSDR input: moved FileRecord out of the GUI
This commit is contained in:
@@ -53,12 +53,6 @@ RTLSDRGui::RTLSDRGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
displaySettings();
|
||||
|
||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
m_fileSink = new FileRecord(std::string(recFileNameCStr));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
|
||||
connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
|
||||
queryDeviceReport(); // will reply with MsgReportRTLSDR to report gain list
|
||||
@@ -66,8 +60,6 @@ RTLSDRGui::RTLSDRGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
|
||||
RTLSDRGui::~RTLSDRGui()
|
||||
{
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete ui;
|
||||
delete m_sampleSource;
|
||||
}
|
||||
@@ -169,7 +161,6 @@ void RTLSDRGui::handleDSPMessages()
|
||||
m_deviceCenterFrequency = notif->getCenterFrequency();
|
||||
qDebug("RTLSDRGui::handleDSPMessages: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
|
||||
updateSampleRateAndFrequency();
|
||||
m_fileSink->handleMessage(*notif); // forward to file sink
|
||||
|
||||
delete message;
|
||||
}
|
||||
@@ -329,16 +320,14 @@ void RTLSDRGui::on_startStop_toggled(bool checked)
|
||||
|
||||
void RTLSDRGui::on_record_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (checked) {
|
||||
ui->record->setStyleSheet("QToolButton { background-color : red; }");
|
||||
m_fileSink->startRecording();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ui->record->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||
m_fileSink->stopRecording();
|
||||
}
|
||||
|
||||
RTLSDRInput::MsgFileRecord* message = RTLSDRInput::MsgFileRecord::create(checked);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
}
|
||||
|
||||
void RTLSDRGui::queryDeviceReport()
|
||||
|
||||
Reference in New Issue
Block a user