mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-25 05:38:39 -04:00
Server: added SDRplay input plugin
This commit is contained in:
parent
ae4ce39126
commit
213d19eb42
plugins/samplesource/sdrplay
pluginssrv/samplesource
@ -27,7 +27,6 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include <dsp/filerecord.h>
|
||||
#include "sdrplaygui.h"
|
||||
#include "sdrplayinput.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
|
@ -15,11 +15,14 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QAction>
|
||||
#include <mirisdr.h>
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#ifdef SERVER_MODE
|
||||
#include "sdrplayinput.h"
|
||||
#else
|
||||
#include "sdrplaygui.h"
|
||||
#endif
|
||||
#include "sdrplayplugin.h"
|
||||
#include <device/devicesourceapi.h>
|
||||
|
||||
@ -87,6 +90,15 @@ PluginInterface::SamplingDevices SDRPlayPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId __attribute((unused)),
|
||||
QWidget **widget __attribute((unused)),
|
||||
DeviceUISet *deviceUISet __attribute((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PluginInstanceGUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
@ -103,6 +115,7 @@ PluginInstanceGUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DeviceSampleSource *SDRPlayPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
|
@ -69,6 +69,14 @@ if(CM256CC_FOUND AND LIBNANOMSG_FOUND)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
endif(CM256CC_FOUND AND LIBNANOMSG_FOUND)
|
||||
|
||||
find_package(LibMiriSDR)
|
||||
if(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
add_subdirectory(sdrplay)
|
||||
message(STATUS "LibMiriSDR found")
|
||||
else(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
message(STATUS "LibMiriSDR NOT found")
|
||||
endif(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
add_subdirectory(airspy)
|
||||
add_subdirectory(airspyhf)
|
||||
@ -79,7 +87,8 @@ if (BUILD_DEBIAN)
|
||||
add_subdirectory(rtlsdr)
|
||||
if (LIBNANOMSG_FOUND)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
endif (LIBNANOMSG_FOUND)
|
||||
endif (LIBNANOMSG_FOUND)
|
||||
add_subdirectory(sdrplay)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
add_subdirectory(filesource)
|
||||
|
63
pluginssrv/samplesource/sdrplay/CMakeLists.txt
Normal file
63
pluginssrv/samplesource/sdrplay/CMakeLists.txt
Normal file
@ -0,0 +1,63 @@
|
||||
project(sdrplay)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/samplesource/sdrplay")
|
||||
|
||||
set(sdrplay_SOURCES
|
||||
${PLUGIN_PREFIX}/sdrplayinput.cpp
|
||||
${PLUGIN_PREFIX}/sdrplayplugin.cpp
|
||||
${PLUGIN_PREFIX}/sdrplaysettings.cpp
|
||||
${PLUGIN_PREFIX}/sdrplaythread.cpp
|
||||
)
|
||||
|
||||
set(sdrplay_HEADERS
|
||||
${PLUGIN_PREFIX}/sdrplayinput.h
|
||||
${PLUGIN_PREFIX}/sdrplayplugin.h
|
||||
${PLUGIN_PREFIX}/sdrplaysettings.h
|
||||
${PLUGIN_PREFIX}/sdrplaythread.h
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBMIRISDRSRC}/include
|
||||
${LIBMIRISDRSRC}/src
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBMIRISDR_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
add_library(inputsdrplaysrv SHARED
|
||||
${sdrplay_SOURCES}
|
||||
${sdrplay_HEADERS_MOC}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrplaysrv
|
||||
${QT_LIBRARIES}
|
||||
mirisdr
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrplaysrv
|
||||
${QT_LIBRARIES}
|
||||
${LIBMIRISDR_LIBRARIES}
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
qt5_use_modules(inputsdrplaysrv Core)
|
||||
|
||||
install(TARGETS inputsdrplaysrv DESTINATION lib/pluginssrv/samplesource)
|
Loading…
Reference in New Issue
Block a user