aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMod.cpp7
-rw-r--r--src/EtiReader.cpp5
-rw-r--r--src/EtiReader.h8
-rw-r--r--src/Utils.cpp3
4 files changed, 18 insertions, 5 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index d28e755..78393bd 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -3,7 +3,7 @@
Her Majesty the Queen in Right of Canada (Communications Research
Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -279,6 +279,7 @@ int launch_modulator(int argc, char* argv[])
set_thread_name("modulator");
if (mod_settings.inputTransport == "edi") {
+#ifdef HAVE_EDI
EdiReader ediReader(mod_settings.tist_offset_s);
EdiDecoder::ETIDecoder ediInput(ediReader, false);
if (mod_settings.edi_max_delay_ms > 0.0f) {
@@ -323,6 +324,10 @@ int launch_modulator(int argc, char* argv[])
rcs.check_faults();
}
}
+#else
+ throw std::runtime_error("Unable to open input: "
+ "EDI input transport selected, but not compiled in!");
+#endif // HAVE_EDI
}
else {
shared_ptr<InputReader> inputReader;
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp
index 17f4953..a28deb2 100644
--- a/src/EtiReader.cpp
+++ b/src/EtiReader.cpp
@@ -2,7 +2,7 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
the Queen in Right of Canada (Communications Research Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -304,6 +304,7 @@ uint32_t EtiReader::getPPSOffset()
return timestamp;
}
+#ifdef HAVE_EDI
EdiReader::EdiReader(
double& tist_offset_s) :
m_timestamp_decoder(tist_offset_s)
@@ -569,4 +570,4 @@ bool EdiUdpInput::rxPacket()
return false;
}
}
-
+#endif // HAVE_EDI
diff --git a/src/EtiReader.h b/src/EtiReader.h
index 8270592..eb97e3b 100644
--- a/src/EtiReader.h
+++ b/src/EtiReader.h
@@ -2,7 +2,7 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
the Queen in Right of Canada (Communications Research Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -37,7 +37,9 @@
#include "SubchannelSource.h"
#include "TimestampDecoder.h"
#include "lib/edi/ETIDecoder.hpp"
-#include "lib/UdpSocket.h"
+#ifdef HAVE_EDI
+# include "lib/UdpSocket.h"
+#endif
#include "ThreadsafeQueue.h"
#include <vector>
@@ -108,6 +110,7 @@ private:
std::vector<std::shared_ptr<SubchannelSource> > mySources;
};
+#ifdef HAVE_EDI
/* The EdiReader extracts the necessary data using the EDI input library in
* lib/edi
*/
@@ -203,4 +206,5 @@ class EdiUdpInput {
UdpReceiver m_udp_rx;
EdiDecoder::ETIDecoder& m_decoder;
};
+#endif
diff --git a/src/Utils.cpp b/src/Utils.cpp
index b4816d3..eab4c7b 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -46,6 +46,9 @@ static void printHeader()
#if defined(HAVE_ZEROMQ)
"zeromq " <<
#endif
+#ifdef HAVE_EDI
+ "EDI " <<
+#endif
#if defined(HAVE_OUTPUT_UHD)
"output_uhd " <<
#endif