summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-03 08:12:29 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-03 08:12:29 +0200
commit93cb9dc6d1492ac2ed58c24a016b579813177a13 (patch)
treebc57b3c9b23f3e46d9fb8ef6832604a1f9da7cce
parentf99c4f75d7c1ffc18e3d04167e854af3d571f1b1 (diff)
downloaddabmux-93cb9dc6d1492ac2ed58c24a016b579813177a13.tar.gz
dabmux-93cb9dc6d1492ac2ed58c24a016b579813177a13.tar.bz2
dabmux-93cb9dc6d1492ac2ed58c24a016b579813177a13.zip
Add EDI option to ./configure
-rw-r--r--configure.ac7
-rw-r--r--src/DabMultiplexer.cpp8
-rw-r--r--src/DabMux.cpp4
3 files changed, 12 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index d4cf923..cd34dd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,11 @@ AS_IF([test "x$enable_output_zeromq" = "xyes"],
AC_CHECK_LIB(zmq, zmq_init, [true], [AC_MSG_ERROR([ZeroMQ libzmq is required])]))
AS_IF([test "x$enable_output_zeromq" = "xyes"],
AC_DEFINE(HAVE_OUTPUT_ZEROMQ, [1], [Define if ZeroMQ output is enabled]))
+# EDI
+AC_ARG_ENABLE([output_edi],
+ AS_HELP_STRING([--enable-output-edi], [Enable EDI output]))
+AS_IF([test "x$enable_output_edi" = "xyes"],
+ [AC_DEFINE(HAVE_OUTPUT_EDI, [1], [Define if EDI output is enabled])])
# Link against lzmq
AM_CONDITIONAL([HAVE_ZEROMQ_TEST],
@@ -289,7 +294,7 @@ echo
echo "Outputs:"
enabled=""
disabled=""
-for output in file fifo udp tcp raw simul zeromq
+for output in file fifo udp tcp raw simul zeromq edi
do
eval var=\$enable_output_$output
AS_IF([test "x$var" = "xyes"],
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index 5c41d99..71a8b4b 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -181,7 +181,7 @@ void DabMultiplexer::prepare()
*/
gettimeofday(&mnsc_time, NULL);
-#if ENABLE_EDI
+#if HAVE_OUTPUT_EDI
// Defaults for edi
edi_conf.enabled = db.get_numeric("output.edi.enabled", 0) == 1;
if (edi_conf.enabled) {
@@ -191,7 +191,7 @@ void DabMultiplexer::prepare()
edi_conf.dump = db.get_numeric("output.edi.dump") == 1;
edi_conf.enable_pft = db.get_numeric("output.edi.enable_pft") == 1;
}
-#endif // ENABLE_EDI
+#endif // HAVE_OUTPUT_EDI
}
@@ -1708,7 +1708,7 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu
dumpBytes(dumpData, sizeSubChannel, stderr);
#endif // DUMP_BRIDGE
-#if ENABLE_EDI
+#if HAVE_OUTPUT_EDI
/**********************************************************************
*********** Finalise and send EDI ********************************
**********************************************************************/
@@ -1777,7 +1777,7 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu
std::copy(edi_afpacket.begin(), edi_afpacket.end(), debug_iterator);
}
}
-#endif // ENABLE_EDI
+#endif // HAVE_OUTPUT_EDI
if (currentFrame % 100 == 0) {
etiLog.log(info, "ETI frame number %i Time: %d, no TIST\n",
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 560cf65..a8f674b 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -316,7 +316,7 @@ int main(int argc, char *argv[])
}
if (outputuid == "edi") {
-#if ENABLE_EDI
+#if HAVE_OUTPUT_EDI
ptree pt_edi = pt_outputs.get_child("edi");
edi->enabled = true;
@@ -417,7 +417,7 @@ int main(int argc, char *argv[])
etiLog.log(info, "--- Output list ---");
printOutputs(outputs);
-#if ENABLE_EDI
+#if HAVE_OUTPUT_EDI
if (edi_conf.enabled) {
etiLog.level(warn) << "EXPERIMENTAL EDI OUTPUT ENABLED!";
etiLog.level(info) << "edi to " << edi_conf.dest_addr << ":" << edi_conf.dest_port;