mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
commit
251b93f97a
@ -308,7 +308,7 @@ bool AirspyInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -325,7 +325,7 @@ bool AirspyHFInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -280,7 +280,7 @@ bool BladerfInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -250,7 +250,7 @@ bool FCDProInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -244,7 +244,7 @@ bool FCDProPlusInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -263,7 +263,7 @@ bool HackRFInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -692,7 +692,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -197,7 +197,7 @@ bool PerseusInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -195,7 +195,7 @@ bool PlutoSDRInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -309,7 +309,7 @@ bool RTLSDRInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -190,7 +190,7 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -304,7 +304,7 @@ bool SDRPlayInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -182,7 +182,7 @@ bool TestSourceInput::handleMessage(const Message& message)
|
||||
if (m_settings.m_fileRecordName.size() != 0) {
|
||||
m_fileSink->setFileName(m_settings.m_fileRecordName);
|
||||
} else {
|
||||
m_fileSink->setFileName(QString("rec%1_%2.sdriq").arg(m_deviceAPI->getDeviceUID()).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddThhmmss")));
|
||||
m_fileSink->genUniqueFileName(m_deviceAPI->getDeviceUID());
|
||||
}
|
||||
|
||||
m_fileSink->startRecording();
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "util/message.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDateTime>
|
||||
|
||||
FileRecord::FileRecord() :
|
||||
BasebandSampleSink(),
|
||||
@ -42,6 +43,11 @@ void FileRecord::setFileName(const QString& filename)
|
||||
}
|
||||
}
|
||||
|
||||
void FileRecord::genUniqueFileName(uint deviceUID)
|
||||
{
|
||||
setFileName(QString("rec%1_%2.sdriq").arg(deviceUID).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddTHH_mm_ss_zzz")));
|
||||
}
|
||||
|
||||
void FileRecord::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused)))
|
||||
{
|
||||
// if no recording is active, send the samples to /dev/null
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
quint64 getByteCount() const { return m_byteCount; }
|
||||
|
||||
void setFileName(const QString& filename);
|
||||
void genUniqueFileName(uint deviceUID);
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
virtual void start();
|
||||
|
Loading…
Reference in New Issue
Block a user