mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
SigMF recoding: first implementation of recording with RTLSDR
This commit is contained in:
@@ -21,6 +21,13 @@
|
||||
|
||||
#include "filerecordinterface.h"
|
||||
|
||||
FileRecordInterface::FileRecordInterface() :
|
||||
BasebandSampleSink()
|
||||
{}
|
||||
|
||||
FileRecordInterface::~FileRecordInterface()
|
||||
{}
|
||||
|
||||
QString FileRecordInterface::genUniqueFileName(unsigned int deviceUID, int istream)
|
||||
{
|
||||
if (istream < 0) {
|
||||
@@ -29,3 +36,35 @@ QString FileRecordInterface::genUniqueFileName(unsigned int deviceUID, int istre
|
||||
return QString("rec%1_%2_%3.sdriq").arg(deviceUID).arg(istream).arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddTHH_mm_ss_zzz"));
|
||||
}
|
||||
}
|
||||
|
||||
FileRecordInterface::RecordType FileRecordInterface::guessTypeFromFileName(const QString& fileName, QString& fileBase)
|
||||
{
|
||||
QStringList dotBreakout = fileName.split(QLatin1Char('.'));
|
||||
|
||||
if (dotBreakout.length() > 1)
|
||||
{
|
||||
QString extension = dotBreakout.last();
|
||||
dotBreakout.removeLast();
|
||||
|
||||
if (extension == "sdriq")
|
||||
{
|
||||
fileBase = dotBreakout.join(QLatin1Char('.'));
|
||||
return RecordTypeSdrIQ;
|
||||
}
|
||||
else if (extension == "sigmf-meta")
|
||||
{
|
||||
fileBase = dotBreakout.join(QLatin1Char('.'));
|
||||
return RecordTypeSigMF;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileBase = fileName;
|
||||
return RecordTypeUndefined;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fileBase = fileName;
|
||||
return RecordTypeUndefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user