summaryrefslogtreecommitdiffstats
path: root/src/ParserConfigfile.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-21 18:58:42 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-21 18:58:42 +0200
commite6544091a297623b62964a9028579351a664bf68 (patch)
tree4659b5f069cc55f60a1de93f406c73235e13818f /src/ParserConfigfile.cpp
parentd60b36afc30460f070f25dd8ee8d52b556ea8790 (diff)
downloaddabmux-e6544091a297623b62964a9028579351a664bf68.tar.gz
dabmux-e6544091a297623b62964a9028579351a664bf68.tar.bz2
dabmux-e6544091a297623b62964a9028579351a664bf68.zip
Replace subchannel id by enum
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r--src/ParserConfigfile.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 1302c11..7a990a3 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -568,7 +568,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
if (0) {
#if defined(HAVE_FORMAT_MPEG)
} else if (type == "audio") {
- subchan->type = 0;
+ subchan->type = Audio;
subchan->bitrate = 0;
char* proto;
@@ -643,7 +643,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
#endif // defined(HAVE_INPUT_FILE) && defined(HAVE_FORMAT_MPEG)
#if defined(HAVE_FORMAT_DABPLUS)
} else if (type == "dabplus") {
- subchan->type = 0;
+ subchan->type = Audio;
subchan->bitrate = 32;
char* proto;
@@ -780,19 +780,19 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
throw runtime_error(ss.str());
}
- subchan->type = 1;
+ subchan->type = DataDmb;
subchan->bitrate = DEFAULT_DATA_BITRATE;
#if defined(HAVE_INPUT_TEST) && defined(HAVE_FORMAT_RAW)
} else if (type == "test") {
subchan->inputProto = "test";
- subchan->type = 1;
+ subchan->type = 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->inputProto = "file";
- subchan->type = 3;
+ subchan->type = Packet;
subchan->bitrate = DEFAULT_PACKET_BITRATE;
#ifdef HAVE_INPUT_FILE
operations = dabInputPacketFileOperations;
@@ -804,7 +804,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
#ifdef HAVE_FORMAT_EPM
} else if (type == "enhancedpacked") {
subchan->inputProto = "file";
- subchan->type = 3;
+ subchan->type = Packet;
subchan->bitrate = DEFAULT_PACKET_BITRATE;
operations = dabInputEnhancedPacketFileOperations;
#endif // defined(HAVE_FORMAT_EPM)
@@ -833,7 +833,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
throw runtime_error(ss.str());
}
- subchan->type = 1;
+ subchan->type = DataDmb;
subchan->bitrate = DEFAULT_DATA_BITRATE;
#endif
} else {