summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMux.cpp11
-rw-r--r--src/Makefile.am10
-rw-r--r--src/utils.cpp16
3 files changed, 10 insertions, 27 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 89bb38b..cf1f70c 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -321,18 +321,15 @@ int main(int argc, char *argv[])
bool MNSC_increment_time = false;
- /* TODO Okay, this is clearly not the nicest way to handle the two
- * ways of defining the ensemble, but it works.
- */
- if (strncmp(basename(argv[0]), "CRC-DabMux-cfg", 16) == 0) {
+ if (strncmp(argv[1], "-e", 2) == 0) { // use external config file
try {
- if (argc != 2) {
- printUsageConfigfile(argv[0]);
+ if (argc != 3) {
+ printUsage(argv[0], stderr);
goto EXIT;
}
- string conf_file = argv[1];
+ string conf_file = argv[2];
parse_configfile(conf_file, outputs, ensemble, &enableTist, &FICL,
&factumAnalyzer, &limit);
diff --git a/src/Makefile.am b/src/Makefile.am
index f439f2e..db584b0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,13 +91,3 @@ CRC_BridgeTest_CFLAGS =-DBRIDGE_TEST
CRC_BridgeTest_SOURCES =bridge.c \
crc.c crc.h
-CRC-DabMux-cfg: CRC-DabMux
- @echo "Copying CRC-DabMux to CRC-DabMux-cfg that reads ensemble config file"
- cp CRC-DabMux CRC-DabMux-cfg
-
-.PHONY: CRC-DabMux-cfg
-
-all: CRC-DabMux-cfg all-am
-
-clean-local:
- rm -f CRC-DabMux-cfg
diff --git a/src/utils.cpp b/src/utils.cpp
index 76f891f..705d0cb 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -124,6 +124,11 @@ void printUsage(char *name, FILE* out)
fprintf(out, "NAME\n");
fprintf(out, " %s - A software DAB multiplexer\n", name);
fprintf(out, "\nSYNOPSYS\n");
+ fprintf(out, " You can use either a configuration file, or the command line arguments\n");
+ fprintf(out, " With external configuration file:\n");
+ fprintf(out, " %s -e configuration.mux\n", name);
+ fprintf(out, " See doc/example.config for an example format for the configuration file\n");
+ fprintf(out, " With command line arguments:\n");
fprintf(out, " %s"
" [ensemble]"
" [subchannel1 subchannel2 ...]"
@@ -170,7 +175,7 @@ void printUsage(char *name, FILE* out)
"\n");
fprintf(out, "\nDESCRIPTION\n");
fprintf(out,
- " %s is a software multiplexer that generates an ETI stream from\n"
+ " %s is a software multiplexer that generates an ETI stream from\n"
" audio and data streams. Because of its software based architecture,\n"
" many typical DAB services can be generated and multiplexed on a single\n"
" PC platform with live or pre-recorded sources.\n"
@@ -269,15 +274,6 @@ void printUsage(char *name, FILE* out)
);
}
-void printUsageConfigfile(char *name, FILE* out)
-{
- fprintf(out, "NAME\n");
- fprintf(out, " %s - A software DAB multiplexer\n", name);
- fprintf(out, "\nSYNOPSYS\n");
- fprintf(out, " %s configfile\n\n", name);
- fprintf(out, "See doc/example.config for an example format for the configuration file");
-}
-
void printOutputs(vector<dabOutput*>& outputs)
{
vector<dabOutput*>::const_iterator output;