aboutsummaryrefslogtreecommitdiffstats
path: root/src/EtiReader.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-05-20 16:14:33 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-05-20 16:14:33 +0200
commit5ebfab9364d4315394a136732fd464ffe2229588 (patch)
treed586170ffd92a123fb45979e89a5c0b4e2fa0890 /src/EtiReader.cpp
parentd9ef93e7e8cc94da627f39f3c443b9a845ccecf4 (diff)
downloaddabmod-5ebfab9364d4315394a136732fd464ffe2229588.tar.gz
dabmod-5ebfab9364d4315394a136732fd464ffe2229588.tar.bz2
dabmod-5ebfab9364d4315394a136732fd464ffe2229588.zip
Improve timestamp handling
Replace PPS representation from double to integer, and analyse in OutputUHD if the timestamp is as expected.
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r--src/EtiReader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp
index 16272e3..067d6d0 100644
--- a/src/EtiReader.cpp
+++ b/src/EtiReader.cpp
@@ -287,7 +287,7 @@ bool EtiReader::sourceContainsTimestamp()
/* See ETS 300 799, Annex C.2.2 */
}
-double EtiReader::getPPSOffset()
+uint32_t EtiReader::getPPSOffset()
{
if (!sourceContainsTimestamp()) {
//fprintf(stderr, "****** SOURCE NO TS\n");
@@ -296,8 +296,7 @@ double EtiReader::getPPSOffset()
uint32_t timestamp = ntohl(eti_tist.TIST) & 0xFFFFFF;
//fprintf(stderr, "****** TIST 0x%x\n", timestamp);
- double pps = timestamp / 16384000.0; // seconds
- return pps;
+ return timestamp;
}