aboutsummaryrefslogtreecommitdiffstats
path: root/src/etisnoop.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-23 20:33:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-23 20:33:25 +0200
commitaee7b6219270cc87fb90c6b40605c866dcd0f60b (patch)
tree705ff8dad1d6db7d852c5f97548f4f34a199af46 /src/etisnoop.cpp
parent952bd0c6d4749000ab64881dfafd5bc94d73587e (diff)
downloadetisnoop-aee7b6219270cc87fb90c6b40605c866dcd0f60b.tar.gz
etisnoop-aee7b6219270cc87fb90c6b40605c866dcd0f60b.tar.bz2
etisnoop-aee7b6219270cc87fb90c6b40605c866dcd0f60b.zip
Fix decode to .msc for both DAB and DAB+
Diffstat (limited to 'src/etisnoop.cpp')
-rw-r--r--src/etisnoop.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/etisnoop.cpp b/src/etisnoop.cpp
index 92f54fd..600f503 100644
--- a/src/etisnoop.cpp
+++ b/src/etisnoop.cpp
@@ -166,7 +166,7 @@ struct eti_analyse_config_t {
FILE* etifd;
bool ignore_error;
- std::map<int, DabPlusSnoop> streams_to_decode;
+ std::map<int, StreamSnoop> streams_to_decode;
bool analyse_fic_carousel;
bool analyse_fig_rates;
bool analyse_fig_rates_per_second;
@@ -210,7 +210,7 @@ void usage(void)
"Usage: etisnoop [-v] [-f] [-w] [-i filename] [-d stream_index]\n"
"\n"
" -v increase verbosity (can be given more than once)\n"
- " -d N decode subchannel N into .msc and .wav files\n"
+ " -d N decode subchannel N into .msc file and if DAB+, decode to .wav file\n"
" -f analyse FIC carousel\n"
" -r analyse FIG rates in FIGs per second\n"
" -R analyse FIG rates in frames per FIG\n"
@@ -237,8 +237,8 @@ int main(int argc, char *argv[])
case 'd':
{
int subchix = atoi(optarg);
- DabPlusSnoop dps;
- config.streams_to_decode[subchix] = dps;
+ StreamSnoop snoop;
+ config.streams_to_decode[subchix] = snoop;
}
break;
case 'e':
@@ -691,12 +691,8 @@ int eti_analyse(eti_analyse_config_t& config)
}
}
-
- std::map<int, DabPlusSnoop>::iterator it;
- for (it = config.streams_to_decode.begin();
- it != config.streams_to_decode.end();
- ++it) {
- it->second.close();
+ for (auto& snoop : config.streams_to_decode) {
+ snoop.second.close();
}
if (config.decode_watermark) {