whitespace/tabs

This commit is contained in:
Isaac Connor 2016-04-29 09:11:14 -04:00
parent b41a3b1b25
commit 819dad455e
4 changed files with 1977 additions and 1977 deletions

View File

@ -49,23 +49,23 @@ class Monitor;
//
class Event
{
friend class EventStream;
friend class EventStream;
protected:
protected:
static bool initialised;
static char capture_file_format[PATH_MAX];
static char analyse_file_format[PATH_MAX];
static char general_file_format[PATH_MAX];
static char video_file_format[PATH_MAX];
protected:
protected:
static int sd;
public:
public:
typedef std::set<std::string> StringSet;
typedef std::map<std::string,StringSet> StringSetMap;
protected:
protected:
typedef enum { NORMAL, BULK, ALARM } FrameType;
struct PreAlarmData
@ -79,7 +79,7 @@ protected:
static int pre_alarm_count;
static PreAlarmData pre_alarm_data[MAX_PRE_ALARM_FRAMES];
protected:
protected:
unsigned int id;
Monitor *monitor;
struct timeval start_time;
@ -99,10 +99,10 @@ protected:
char timecodes_name[PATH_MAX];
char timecodes_file[PATH_MAX];
protected:
protected:
int last_db_frame;
protected:
protected:
static void Initialise()
{
if ( initialised )
@ -118,11 +118,11 @@ protected:
void createNotes( std::string &notes );
public:
public:
static bool OpenFrameSocket( int );
static bool ValidateFrameSocket( int );
public:
public:
Event( Monitor *p_monitor, struct timeval p_start_time, const std::string &p_cause, const StringSetMap &p_noteSetMap, bool p_videoEvent=false );
~Event();
@ -144,10 +144,10 @@ public:
void AddFrames( int n_frames, Image **images, struct timeval **timestamps );
void AddFrame( Image *image, struct timeval timestamp, int score=0, Image *alarm_frame=NULL );
private:
private:
void AddFramesInternal( int n_frames, int start_frame, Image **images, struct timeval **timestamps );
public:
public:
static const char *getSubPath( struct tm *time )
{
static char subpath[PATH_MAX] = "";
@ -163,7 +163,7 @@ public:
return video_file;
}
public:
public:
static int PreAlarmCount()
{
return( pre_alarm_count );
@ -204,10 +204,10 @@ public:
class EventStream : public StreamBase
{
public:
public:
typedef enum { MODE_SINGLE, MODE_ALL, MODE_ALL_GAPLESS } StreamMode;
protected:
protected:
struct FrameData {
//unsigned long id;
time_t timestamp;
@ -230,22 +230,22 @@ protected:
char video_file[PATH_MAX];
};
protected:
protected:
static const int STREAM_PAUSE_WAIT = 250000; // Microseconds
static const StreamMode DEFAULT_MODE = MODE_SINGLE;
protected:
protected:
StreamMode mode;
bool forceEventChange;
protected:
protected:
int curr_frame_id;
double curr_stream_time;
EventData *event_data;
protected:
protected:
bool loadEventData( int event_id );
bool loadInitialEventData( int init_event_id, unsigned int init_frame_id );
bool loadInitialEventData( int monitor_id, time_t event_time );
@ -254,7 +254,7 @@ protected:
void processCommand( const CmdMsg *msg );
bool sendFrame( int delta_us );
public:
public:
EventStream()
{
mode = DEFAULT_MODE;

View File

@ -48,9 +48,9 @@
//
class Monitor
{
friend class MonitorStream;
friend class MonitorStream;
public:
public:
typedef enum
{
QUERY=0,
@ -87,7 +87,7 @@ public:
TAPE
} State;
protected:
protected:
typedef std::set<Zone *> ZoneSet;
typedef enum { GET_SETTINGS=0x1, SET_SETTINGS=0x2, RELOAD=0x4, SUSPEND=0x10, RESUME=0x20 } Action;
@ -218,7 +218,7 @@ protected:
bool hasAlarmed();
};
protected:
protected:
// These are read from the DB and thereafter remain unchanged
unsigned int id;
char name[64];
@ -325,9 +325,9 @@ protected:
int n_linked_monitors;
MonitorLink **linked_monitors;
public:
// OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info.
//bool OurCheckAlarms( Zone *zone, const Image *pImage );
public:
// OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info.
//bool OurCheckAlarms( Zone *zone, const Image *pImage );
Monitor(
int p_id,
const char *p_name,
@ -505,36 +505,36 @@ public:
#define MOD_ADD( var, delta, limit ) (((var)+(limit)+(delta))%(limit))
class MonitorStream : public StreamBase {
protected:
protected:
typedef struct SwapImage {
bool valid;
struct timeval timestamp;
char file_name[PATH_MAX];
} SwapImage;
private:
private:
SwapImage *temp_image_buffer;
int temp_image_buffer_count;
int temp_read_index;
int temp_write_index;
protected:
protected:
time_t ttl;
protected:
protected:
int playback_buffer;
bool delayed;
int frame_count;
protected:
protected:
bool checkSwapPath( const char *path, bool create_path );
bool sendFrame( const char *filepath, struct timeval *timestamp );
bool sendFrame( Image *image, struct timeval *timestamp );
void processCommand( const CmdMsg *msg );
public:
public:
MonitorStream() : playback_buffer( 0 ), delayed( false ), frame_count( 0 ) {
}
void setStreamBuffer( int p_playback_buffer ) {