Merge branch 'master' into multistream
This commit is contained in:
commit
dadf53f99d
|
@ -83,6 +83,7 @@ std::string load_monitor_sql =
|
|||
"`SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, "
|
||||
"`FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`,"
|
||||
"`RTSPServer`, `RTSPStreamName`,"
|
||||
"`ONVIF_URL`, `ONVIF_Username`, `ONVIF_Password`, `ONVIF_Options`,"
|
||||
"`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors`";
|
||||
|
||||
std::string CameraType_Strings[] = {
|
||||
|
@ -446,6 +447,7 @@ Monitor::Monitor()
|
|||
"SectionLength, MinSectionLength, FrameSkip, MotionFrameSkip, "
|
||||
"FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, Exif,"
|
||||
"`RTSPServer`,`RTSPStreamName`,
|
||||
"`ONVIF_URL`, `ONVIF_Username`, `ONVIF_Password`, `ONVIF_Options`,"
|
||||
"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors";
|
||||
*/
|
||||
|
||||
|
@ -622,6 +624,13 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
|
|||
rtsp_server = (*dbrow[col] != '0'); col++;
|
||||
rtsp_streamname = dbrow[col]; col++;
|
||||
|
||||
onvif_url = std::string(dbrow[col] ? dbrow[col] : ""); col++;
|
||||
onvif_username = std::string(dbrow[col] ? dbrow[col] : ""); col++;
|
||||
onvif_password = std::string(dbrow[col] ? dbrow[col] : ""); col++;
|
||||
onvif_options = std::string(dbrow[col] ? dbrow[col] : ""); col++;
|
||||
|
||||
importance = dbrow[col] ? atoi(dbrow[col]) : 0;// col++;
|
||||
|
||||
/*"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */
|
||||
signal_check_points = atoi(dbrow[col]); col++;
|
||||
signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++;
|
||||
|
@ -633,7 +642,6 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
|
|||
blue_val = BLUE_VAL_BGRA(signal_check_colour);
|
||||
grayscale_val = signal_check_colour & 0xff; /* Clear all bytes but lowest byte */
|
||||
|
||||
importance = dbrow[col] ? atoi(dbrow[col]) : 0;// col++;
|
||||
if (importance < 0) importance = 0; // Should only be >= 0
|
||||
|
||||
// How many frames we need to have before we start analysing
|
||||
|
|
|
@ -306,6 +306,11 @@ protected:
|
|||
std::string path;
|
||||
std::string second_path;
|
||||
|
||||
std::string onvif_url;
|
||||
std::string onvif_username;
|
||||
std::string onvif_password;
|
||||
std::string onvif_options;
|
||||
|
||||
std::string device;
|
||||
int palette;
|
||||
int channel;
|
||||
|
@ -608,6 +613,11 @@ public:
|
|||
std::string GetAudioFifoPath() const { return shared_data ? shared_data->audio_fifo_path : ""; };
|
||||
std::string GetRTSPStreamName() const { return rtsp_streamname; };
|
||||
|
||||
const std::string &getONVIF_URL() const { return onvif_url; };
|
||||
const std::string &getONVIF_Username() const { return onvif_username; };
|
||||
const std::string &getONVIF_Password() const { return onvif_password; };
|
||||
const std::string &getONVIF_Options() const { return onvif_options; };
|
||||
|
||||
int GetImage(int32_t index=-1, int scale=100);
|
||||
ZMPacket *getSnapshot( int index=-1 ) const;
|
||||
SystemTimePoint GetTimestamp(int index = -1) const;
|
||||
|
|
Loading…
Reference in New Issue