Add loading wallclock setting from db and provide accessor function

wallclock_timestamps
Isaac Connor 2024-07-06 17:20:31 -04:00
parent 716a7bae61
commit cbe0c7c9e2
2 changed files with 5 additions and 0 deletions

View File

@ -223,6 +223,7 @@ Monitor::Monitor() :
output_container(""),
imagePixFormat(AV_PIX_FMT_NONE),
record_audio(false),
wallclock_timestamps(false),
//event_prefix
//label_format
label_coord(Vector2(0,0)),
@ -549,6 +550,8 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
col++;
record_audio = (*dbrow[col] != '0');
col++;
wallclock_timestamps = (*dbrow[col] != '0');
col++;
/* "Brightness, Contrast, Hue, Colour, " */
brightness = atoi(dbrow[col]);

View File

@ -464,6 +464,7 @@ class Monitor : public std::enable_shared_from_this<Monitor> {
std::string output_container;
_AVPIXELFORMAT imagePixFormat;
bool record_audio; // Whether to store the audio that we receive
bool wallclock_timestamps; // Whether to use wallclock pts/dts instead of values from ffmpeg
int output_source_stream;
@ -758,6 +759,7 @@ class Monitor : public std::enable_shared_from_this<Monitor> {
inline double Longitude() const { return shared_data ? shared_data->longitude : longitude; }
inline bool RTSPServer() const { return rtsp_server; }
inline bool RecordAudio() const { return record_audio; }
inline bool WallClockTimestamps() const { return wallclock_timestamps; }
/*
inline Purpose Purpose() { return purpose };