diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-05-21 18:58:42 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-05-21 18:58:42 +0200 |
commit | e6544091a297623b62964a9028579351a664bf68 (patch) | |
tree | 4659b5f069cc55f60a1de93f406c73235e13818f /src/ParserCmdline.cpp | |
parent | d60b36afc30460f070f25dd8ee8d52b556ea8790 (diff) | |
download | dabmux-e6544091a297623b62964a9028579351a664bf68.tar.gz dabmux-e6544091a297623b62964a9028579351a664bf68.tar.bz2 dabmux-e6544091a297623b62964a9028579351a664bf68.zip |
Replace subchannel id by enum
Diffstat (limited to 'src/ParserCmdline.cpp')
-rw-r--r-- | src/ParserCmdline.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ParserCmdline.cpp b/src/ParserCmdline.cpp index 13523f2..b393091 100644 --- a/src/ParserCmdline.cpp +++ b/src/ParserCmdline.cpp @@ -217,13 +217,13 @@ bool parse_cmdline(char **argv, #if defined(HAVE_INPUT_FILE) && defined(HAVE_FORMAT_MPEG) } else if (c == 'A') { (*subchannel)->inputProto = "file"; - (*subchannel)->type = 0; + (*subchannel)->type = Audio; (*subchannel)->bitrate = 0; operations = dabInputMpegFileOperations; #endif // defined(HAVE_INPUT_FILE) && defined(HAVE_FORMAT_MPEG) #if defined(HAVE_FORMAT_DABPLUS) } else if (c == 'F') { - (*subchannel)->type = 0; + (*subchannel)->type = Audio; (*subchannel)->bitrate = 32; char* proto; @@ -307,19 +307,19 @@ bool parse_cmdline(char **argv, goto EXIT; } - (*subchannel)->type = 1; + (*subchannel)->type = DataDmb; (*subchannel)->bitrate = DEFAULT_DATA_BITRATE; #if defined(HAVE_INPUT_TEST) && defined(HAVE_FORMAT_RAW) } else if (c == 'T') { (*subchannel)->inputProto = "test"; - (*subchannel)->type = 1; + (*subchannel)->type = DataDmb; (*subchannel)->bitrate = DEFAULT_DATA_BITRATE; operations = dabInputTestOperations; #endif // defined(HAVE_INPUT_TEST)) && defined(HAVE_FORMAT_RAW) #ifdef HAVE_FORMAT_PACKET } else if (c == 'P') { (*subchannel)->inputProto = "file"; - (*subchannel)->type = 3; + (*subchannel)->type = Packet; (*subchannel)->bitrate = DEFAULT_PACKET_BITRATE; #ifdef HAVE_INPUT_FILE operations = dabInputPacketFileOperations; @@ -331,7 +331,7 @@ bool parse_cmdline(char **argv, #ifdef HAVE_FORMAT_EPM } else if (c == 'E') { (*subchannel)->inputProto = "file"; - (*subchannel)->type = 3; + (*subchannel)->type = Packet; (*subchannel)->bitrate = DEFAULT_PACKET_BITRATE; operations = dabInputEnhancedPacketFileOperations; #endif // defined(HAVE_FORMAT_EPM) @@ -360,7 +360,7 @@ bool parse_cmdline(char **argv, goto EXIT; } - (*subchannel)->type = 1; + (*subchannel)->type = DataDmb; (*subchannel)->bitrate = DEFAULT_DATA_BITRATE; #endif } else { @@ -514,7 +514,7 @@ bool parse_cmdline(char **argv, } switch ((*subchannel)->type) { #ifdef HAVE_FORMAT_PACKET - case 3: + case Packet: if ( ((DabInputCompatible*)(*subchannel)->input)->getOpts() == dabInputPacketFileOperations) { operations = dabInputFifoOperations; #ifdef HAVE_FORMAT_EPM @@ -532,7 +532,7 @@ bool parse_cmdline(char **argv, break; #endif // defined(HAVE_FORMAT_PACKET) #ifdef HAVE_FORMAT_MPEG - case 0: + case Audio: if ( ((DabInputCompatible*)(*subchannel)->input)->getOpts() == dabInputMpegFileOperations) { operations = dabInputMpegFifoOperations; } else if (((DabInputCompatible*)(*subchannel)->input)->getOpts() == |