summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 12:18:30 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 12:18:30 +0100
commit7ab5c97051108d9d752896798efe0886573e730e (patch)
tree143ceda74b21ca519bd099395d8f4c6455d000b5
parent7512c84d0cd7d9b1a3733e84280864f5a989b51e (diff)
downloaddabmux-7ab5c97051108d9d752896798efe0886573e730e.tar.gz
dabmux-7ab5c97051108d9d752896798efe0886573e730e.tar.bz2
dabmux-7ab5c97051108d9d752896798efe0886573e730e.zip
Remove dabInputTest
-rw-r--r--configure.ac14
-rw-r--r--src/ConfigParser.cpp7
-rw-r--r--src/DabMux.cpp1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/dabInputTest.cpp105
-rw-r--r--src/dabInputTest.h50
-rw-r--r--src/utils.cpp3
7 files changed, 4 insertions, 177 deletions
diff --git a/configure.ac b/configure.ac
index 06a2249..47523de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,12 +115,6 @@ AC_ARG_ENABLE([input_file],
AS_IF([test "x$enable_input_file" = "xyes"],
[AC_DEFINE(HAVE_INPUT_FILE, [1], [Define if FILE input is enabled])])
-# TEST
-AC_ARG_ENABLE([input_test],
- [AS_HELP_STRING([--enable-input-test], [Enable TEST input])],
- [], [enable_input_test=no])
-AS_IF([test "x$enable_input_test" = "xyes"],
- [AC_DEFINE(HAVE_INPUT_TEST, [1], [Define if TEST input is enabled])])
# UDP
AC_ARG_ENABLE([input_udp],
[AS_HELP_STRING([--enable-input-udp], [Enable UDP input])],
@@ -246,12 +240,12 @@ echo
echo "Inputs:"
enabled="prbs"
disabled=""
-for output in test udp fifo file
+for input in udp fifo file
do
- eval var=\$enable_input_$output
+ eval var=\$enable_input_$input
AS_IF([test "x$var" = "xyes"],
- [enabled="$enabled $output"],
- [disabled="$disabled $output"])
+ [enabled="$enabled $input"],
+ [disabled="$disabled $input"])
done
echo " Enabled: $enabled"
echo " Disabled: $disabled"
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index aee86fc..d5c55ae 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -60,7 +60,6 @@
#include "dabInputEnhancedPacketFile.h"
#include "dabInputEnhancedFifo.h"
#include "dabInputUdp.h"
-#include "dabInputTest.h"
#include "dabInputPrbs.h"
#include "dabInputRawFile.h"
#include "dabInputRawFifo.h"
@@ -742,12 +741,6 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan,
subchan->type = subchannel_type_t::DataDmb;
subchan->bitrate = DEFAULT_DATA_BITRATE;
-#if defined(HAVE_INPUT_TEST) && defined(HAVE_FORMAT_RAW)
- } else if (type == "test") {
- subchan->type = subchannel_type_t::DataDmb;
- subchan->bitrate = DEFAULT_DATA_BITRATE;
- operations = dabInputTestOperations;
-#endif // defined(HAVE_INPUT_TEST)) && defined(HAVE_FORMAT_RAW)
#ifdef HAVE_FORMAT_PACKET
} else if (type == "packet") {
subchan->type = subchannel_type_t::Packet;
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index a4605e7..79a8573 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -104,7 +104,6 @@ typedef DWORD32 uint32_t;
#include "dabInputEnhancedPacketFile.h"
#include "dabInputEnhancedFifo.h"
#include "dabInputUdp.h"
-#include "dabInputTest.h"
#include "dabInputPrbs.h"
#include "dabInputRawFile.h"
#include "dabInputRawFifo.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index b23e71c..408c86e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -62,7 +62,6 @@ odr_dabmux_SOURCES =DabMux.cpp DabMux.h \
dabInputPrbs.h dabInputPrbs.cpp \
dabInputRawFile.h dabInputRawFile.cpp \
dabInputRawFifo.h dabInputRawFifo.cpp \
- dabInputTest.h dabInputTest.cpp \
dabInputUdp.h dabInputUdp.cpp \
dabInputZmq.h dabInputZmq.cpp \
dabOutput/dabOutput.h \
diff --git a/src/dabInputTest.cpp b/src/dabInputTest.cpp
deleted file mode 100644
index fd4fc59..0000000
--- a/src/dabInputTest.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- Copyright (C) 2009 Her Majesty the Queen in Right of Canada (Communications
- Research Center Canada)
- */
-/*
- This file is part of ODR-DabMux.
-
- ODR-DabMux is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- ODR-DabMux is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "dabInputTest.h"
-
-#include <string.h>
-#ifdef _WIN32
-#else
-# include <arpa/inet.h>
-#endif
-
-
-#ifdef HAVE_FORMAT_RAW
-# ifdef HAVE_INPUT_TEST
-
-
-struct dabInputTestData {
- unsigned long counter;
-};
-
-
-struct dabInputOperations dabInputTestOperations = {
- dabInputTestInit,
- dabInputTestOpen,
- NULL,
- NULL,
- NULL,
- NULL,
- dabInputTestRead,
- dabInputTestSetbitrate,
- dabInputTestClose,
- dabInputTestClean,
- NULL
-};
-
-
-int dabInputTestInit(void** args)
-{
- dabInputTestData* input = new dabInputTestData;
- memset(input, 0, sizeof(*input));
- input->counter = 0;
- *args = input;
- return 0;
-}
-
-
-int dabInputTestOpen(void* args, const char* inputName)
-{
- return 0;
-}
-
-
-int dabInputTestRead(dabInputOperations* ops, void* args, void* buffer, int size)
-{
- dabInputTestData* input = (dabInputTestData*)args;
- char* data = (char*)buffer;
-
- *((long*)buffer) = htonl(input->counter++);
- for (int i = sizeof(input->counter); i < size; ++i) {
- data[i] = i;
- }
- return size;
-}
-
-
-int dabInputTestSetbitrate(dabInputOperations* ops, void* args, int bitrate)
-{
- return bitrate;
-}
-
-
-int dabInputTestClose(void* args)
-{
- return 0;
-}
-
-
-int dabInputTestClean(void** args)
-{
- dabInputTestData* input = (dabInputTestData*)(*args);
- delete input;
- return 0;
-}
-
-
-# endif
-#endif
diff --git a/src/dabInputTest.h b/src/dabInputTest.h
deleted file mode 100644
index 34ebc05..0000000
--- a/src/dabInputTest.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- Copyright (C) 2009 Her Majesty the Queen in Right of Canada (Communications
- Research Center Canada)
- */
-/*
- This file is part of ODR-DabMux.
-
- ODR-DabMux is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- ODR-DabMux is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DAB_INPUT_TEST_H
-#define DAB_INPUT_TEST_H
-
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include "dabInput.h"
-
-
-#ifdef HAVE_FORMAT_RAW
-# ifdef HAVE_INPUT_TEST
-
-
-extern struct dabInputOperations dabInputTestOperations;
-
-int dabInputTestInit(void** args);
-int dabInputTestOpen(void* args, const char* inputName);
-int dabInputTestRead(dabInputOperations* ops, void* args, void* buffer, int size);
-int dabInputTestSetbitrate(dabInputOperations* ops, void* args, int bitrate);
-int dabInputTestClose(void* args);
-int dabInputTestClean(void** args);
-
-
-# endif
-#endif
-
-
-#endif // DAB_INPUT_TEST_H
diff --git a/src/utils.cpp b/src/utils.cpp
index 5e7cf7a..e26389d 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -103,9 +103,6 @@ void header_message()
std::cerr << "Input URLs supported:" << std::endl <<
" prbs" <<
-#if defined(HAVE_INPUT_TEST)
- " test" <<
-#endif
#if defined(HAVE_INPUT_UDP)
" udp" <<
#endif