diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-17 10:25:20 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-17 10:25:20 +0100 |
commit | 4f7636694a752fa8c652c684a3c9ebf1488ceaa4 (patch) | |
tree | 159a5682a287fcb2ddd64d01c3e4dfc82bb5bb74 /src/TimestampDecoder.h | |
parent | d5db57bf0290133450b7cd10525532415076bf0e (diff) | |
download | dabmod-4f7636694a752fa8c652c684a3c9ebf1488ceaa4.tar.gz dabmod-4f7636694a752fa8c652c684a3c9ebf1488ceaa4.tar.bz2 dabmod-4f7636694a752fa8c652c684a3c9ebf1488ceaa4.zip |
Cosmetics for TimestampDecoder
Diffstat (limited to 'src/TimestampDecoder.h')
-rw-r--r-- | src/TimestampDecoder.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h index ff52e4c..1a13394 100644 --- a/src/TimestampDecoder.h +++ b/src/TimestampDecoder.h @@ -26,14 +26,11 @@ #pragma once -#include <queue> +#include <cstdint> #include <memory> #include <string> -#include <time.h> #include <math.h> #include <stdio.h> -#include "Eti.h" -#include "Log.h" #include "RemoteControl.h" struct frame_timestamp @@ -55,16 +52,14 @@ struct frame_timestamp this->timestamp_sec += lrintf(offset_secs); this->timestamp_pps += lrintf(offset_pps * 16384000.0); - while (this->timestamp_pps >= 16384000) - { + while (this->timestamp_pps >= 16384000) { this->timestamp_pps -= 16384000; this->timestamp_sec += 1; - }; + } return *this; } - const frame_timestamp operator+(const double diff) - { + const frame_timestamp operator+(const double diff) { frame_timestamp ts = *this; ts += diff; return ts; @@ -86,8 +81,7 @@ struct frame_timestamp return ns; } - void print(const char* t) - { + void print(const char* t) const { fprintf(stderr, "%s <frame_timestamp(%s, %d, %.9f, %d)>\n", t, this->timestamp_valid ? "valid" : "invalid", |