aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-31 18:00:08 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-31 18:00:08 +0200
commit905d2a6fdd5a0b6f0e75060a14ba8309da5db5bc (patch)
tree89619a192b184d752eda16f87cf64c148356aa3a
parent0992bfd07fd810079e8124fa03261d2a3cdbe080 (diff)
downloadetisnoop-905d2a6fdd5a0b6f0e75060a14ba8309da5db5bc.tar.gz
etisnoop-905d2a6fdd5a0b6f0e75060a14ba8309da5db5bc.tar.bz2
etisnoop-905d2a6fdd5a0b6f0e75060a14ba8309da5db5bc.zip
Minor printout improvements
-rw-r--r--dabplussnoop.cpp7
-rw-r--r--dabplussnoop.h1
-rw-r--r--etiinput.cpp1
-rw-r--r--etisnoop.cpp8
4 files changed, 11 insertions, 6 deletions
diff --git a/dabplussnoop.cpp b/dabplussnoop.cpp
index aed155a..2728a21 100644
--- a/dabplussnoop.cpp
+++ b/dabplussnoop.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014 Matthias P. Braendli (http://www.opendigitalradio.org)
+ Copyright (C) 2014, 2015 Matthias P. Braendli (http://www.opendigitalradio.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ bool DabPlusSnoop::seek_valid_firecode()
{
if (m_data.size() < 10) {
// Not enough data
- return -1;
+ return false;
}
bool crc_ok = false;
@@ -269,7 +269,8 @@ bool DabPlusSnoop::extract_au(vector<int> au_start)
if (calc_crc != au_crc) {
printf(DPS_INDENT DPS_PREFIX
- "Erroneous CRC for au %zu\n", au);
+ "Erroneous CRC for au %zu: 0x%04x vs 0x%04x\n",
+ au, calc_crc, au_crc);
all_crc_ok = false;
}
diff --git a/dabplussnoop.h b/dabplussnoop.h
index 7d7ee04..33b8746 100644
--- a/dabplussnoop.h
+++ b/dabplussnoop.h
@@ -117,6 +117,7 @@ class DabPlusSnoop
int m_mpeg_surround_config;
/* Functions */
+
bool seek_valid_firecode(void);
bool decode(void);
bool extract_au(std::vector<int> au_start);
diff --git a/etiinput.cpp b/etiinput.cpp
index ea3241f..fda9a90 100644
--- a/etiinput.cpp
+++ b/etiinput.cpp
@@ -158,6 +158,7 @@ int identify_eti_format(FILE* inputFile, int *streamType)
}
}
+ (void)nbframes_; // suppress warning "nbframes_ unused"
fprintf(stderr, "Bad input file format!\n");
return -1;
}
diff --git a/etisnoop.cpp b/etisnoop.cpp
index d1f75ad..2e7447e 100644
--- a/etisnoop.cpp
+++ b/etisnoop.cpp
@@ -936,6 +936,8 @@ int eti_analyse(eti_analyse_config_t& config)
printbuf(sdesc, 1, NULL, 0);
fib = p + 12 + 4*nst;
for(int i = 0; i < ficl*4/32; i++) {
+ sprintf(sdesc, "FIB %d", i);
+ printbuf(sdesc, 1, NULL, 0);
fig=fib;
figs.set_fib(i);
endmarker=0;
@@ -964,11 +966,11 @@ int eti_analyse(eti_analyse_config_t& config)
}
crc =~ crc;
if (crc == figcrc)
- sprintf(sdesc,"FIB CRC OK");
+ sprintf(sdesc, "FIB %d CRC OK", i);
else
- sprintf(sdesc,"FIB CRC Mismatch: %02x",crc);
+ sprintf(sdesc, "FIB %d CRC Mismatch: %02x", i, crc);
- printbuf("FIB CRC",3,fib+30,2,sdesc);
+ printbuf(sdesc,3,fib+30,2);
fib += 32;
}