1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 20:01:46 -05:00

Server: added DSD demod plugin

This commit is contained in:
f4exb 2018-05-29 00:33:27 +02:00
parent f11cda633d
commit 9b42dd1bfa
3 changed files with 80 additions and 0 deletions

View File

@ -20,7 +20,9 @@
#include <device/devicesourceapi.h>
#include <QtPlugin>
#include "plugin/pluginapi.h"
#ifndef SERVER_MODE
#include "dsddemodgui.h"
#endif
#include "dsddemod.h"
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
@ -51,10 +53,19 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this);
}
#ifdef SERVER_MODE
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(
DeviceUISet *deviceUISet __attribute__((unused)),
BasebandSampleSink *rxChannel __attribute__((unused)))
{
return 0;
}
#else
PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
{
return DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
}
#endif
BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
{

View File

@ -2,4 +2,5 @@ project(demod)
add_subdirectory(demodam)
add_subdirectory(demodbfm)
add_subdirectory(demoddsd)
add_subdirectory(demodnfm)

View File

@ -0,0 +1,68 @@
project(dsddemod)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(PLUGIN_PREFIX "../../../plugins/channelrx/demoddsd")
set(dsddemod_SOURCES
${PLUGIN_PREFIX}/dsddemod.cpp
${PLUGIN_PREFIX}/dsddemodplugin.cpp
${PLUGIN_PREFIX}/dsddemodbaudrates.cpp
${PLUGIN_PREFIX}/dsddemodsettings.cpp
${PLUGIN_PREFIX}/dsddecoder.cpp
)
set(dsddemod_HEADERS
${PLUGIN_PREFIX}/dsddemod.h
${PLUGIN_PREFIX}/dsddemodplugin.h
${PLUGIN_PREFIX}/dsddemodbaudrates.h
${PLUGIN_PREFIX}/dsddemodsettings.h
${PLUGIN_PREFIX}/dsddecoder.h
)
if (BUILD_DEBIAN)
include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${LIBDSDCCSRC}
${LIBMBELIBSRC}
)
else (BUILD_DEBIAN)
include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${LIBDSDCC_INCLUDE_DIR}
${LIBMBE_INCLUDE_DIR}
)
endif (BUILD_DEBIAN)
#include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_SHARED)
add_library(demoddsdsrv SHARED
${dsddemod_SOURCES}
${dsddemod_HEADERS_MOC}
)
if (BUILD_DEBIAN)
target_link_libraries(demoddsdsrv
${QT_LIBRARIES}
sdrbase
dsdcc
mbelib
)
else (BUILD_DEBIAN)
target_link_libraries(demoddsdsrv
${QT_LIBRARIES}
sdrbase
${LIBDSDCC_LIBRARIES}
${LIBMBE_LIBRARY}
)
endif (BUILD_DEBIAN)
qt5_use_modules(demoddsdsrv Core)
install(TARGETS demoddsdsrv DESTINATION lib/pluginssrv/channelrx)