summaryrefslogtreecommitdiffstats
path: root/src/EtiReader.h
diff options
context:
space:
mode:
authorMatthias P. Braendli (think) <matthias@mpb.li>2012-09-13 22:42:47 +0200
committerMatthias P. Braendli (think) <matthias@mpb.li>2012-09-13 22:42:47 +0200
commit47c823ac611c54ae8ce3af2da40f9db0ec9b9195 (patch)
tree669e233651e50ef3ce84df314cde9e7c0f3a7bf3 /src/EtiReader.h
parent95db3fa1e516aefa239f0dbe06bcda674e57b6a1 (diff)
downloaddabmod-47c823ac611c54ae8ce3af2da40f9db0ec9b9195.tar.gz
dabmod-47c823ac611c54ae8ce3af2da40f9db0ec9b9195.tar.bz2
dabmod-47c823ac611c54ae8ce3af2da40f9db0ec9b9195.zip
crc-dabmod: much cleaner logging implementation
Diffstat (limited to 'src/EtiReader.h')
-rw-r--r--src/EtiReader.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/EtiReader.h b/src/EtiReader.h
index 5f4897b..5833a25 100644
--- a/src/EtiReader.h
+++ b/src/EtiReader.h
@@ -31,6 +31,7 @@
#include "Eti.h"
+#include "Log.h"
#include "FicSource.h"
#include "SubchannelSource.h"
#include "TimestampDecoder.h"
@@ -42,23 +43,8 @@
class EtiReader
{
-protected:
- void sync();
- int state;
- uint32_t nb_frames;
- uint16_t framesize;
- eti_SYNC eti_sync;
- eti_FC eti_fc;
- std::vector<eti_STC> eti_stc;
- eti_EOH eti_eoh;
- eti_EOF eti_eof;
- eti_TIST eti_tist;
- FicSource* myFicSource;
- std::vector<SubchannelSource*> mySources;
- TimestampDecoder* myTimestampDecoder;
-
public:
- EtiReader(struct modulator_offset_config& modconf);
+ EtiReader(struct modulator_offset_config& modconf, Logger& logger);
virtual ~EtiReader();
EtiReader(const EtiReader&);
EtiReader& operator=(const EtiReader&);
@@ -81,9 +67,26 @@ public:
bool sourceContainsTimestamp();
protected:
+ /* Main program logger */
+ Logger& myLogger;
+
/* Transform the ETI TIST to a PPS offset in ms */
double getPPSOffset();
+ void sync();
+ int state;
+ uint32_t nb_frames;
+ uint16_t framesize;
+ eti_SYNC eti_sync;
+ eti_FC eti_fc;
+ std::vector<eti_STC> eti_stc;
+ eti_EOH eti_eoh;
+ eti_EOF eti_eof;
+ eti_TIST eti_tist;
+ FicSource* myFicSource;
+ std::vector<SubchannelSource*> mySources;
+ TimestampDecoder* myTimestampDecoder;
+
private:
size_t myCurrentFrame;
bool time_ext_enabled;