81 virtual bool setSize(uint16_t width, uint16_t height);
82 virtual bool open(
const char *filename,
char *errmsg);
85 virtual bool writeFrame(
const uint8_t *frame, uint32_t nbytes, uint64_t timestamp);
113 void dateTo64BitTS(int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second,
114 int32_t microsec, uint64_t *p_ts);
116 uint64_t getUTCTimeStamp();
117 uint64_t getLocalTimeStamp();
121 static bool is_leap_year(uint32_t year);
124 static const uint64_t m_sepaseconds_per_microsecond = 10;
128 static const uint64_t m_septaseconds_per_day = m_septaseconds_per_hour * 24;
129 static const uint32_t m_days_in_400_years = 303 * 365 + 97 * 366;
130 static const uint64_t m_septaseconds_per_400_years = m_days_in_400_years * m_septaseconds_per_day;
132 uint8_t *jpegBuffer =
nullptr;