53 #define SYSTEM_CLOCK_FREQUENCY 27000000
54 #define SYSTEM_CLOCK_FREQUENCY_90 90000
56 #include "system/compat/SystemCompat.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::system::compat;
73 struct timeval clockRef;
77 virtual void refreshStcSample();
83 static int timevalSubtract(
84 struct timeval *result,
88 static uint64_t baseExtToStc(uint64_t base, uint64_t ext);
89 static uint64_t stcToBase(uint64_t stc);
90 static uint64_t stcToExt(uint64_t stc);
91 static double stcToSecond(uint64_t stc);
92 static double baseToSecond(uint64_t base);
93 static uint64_t secondToStc(
double seconds);
94 static uint64_t secondToBase(
double seconds);
96 uint64_t getReference();
97 void setReference(uint64_t pcr);
98 void setReference(uint64_t base, uint64_t ext);
100 uint64_t getStcBase();
101 uint64_t getStcExt();
102 double getBaseToSecond();