diff --git a/CMakeLists.txt b/CMakeLists.txt index a14a23653..8dd140d8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,7 +106,7 @@ set(sdrbase_SOURCES sdrbase/dsp/fftwindow.cpp sdrbase/dsp/filterrc.cpp sdrbase/dsp/filtermbe.cpp - sdrbase/dsp/filesink.cpp + sdrbase/dsp/filerecord.cpp sdrbase/dsp/interpolator.cpp sdrbase/dsp/inthalfbandfilter.cpp sdrbase/dsp/lowpass.cpp @@ -191,7 +191,7 @@ set(sdrbase_HEADERS sdrbase/dsp/fftwindow.h sdrbase/dsp/filterrc.h sdrbase/dsp/filtermbe.h - sdrbase/dsp/filesink.h + sdrbase/dsp/filerecord.h sdrbase/dsp/gfft.h sdrbase/dsp/interpolator.h sdrbase/dsp/inthalfbandfilter.h diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index 80f481df8..abadbac4c 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -20,13 +20,15 @@ #include #include "airspygui.h" + +#include + #include "ui_airspygui.h" #include "device/deviceapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" AirspyGui::AirspyGui(DeviceAPI *deviceAPI, QWidget* parent) : QWidget(parent), @@ -54,7 +56,7 @@ AirspyGui::AirspyGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/airspy/airspygui.h b/plugins/samplesource/airspy/airspygui.h index f9bb717f5..738b31e3b 100644 --- a/plugins/samplesource/airspy/airspygui.h +++ b/plugins/samplesource/airspy/airspygui.h @@ -25,7 +25,7 @@ #define AIRSPY_MAX_DEVICE (32) class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class AirspyGui; @@ -61,7 +61,7 @@ private: QTimer m_statusTimer; std::vector m_rates; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/bladerf/bladerfgui.cpp b/plugins/samplesource/bladerf/bladerfgui.cpp index 553058e49..8c049f93d 100644 --- a/plugins/samplesource/bladerf/bladerfgui.cpp +++ b/plugins/samplesource/bladerf/bladerfgui.cpp @@ -25,8 +25,8 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "bladerfgui.h" +#include BladerfGui::BladerfGui(DeviceAPI *deviceAPI, QWidget* parent) : QWidget(parent), @@ -64,7 +64,7 @@ BladerfGui::BladerfGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/bladerf/bladerfgui.h b/plugins/samplesource/bladerf/bladerfgui.h index 425908932..96313c8a5 100644 --- a/plugins/samplesource/bladerf/bladerfgui.h +++ b/plugins/samplesource/bladerf/bladerfgui.h @@ -23,7 +23,7 @@ #include "bladerfinput.h" class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class BladerfGui; @@ -57,7 +57,7 @@ private: QTimer m_statusTimer; std::vector m_gains; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index 7df50dc1a..c3f076a1a 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -22,8 +22,9 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "fcdprogui.h" + +#include #include "fcdproconst.h" FCDProGui::FCDProGui(DeviceAPI *deviceAPI, QWidget* parent) : @@ -145,7 +146,7 @@ FCDProGui::FCDProGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/fcdpro/fcdprogui.h b/plugins/samplesource/fcdpro/fcdprogui.h index 237ea8908..8131ccbb4 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.h +++ b/plugins/samplesource/fcdpro/fcdprogui.h @@ -23,7 +23,7 @@ #include "plugin/plugingui.h" class DeviceAPI; -class FileSink; +class FileRecord; class QWidget; namespace Ui { @@ -58,7 +58,7 @@ private: QTimer m_statusTimer; std::vector m_gains; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index e9284d7ea..3eb23ca65 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -23,8 +23,9 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "fcdproplusgui.h" + +#include #include "fcdproplusconst.h" FCDProPlusGui::FCDProPlusGui(DeviceAPI *deviceAPI, QWidget* parent) : @@ -63,7 +64,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.h b/plugins/samplesource/fcdproplus/fcdproplusgui.h index 52e80d7f1..eca9ec86e 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.h +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.h @@ -23,7 +23,7 @@ #include "plugin/plugingui.h" class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class FCDProPlusGui; @@ -57,7 +57,7 @@ private: QTimer m_statusTimer; std::vector m_gains; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/filesource/filesourceinput.cpp b/plugins/samplesource/filesource/filesourceinput.cpp index 52ded1400..23fbbb0e3 100644 --- a/plugins/samplesource/filesource/filesourceinput.cpp +++ b/plugins/samplesource/filesource/filesourceinput.cpp @@ -21,10 +21,11 @@ #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" -#include "dsp/filesink.h" - #include "filesourcegui.h" #include "filesourceinput.h" + +#include + #include "filesourcethread.h" MESSAGE_CLASS_DEFINITION(FileSourceInput::MsgConfigureFileSource, Message) @@ -101,15 +102,15 @@ void FileSourceInput::openFileStream() m_ifstream.open(m_fileName.toStdString().c_str(), std::ios::binary | std::ios::ate); quint64 fileSize = m_ifstream.tellg(); m_ifstream.seekg(0,std::ios_base::beg); - FileSink::Header header; - FileSink::readHeader(m_ifstream, header); + FileRecord::Header header; + FileRecord::readHeader(m_ifstream, header); m_sampleRate = header.sampleRate; m_centerFrequency = header.centerFrequency; m_startingTimeStamp = header.startTimeStamp; - if (fileSize > sizeof(FileSink::Header)) { - m_recordLength = (fileSize - sizeof(FileSink::Header)) / (4 * m_sampleRate); + if (fileSize > sizeof(FileRecord::Header)) { + m_recordLength = (fileSize - sizeof(FileRecord::Header)) / (4 * m_sampleRate); } else { m_recordLength = 0; } diff --git a/plugins/samplesource/hackrf/hackrfgui.cpp b/plugins/samplesource/hackrf/hackrfgui.cpp index a7c21952d..6de82dd94 100644 --- a/plugins/samplesource/hackrf/hackrfgui.cpp +++ b/plugins/samplesource/hackrf/hackrfgui.cpp @@ -24,8 +24,10 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "hackrfgui.h" + +#include + #include "ui_hackrfgui.h" HackRFGui::HackRFGui(DeviceAPI *deviceAPI, QWidget* parent) : @@ -55,7 +57,7 @@ HackRFGui::HackRFGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/hackrf/hackrfgui.h b/plugins/samplesource/hackrf/hackrfgui.h index 741e3abd3..026b46a85 100644 --- a/plugins/samplesource/hackrf/hackrfgui.h +++ b/plugins/samplesource/hackrf/hackrfgui.h @@ -25,7 +25,7 @@ #define HACKRF_MAX_DEVICE (32) class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class HackRFGui; @@ -65,7 +65,7 @@ private: QTimer m_updateTimer; QTimer m_statusTimer; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 1664650ec..ea3fe6045 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -18,13 +18,15 @@ #include #include "rtlsdrgui.h" + +#include + #include "ui_rtlsdrgui.h" #include "device/deviceapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" RTLSDRGui::RTLSDRGui(DeviceAPI *deviceAPI, QWidget* parent) : QWidget(parent), @@ -57,7 +59,7 @@ RTLSDRGui::RTLSDRGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.h b/plugins/samplesource/rtlsdr/rtlsdrgui.h index 1beb6f07d..d6c533def 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.h +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.h @@ -22,7 +22,7 @@ #include "rtlsdrinput.h" class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class RTLSDRGui; @@ -56,7 +56,7 @@ private: QTimer m_statusTimer; std::vector m_gains; SampleSource* m_sampleSource; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_sampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp index b8a961dc2..2b9f72cca 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp @@ -35,11 +35,11 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "mainwindow.h" #include "util/simpleserializer.h" #include "sdrdaemongui.h" +#include SDRdaemonGui::SDRdaemonGui(DeviceAPI *deviceAPI, QWidget* parent) : QWidget(parent), @@ -98,7 +98,7 @@ SDRdaemonGui::SDRdaemonGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/sdrdaemon/sdrdaemongui.h b/plugins/samplesource/sdrdaemon/sdrdaemongui.h index 02c83a8b9..b44a31b32 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemongui.h +++ b/plugins/samplesource/sdrdaemon/sdrdaemongui.h @@ -24,7 +24,7 @@ #include "sdrdaemoninput.h" class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class SDRdaemonGui; @@ -56,7 +56,7 @@ private: QTimer m_statusTimer; SampleSource* m_sampleSource; bool m_acquisition; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_deviceSampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp b/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp index 72b56f241..8a2942f54 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp @@ -22,10 +22,11 @@ #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" -#include "dsp/filesink.h" - #include "sdrdaemongui.h" #include "sdrdaemoninput.h" + +#include + #include "sdrdaemonudphandler.h" MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgConfigureSDRdaemonUDPLink, Message) diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp index 65e5b8b38..af8199a74 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp @@ -35,11 +35,11 @@ #include "gui/glspectrum.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" -#include "dsp/filesink.h" #include "mainwindow.h" #include "util/simpleserializer.h" #include "sdrdaemonfecgui.h" +#include SDRdaemonFECGui::SDRdaemonFECGui(DeviceAPI *deviceAPI, QWidget* parent) : QWidget(parent), @@ -96,7 +96,7 @@ SDRdaemonFECGui::SDRdaemonFECGui(DeviceAPI *deviceAPI, QWidget* parent) : char recFileNameCStr[30]; sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID()); - m_fileSink = new FileSink(std::string(recFileNameCStr)); + m_fileSink = new FileRecord(std::string(recFileNameCStr)); m_deviceAPI->addSink(m_fileSink); connect(m_deviceAPI->getDeviceOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection); diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.h b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.h index 85b20d01c..1618cceab 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.h +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.h @@ -24,7 +24,7 @@ #include "sdrdaemonfecinput.h" class DeviceAPI; -class FileSink; +class FileRecord; namespace Ui { class SDRdaemonFECGui; @@ -56,7 +56,7 @@ private: QTimer m_statusTimer; SampleSource* m_sampleSource; bool m_acquisition; - FileSink *m_fileSink; //!< File sink to record device I/Q output + FileRecord *m_fileSink; //!< File sink to record device I/Q output int m_deviceSampleRate; quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecinput.cpp b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecinput.cpp index e7c89faea..d74163a77 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecinput.cpp +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecinput.cpp @@ -22,10 +22,10 @@ #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" -#include "dsp/filesink.h" - #include "sdrdaemonfecinput.h" +#include + #include "sdrdaemonfecgui.h" #include "sdrdaemonfecudphandler.h" diff --git a/sdrbase/dsp/filesink.cpp b/sdrbase/dsp/filerecord.cpp similarity index 79% rename from sdrbase/dsp/filesink.cpp rename to sdrbase/dsp/filerecord.cpp index c1c27bf5d..c19377313 100644 --- a/sdrbase/dsp/filesink.cpp +++ b/sdrbase/dsp/filerecord.cpp @@ -1,11 +1,11 @@ -#include "dsp/filesink.h" +#include #include "dsp/dspcommands.h" #include "util/simpleserializer.h" #include "util/message.h" #include -FileSink::FileSink() : +FileRecord::FileRecord() : SampleSink(), m_fileName(std::string("test.sdriq")), m_sampleRate(0), @@ -17,7 +17,7 @@ FileSink::FileSink() : setObjectName("FileSink"); } -FileSink::FileSink(const std::string& filename) : +FileRecord::FileRecord(const std::string& filename) : SampleSink(), m_fileName(std::string(filename)), m_sampleRate(0), @@ -29,12 +29,12 @@ FileSink::FileSink(const std::string& filename) : setObjectName("FileSink"); } -FileSink::~FileSink() +FileRecord::~FileRecord() { stopRecording(); } -void FileSink::setFileName(const std::string& filename) +void FileRecord::setFileName(const std::string& filename) { if (!m_recordOn) { @@ -42,7 +42,7 @@ void FileSink::setFileName(const std::string& filename) } } -void FileSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly) +void FileRecord::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly) { // if no recording is active, send the samples to /dev/null if(!m_recordOn) @@ -61,16 +61,16 @@ void FileSink::feed(const SampleVector::const_iterator& begin, const SampleVecto } } -void FileSink::start() +void FileRecord::start() { } -void FileSink::stop() +void FileRecord::stop() { stopRecording(); } -void FileSink::startRecording() +void FileRecord::startRecording() { if (!m_sampleFile.is_open()) { @@ -82,7 +82,7 @@ void FileSink::startRecording() } } -void FileSink::stopRecording() +void FileRecord::stopRecording() { if (m_sampleFile.is_open()) { @@ -93,7 +93,7 @@ void FileSink::stopRecording() } } -bool FileSink::handleMessage(const Message& message) +bool FileRecord::handleMessage(const Message& message) { qDebug() << "FileSink::handleMessage"; @@ -112,7 +112,7 @@ bool FileSink::handleMessage(const Message& message) } } -void FileSink::handleConfigure(const std::string& fileName) +void FileRecord::handleConfigure(const std::string& fileName) { if (fileName != m_fileName) { @@ -122,7 +122,7 @@ void FileSink::handleConfigure(const std::string& fileName) m_fileName = fileName; } -void FileSink::writeHeader() +void FileRecord::writeHeader() { m_sampleFile.write((const char *) &m_sampleRate, sizeof(int)); m_sampleFile.write((const char *) &m_centerFrequency, sizeof(quint64)); @@ -130,7 +130,7 @@ void FileSink::writeHeader() m_sampleFile.write((const char *) &ts, sizeof(std::time_t)); } -void FileSink::readHeader(std::ifstream& sampleFile, Header& header) +void FileRecord::readHeader(std::ifstream& sampleFile, Header& header) { sampleFile.read((char *) &(header.sampleRate), sizeof(int)); sampleFile.read((char *) &(header.centerFrequency), sizeof(quint64)); diff --git a/sdrbase/dsp/filesink.h b/sdrbase/dsp/filerecord.h similarity index 88% rename from sdrbase/dsp/filesink.h rename to sdrbase/dsp/filerecord.h index 95ec72b05..12dbcf815 100644 --- a/sdrbase/dsp/filesink.h +++ b/sdrbase/dsp/filerecord.h @@ -11,7 +11,7 @@ class Message; -class SDRANGEL_API FileSink : public SampleSink { +class SDRANGEL_API FileRecord : public SampleSink { public: struct Header @@ -21,9 +21,9 @@ public: std::time_t startTimeStamp; }; - FileSink(); - FileSink(const std::string& filename); - virtual ~FileSink(); + FileRecord(); + FileRecord(const std::string& filename); + virtual ~FileRecord(); quint64 getByteCount() const { return m_byteCount; } diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index 16a651364..030f5a7a6 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -47,7 +47,7 @@ SOURCES += mainwindow.cpp\ dsp/fftwindow.cpp\ dsp/filterrc.cpp\ dsp/filtermbe.cpp\ - dsp/filesink.cpp\ + dsp/filerecord.cpp\ dsp/interpolator.cpp\ dsp/inthalfbandfilter.cpp\ dsp/lowpass.cpp\ @@ -122,7 +122,7 @@ HEADERS += mainwindow.h\ dsp/fftwindow.h\ dsp/filterrc.h\ dsp/filtermbe.h\ - dsp/filesink.h\ + dsp/filerecord.h\ dsp/gfft.h\ dsp/interpolator.h\ dsp/inthalfbandfilter.h\