kopia lustrzana https://github.com/f4exb/sdrangel
Refactoring: removed device parameter from all start() methods in sample source plugins
rodzic
1e086fb303
commit
b8623c90ce
|
@ -127,7 +127,7 @@ bool AirspyInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AirspyInput::start(int device)
|
||||
bool AirspyInput::start()
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
AirspyInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~AirspyInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -113,7 +113,7 @@ bool BladerfInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BladerfInput::start(int device)
|
||||
bool BladerfInput::start()
|
||||
{
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
BladerfInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~BladerfInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -73,7 +73,7 @@ bool FCDProInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool FCDProInput::start(int device)
|
||||
bool FCDProInput::start()
|
||||
{
|
||||
qDebug() << "FCDProInput::start";
|
||||
|
||||
|
@ -85,19 +85,6 @@ bool FCDProInput::start(int device)
|
|||
|
||||
if (m_running) stop();
|
||||
|
||||
// if (m_FCDThread)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// m_dev = fcdOpen(fcd_traits<Pro>::vendorId, fcd_traits<Pro>::productId, device);
|
||||
//
|
||||
// if (m_dev == 0)
|
||||
// {
|
||||
// qCritical("FCDProInput::start: could not open FCD");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/* Apply settings before streaming to avoid bus contention;
|
||||
* there is very little spare bandwidth on a full speed USB device.
|
||||
* Failure is harmless if no device is found
|
||||
|
@ -147,8 +134,6 @@ void FCDProInput::stop()
|
|||
}
|
||||
|
||||
m_running = false;
|
||||
// fcdClose(m_dev);
|
||||
// m_dev = 0;
|
||||
}
|
||||
|
||||
const QString& FCDProInput::getDeviceDescription() const
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
FCDProInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~FCDProInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -66,7 +66,7 @@ bool FCDProPlusInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool FCDProPlusInput::start(int device)
|
||||
bool FCDProPlusInput::start()
|
||||
{
|
||||
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
FCDProPlusInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~FCDProPlusInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -140,7 +140,7 @@ void FileSourceInput::seekFileStream(int seekPercentage)
|
|||
}
|
||||
}
|
||||
|
||||
bool FileSourceInput::start(int device)
|
||||
bool FileSourceInput::start()
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
qDebug() << "FileSourceInput::start";
|
||||
|
|
|
@ -212,7 +212,7 @@ public:
|
|||
FileSourceInput(const QTimer& masterTimer);
|
||||
virtual ~FileSourceInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -99,7 +99,7 @@ bool HackRFInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool HackRFInput::start(int device)
|
||||
bool HackRFInput::start()
|
||||
{
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
if (!m_dev) {
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
HackRFInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~HackRFInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -108,7 +108,7 @@ void LimeSDRInput::closeDevice()
|
|||
m_deviceParams.m_dev = 0;
|
||||
}
|
||||
|
||||
bool LimeSDRInput::start(int device)
|
||||
bool LimeSDRInput::start()
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
LimeSDRInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~LimeSDRInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -148,7 +148,7 @@ bool RTLSDRInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RTLSDRInput::start(int device) // TODO: remove device parameter
|
||||
bool RTLSDRInput::start()
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
RTLSDRInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~RTLSDRInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -63,7 +63,7 @@ SDRdaemonInput::~SDRdaemonInput()
|
|||
delete m_SDRdaemonUDPHandler;
|
||||
}
|
||||
|
||||
bool SDRdaemonInput::start(int device)
|
||||
bool SDRdaemonInput::start()
|
||||
{
|
||||
qDebug() << "SDRdaemonInput::start";
|
||||
MsgConfigureSDRdaemonWork *command = MsgConfigureSDRdaemonWork::create(true);
|
||||
|
|
|
@ -277,7 +277,7 @@ public:
|
|||
SDRdaemonInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI);
|
||||
virtual ~SDRdaemonInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -61,7 +61,7 @@ SDRdaemonFECInput::~SDRdaemonFECInput()
|
|||
delete m_SDRdaemonUDPHandler;
|
||||
}
|
||||
|
||||
bool SDRdaemonFECInput::start(int device)
|
||||
bool SDRdaemonFECInput::start()
|
||||
{
|
||||
qDebug() << "SDRdaemonInput::start";
|
||||
MsgConfigureSDRdaemonWork *command = MsgConfigureSDRdaemonWork::create(true);
|
||||
|
|
|
@ -261,7 +261,7 @@ public:
|
|||
SDRdaemonFECInput(const QTimer& masterTimer, DeviceSourceAPI *deviceAPI);
|
||||
virtual ~SDRdaemonFECInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -94,7 +94,7 @@ bool SDRPlayInput::openDevice()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SDRPlayInput::start(int device)
|
||||
bool SDRPlayInput::start()
|
||||
{
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
int res;
|
||||
|
@ -213,7 +213,7 @@ bool SDRPlayInput::handleMessage(const Message& message)
|
|||
{
|
||||
m_settings = settings;
|
||||
stop();
|
||||
start(m_devNumber);
|
||||
start();
|
||||
}
|
||||
// standard changes
|
||||
else
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
SDRPlayInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~SDRPlayInput();
|
||||
|
||||
virtual bool start(int device);
|
||||
virtual bool start();
|
||||
virtual void stop();
|
||||
|
||||
virtual const QString& getDeviceDescription() const;
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
DeviceSampleSource();
|
||||
virtual ~DeviceSampleSource();
|
||||
|
||||
virtual bool start(int device) = 0;
|
||||
virtual bool start() = 0;
|
||||
virtual void stop() = 0;
|
||||
|
||||
virtual const QString& getDeviceDescription() const = 0;
|
||||
|
|
|
@ -449,7 +449,7 @@ DSPDeviceSourceEngine::State DSPDeviceSourceEngine::gotoRunning()
|
|||
|
||||
// Start everything
|
||||
|
||||
if(!m_deviceSampleSource->start(m_sampleSourceSequence))
|
||||
if(!m_deviceSampleSource->start())
|
||||
{
|
||||
return gotoError("Could not start sample source");
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue