From 6ca04402bfc6f24758d3dc4f0649ecdc2223202d Mon Sep 17 00:00:00 2001 From: Mr-Dave Date: Sun, 15 Jan 2023 17:45:32 -0700 Subject: [PATCH] Revise from ctx_cam to ctx_dev --- src/alg.cpp | 40 ++--- src/alg.hpp | 14 +- src/alg_sec.cpp | 44 +++--- src/alg_sec.hpp | 6 +- src/conf.cpp | 340 ++++++++++++++++++++--------------------- src/conf.hpp | 10 +- src/dbse.cpp | 4 +- src/dbse.hpp | 4 +- src/draw.cpp | 12 +- src/draw.hpp | 12 +- src/event.cpp | 54 +++---- src/event.hpp | 6 +- src/exif.cpp | 2 +- src/exif.hpp | 2 +- src/jpegutils.cpp | 6 +- src/jpegutils.hpp | 4 +- src/libcam.cpp | 10 +- src/libcam.hpp | 12 +- src/motion_loop.cpp | 84 +++++----- src/motion_loop.hpp | 2 +- src/motionplus.cpp | 8 +- src/motionplus.hpp | 4 +- src/movie.cpp | 8 +- src/movie.hpp | 6 +- src/netcam.cpp | 14 +- src/netcam.hpp | 6 +- src/picture.cpp | 24 +-- src/picture.hpp | 14 +- src/rotate.cpp | 6 +- src/rotate.hpp | 6 +- src/util.cpp | 8 +- src/util.hpp | 6 +- src/video_loopback.cpp | 2 +- src/video_loopback.hpp | 2 +- src/video_v4l2.cpp | 58 +++---- src/video_v4l2.hpp | 6 +- src/webu.hpp | 2 +- src/webu_json.cpp | 2 +- src/webu_post.cpp | 4 +- src/webu_stream.cpp | 16 +- src/webu_stream.hpp | 6 +- 41 files changed, 438 insertions(+), 438 deletions(-) diff --git a/src/alg.cpp b/src/alg.cpp index 3242968f..0bed8d96 100644 --- a/src/alg.cpp +++ b/src/alg.cpp @@ -39,7 +39,7 @@ typedef struct { } Segment; -void alg_noise_tune(ctx_cam *cam) +void alg_noise_tune(ctx_dev *cam) { ctx_images *imgs = &cam->imgs; int i; @@ -78,7 +78,7 @@ void alg_noise_tune(ctx_cam *cam) cam->noise = 4 + (cam->noise + sum) / 2; } -void alg_threshold_tune(ctx_cam *cam) +void alg_threshold_tune(ctx_dev *cam) { int i, top; int sum = 0; @@ -197,7 +197,7 @@ static int alg_iflood(int x, int y, int width, int height, return count; } -static int alg_labeling(ctx_cam *cam) +static int alg_labeling(ctx_dev *cam) { ctx_images *imgs = &cam->imgs; unsigned char *out = imgs->image_motion.image_norm; @@ -502,7 +502,7 @@ static int alg_erode5(unsigned char *img, int width, int height, void *buffer, u return sum; } -static void alg_despeckle(ctx_cam *cam) +static void alg_despeckle(ctx_dev *cam) { int diffs, width, height, done, i, len; unsigned char *out, *common_buffer; @@ -571,7 +571,7 @@ static void alg_despeckle(ctx_cam *cam) return; } -void alg_tune_smartmask(ctx_cam *cam) +void alg_tune_smartmask(ctx_dev *cam) { int i, diff; int motionsize = cam->imgs.motionsize; @@ -620,7 +620,7 @@ void alg_tune_smartmask(ctx_cam *cam) /* Increment for *smartmask_buffer in alg_diff_standard. */ #define SMARTMASK_SENSITIVITY_INCR 5 -static void alg_diff_nomask(ctx_cam *cam) +static void alg_diff_nomask(ctx_dev *cam) { unsigned char *ref = cam->imgs.ref; unsigned char *out = cam->imgs.image_motion.image_norm; @@ -661,7 +661,7 @@ static void alg_diff_nomask(ctx_cam *cam) } -static void alg_diff_mask(ctx_cam *cam) +static void alg_diff_mask(ctx_dev *cam) { unsigned char *ref = cam->imgs.ref; unsigned char *out = cam->imgs.image_motion.image_norm; @@ -709,7 +709,7 @@ static void alg_diff_mask(ctx_cam *cam) } -static void alg_diff_smart(ctx_cam *cam) +static void alg_diff_smart(ctx_dev *cam) { unsigned char *ref = cam->imgs.ref; @@ -767,7 +767,7 @@ static void alg_diff_smart(ctx_cam *cam) } } -static void alg_diff_masksmart(ctx_cam *cam) +static void alg_diff_masksmart(ctx_dev *cam) { unsigned char *ref = cam->imgs.ref; unsigned char *out = cam->imgs.image_motion.image_norm; @@ -834,7 +834,7 @@ static void alg_diff_masksmart(ctx_cam *cam) } -static bool alg_diff_fast(ctx_cam *cam) +static bool alg_diff_fast(ctx_dev *cam) { ctx_images *imgs = &cam->imgs; int i, curdiff, diffs = 0; @@ -867,7 +867,7 @@ static bool alg_diff_fast(ctx_cam *cam) return false; } -static void alg_diff_standard(ctx_cam *cam) +static void alg_diff_standard(ctx_dev *cam) { if (cam->smartmask_speed == 0) { @@ -886,7 +886,7 @@ static void alg_diff_standard(ctx_cam *cam) } -static void alg_lightswitch(ctx_cam *cam) +static void alg_lightswitch(ctx_dev *cam) { if (cam->conf->lightswitch_percent >= 1 && !cam->lost_connection) { @@ -914,7 +914,7 @@ static void alg_lightswitch(ctx_cam *cam) * action - UPDATE_REF_FRAME or RESET_REF_FRAME * */ -void alg_update_reference_frame(ctx_cam *cam, int action) +void alg_update_reference_frame(ctx_dev *cam, int action) { int accept_timer = cam->lastrate * cam->conf->static_object_time; int i, threshold_ref; @@ -968,7 +968,7 @@ void alg_update_reference_frame(ctx_cam *cam, int action) } /*Copy in new reference frame*/ -void alg_new_update_frame(ctx_cam *cam) +void alg_new_update_frame(ctx_dev *cam) { /* There used to be a lot more to this function before.....*/ @@ -977,7 +977,7 @@ void alg_new_update_frame(ctx_cam *cam) } /*Calculate the center location of changes*/ -static void alg_location_center(ctx_cam *cam) +static void alg_location_center(ctx_dev *cam) { int width = cam->imgs.width; int height = cam->imgs.height; @@ -1020,7 +1020,7 @@ static void alg_location_center(ctx_cam *cam) } /*Calculate distribution and variances of changes*/ -static void alg_location_dist(ctx_cam *cam) +static void alg_location_dist(ctx_dev *cam) { ctx_images *imgs = &cam->imgs; int width = cam->imgs.width; @@ -1103,7 +1103,7 @@ static void alg_location_dist(ctx_cam *cam) } /* Ensure min/max are within limits*/ -static void alg_location_minmax(ctx_cam *cam) +static void alg_location_minmax(ctx_dev *cam) { int width = cam->imgs.width; @@ -1146,7 +1146,7 @@ static void alg_location_minmax(ctx_cam *cam) } /* Determine the location and standard deviations of changes*/ -void alg_location(ctx_cam *cam) +void alg_location(ctx_dev *cam) { alg_location_center(cam); @@ -1157,7 +1157,7 @@ void alg_location(ctx_cam *cam) } /* Apply user or default thresholds on standard deviations*/ -void alg_stddev(ctx_cam *cam) +void alg_stddev(ctx_dev *cam) { /* @@ -1190,7 +1190,7 @@ void alg_stddev(ctx_cam *cam) } -void alg_diff(ctx_cam *cam) +void alg_diff(ctx_dev *cam) { if (cam->detecting_motion || cam->motapp->setup_mode) { diff --git a/src/alg.hpp b/src/alg.hpp index c0db57bf..b416274c 100644 --- a/src/alg.hpp +++ b/src/alg.hpp @@ -20,12 +20,12 @@ #ifndef _INCLUDE_ALG_HPP_ #define _INCLUDE_ALG_HPP_ - void alg_diff(ctx_cam *cam); - void alg_noise_tune(ctx_cam *cam); - void alg_threshold_tune(ctx_cam *cam); - void alg_tune_smartmask(ctx_cam *cam); - void alg_update_reference_frame(ctx_cam *cam, int action); - void alg_stddev(ctx_cam *cam); - void alg_location(ctx_cam *cam); + void alg_diff(ctx_dev *cam); + void alg_noise_tune(ctx_dev *cam); + void alg_threshold_tune(ctx_dev *cam); + void alg_tune_smartmask(ctx_dev *cam); + void alg_update_reference_frame(ctx_dev *cam, int action); + void alg_stddev(ctx_dev *cam); + void alg_location(ctx_dev *cam); #endif /* _INCLUDE_ALG_HPP_ */ diff --git a/src/alg_sec.cpp b/src/alg_sec.cpp index 16ecc0c6..9dfaacb7 100644 --- a/src/alg_sec.cpp +++ b/src/alg_sec.cpp @@ -36,7 +36,7 @@ using namespace cv; using namespace dnn; -static void algsec_image_show(ctx_cam *cam, Mat &mat_dst) +static void algsec_image_show(ctx_dev *cam, Mat &mat_dst) { //std::string testdir; std::vector buff; //buffer for coding @@ -74,7 +74,7 @@ static void algsec_image_show(ctx_cam *cam, Mat &mat_dst) } -static void algsec_image_label(ctx_cam *cam, Mat &mat_dst +static void algsec_image_label(ctx_dev *cam, Mat &mat_dst , std::vector &src_pos, std::vector &src_weights) { std::vector fltr_pos; @@ -139,7 +139,7 @@ static void algsec_image_label(ctx_cam *cam, Mat &mat_dst } -static void algsec_image_label(ctx_cam *cam, Mat &mat_dst +static void algsec_image_label(ctx_dev *cam, Mat &mat_dst , double confidence, Point classIdPoint) { ctx_algsec_model *algmdl = &cam->algsec->models; @@ -183,7 +183,7 @@ static void algsec_image_label(ctx_cam *cam, Mat &mat_dst } -static void algsec_image_roi(ctx_cam *cam, Mat &mat_src, Mat &mat_dst) +static void algsec_image_roi(ctx_dev *cam, Mat &mat_src, Mat &mat_dst) { cv::Rect roi; int width, height, x, y; @@ -222,7 +222,7 @@ static void algsec_image_roi(ctx_cam *cam, Mat &mat_src, Mat &mat_dst) } -static void algsec_image_type(ctx_cam *cam, Mat &mat_dst) +static void algsec_image_type(ctx_dev *cam, Mat &mat_dst) { ctx_algsec_model *algmdl = &cam->algsec->models; @@ -249,7 +249,7 @@ static void algsec_image_type(ctx_cam *cam, Mat &mat_dst) } -static void algsec_detect_hog(ctx_cam *cam) +static void algsec_detect_hog(ctx_dev *cam) { std::vector detect_weights; std::vector detect_pos; @@ -282,7 +282,7 @@ static void algsec_detect_hog(ctx_cam *cam) } } -static void algsec_detect_haar(ctx_cam *cam) +static void algsec_detect_haar(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; std::vector detect_weights; @@ -313,7 +313,7 @@ static void algsec_detect_haar(ctx_cam *cam) } } -static void algsec_detect_dnn(ctx_cam *cam) +static void algsec_detect_dnn(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; Mat mat_dst, softmaxProb; @@ -350,7 +350,7 @@ static void algsec_detect_dnn(ctx_cam *cam) } } -static void algsec_load_haar(ctx_cam *cam) +static void algsec_load_haar(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; try { @@ -374,7 +374,7 @@ static void algsec_load_haar(ctx_cam *cam) } } -static void algsec_load_dnn(ctx_cam *cam) +static void algsec_load_dnn(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; std::string line; @@ -415,7 +415,7 @@ static void algsec_load_dnn(ctx_cam *cam) } } -static void algsec_params_log(ctx_cam *cam) +static void algsec_params_log(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; int indx; @@ -429,7 +429,7 @@ static void algsec_params_log(ctx_cam *cam) } } -static void algsec_params_model(ctx_cam *cam) +static void algsec_params_model(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; int indx; @@ -493,7 +493,7 @@ static void algsec_params_model(ctx_cam *cam) } } -static void algsec_params_defaults(ctx_cam *cam) +static void algsec_params_defaults(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; @@ -526,7 +526,7 @@ static void algsec_params_defaults(ctx_cam *cam) } -static void algsec_params_deinit(ctx_cam *cam) +static void algsec_params_deinit(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; @@ -536,7 +536,7 @@ static void algsec_params_deinit(ctx_cam *cam) } } -static void algsec_params_init(ctx_cam *cam) +static void algsec_params_init(ctx_dev *cam) { ctx_algsec_model *algmdl = &cam->algsec->models; @@ -548,7 +548,7 @@ static void algsec_params_init(ctx_cam *cam) } /**Load the parms from the config to algsec struct */ -static void algsec_load_params(ctx_cam *cam) +static void algsec_load_params(ctx_dev *cam) { pthread_mutex_init(&cam->algsec->mutex, NULL); @@ -578,7 +578,7 @@ static void algsec_load_params(ctx_cam *cam) } /**Preload the models and initialize them */ -static void algsec_load_models(ctx_cam *cam) +static void algsec_load_models(ctx_dev *cam) { if (cam->algsec->models.method == "haar") { algsec_load_haar(cam); @@ -604,7 +604,7 @@ static void algsec_load_models(ctx_cam *cam) /**Detection thread processing loop */ static void *algsec_handler(void *arg) { - ctx_cam *cam = (ctx_cam*)arg; + ctx_dev *cam = (ctx_dev*)arg; long interval; MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO,_("Starting.")); @@ -640,7 +640,7 @@ static void *algsec_handler(void *arg) } /**Start the detection thread*/ -static void algsec_start_handler(ctx_cam *cam) +static void algsec_start_handler(ctx_dev *cam) { int retcd; pthread_attr_t handler_attribute; @@ -664,7 +664,7 @@ static void algsec_start_handler(ctx_cam *cam) #endif /** Initialize the secondary processes and parameters */ -void algsec_init(ctx_cam *cam) +void algsec_init(ctx_dev *cam) { cam->algsec_inuse = false; @@ -679,7 +679,7 @@ void algsec_init(ctx_cam *cam) } /** Shut down the secondary detection components */ -void algsec_deinit(ctx_cam *cam) +void algsec_deinit(ctx_dev *cam) { #ifdef HAVE_OPENCV int waitcnt = 0; @@ -718,7 +718,7 @@ void algsec_deinit(ctx_cam *cam) } /*Invoke the secondary detetction method*/ -void algsec_detect(ctx_cam *cam) +void algsec_detect(ctx_dev *cam) { #ifdef HAVE_OPENCV if (cam->algsec_inuse == false){ diff --git a/src/alg_sec.hpp b/src/alg_sec.hpp index b8e7a2b3..ee0d55b3 100644 --- a/src/alg_sec.hpp +++ b/src/alg_sec.hpp @@ -91,8 +91,8 @@ struct ctx_algsec { }; -void algsec_detect(ctx_cam *cam); -void algsec_init(ctx_cam *cam); -void algsec_deinit(ctx_cam *cam); +void algsec_detect(ctx_dev *cam); +void algsec_init(ctx_dev *cam); +void algsec_deinit(ctx_dev *cam); #endif /*_INCLUDE_ALG_SEC_HPP_*/ \ No newline at end of file diff --git a/src/conf.cpp b/src/conf.cpp index 79fa4407..f11cdf0b 100644 --- a/src/conf.cpp +++ b/src/conf.cpp @@ -564,7 +564,7 @@ static void conf_edit_native_language(ctx_motapp *motapp, std::string &parm, enu /************************************************************************/ /************************************************************************/ -static void conf_edit_camera(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_camera(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { /* This edit routine is special for the camera. * We are dealing with the file name that is still a char @@ -584,7 +584,7 @@ static void conf_edit_camera(ctx_cam *cam, std::string &parm, enum PARM_ACT pact MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera",_("camera")); } -static void conf_edit_camera_name(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_camera_name(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->camera_name= ""; @@ -597,7 +597,7 @@ static void conf_edit_camera_name(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera_name",_("camera_name")); } -static void conf_edit_camera_id(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_camera_id(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; @@ -625,7 +625,7 @@ static void conf_edit_camera_id(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera_id",_("camera_id")); } -static void conf_edit_camera_tmo(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_camera_tmo(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -644,7 +644,7 @@ static void conf_edit_camera_tmo(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera_tmo",_("camera_tmo")); } -static void conf_edit_camera_dir(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_camera_dir(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->camera_dir = ""; @@ -657,7 +657,7 @@ static void conf_edit_camera_dir(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","camera_dir",_("camera_dir")); } -static void conf_edit_target_dir(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_target_dir(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->target_dir = "."; @@ -676,7 +676,7 @@ static void conf_edit_target_dir(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","target_dir",_("target_dir")); } -static void conf_edit_watchdog_tmo(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_watchdog_tmo(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -695,7 +695,7 @@ static void conf_edit_watchdog_tmo(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","watchdog_tmo",_("watchdog_tmo")); } -static void conf_edit_watchdog_kill(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_watchdog_kill(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -714,7 +714,7 @@ static void conf_edit_watchdog_kill(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","watchdog_kill",_("watchdog_kill")); } -static void conf_edit_v4l2_device(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_v4l2_device(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->v4l2_device = ""; @@ -727,7 +727,7 @@ static void conf_edit_v4l2_device(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","v4l2_device",_("v4l2_device")); } -static void conf_edit_v4l2_params(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_v4l2_params(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->v4l2_params = ""; @@ -740,7 +740,7 @@ static void conf_edit_v4l2_params(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","v4l2_params",_("v4l2_params")); } -static void conf_edit_netcam_url(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_netcam_url(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->netcam_url = ""; @@ -753,7 +753,7 @@ static void conf_edit_netcam_url(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","netcam_url",_("netcam_url")); } -static void conf_edit_netcam_params(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_netcam_params(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->netcam_params = ""; @@ -766,7 +766,7 @@ static void conf_edit_netcam_params(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","netcam_params",_("netcam_params")); } -static void conf_edit_netcam_high_url(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_netcam_high_url(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->netcam_high_url = ""; @@ -779,7 +779,7 @@ static void conf_edit_netcam_high_url(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","netcam_high_url",_("netcam_high_url")); } -static void conf_edit_netcam_high_params(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_netcam_high_params(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->netcam_high_params = ""; @@ -792,7 +792,7 @@ static void conf_edit_netcam_high_params(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","netcam_high_params",_("netcam_high_params")); } -static void conf_edit_netcam_userpass(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_netcam_userpass(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->netcam_userpass = ""; @@ -805,7 +805,7 @@ static void conf_edit_netcam_userpass(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","netcam_userpass",_("netcam_userpass")); } -static void conf_edit_libcam_name(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_libcam_name(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->libcam_name = ""; @@ -818,7 +818,7 @@ static void conf_edit_libcam_name(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","libcam_name",_("libcam_name")); } -static void conf_edit_libcam_params(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_libcam_params(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->libcam_params = ""; @@ -831,7 +831,7 @@ static void conf_edit_libcam_params(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","libcam_params",_("libcam_params")); } -static void conf_edit_width(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_width(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -857,7 +857,7 @@ static void conf_edit_width(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","width",_("width")); } -static void conf_edit_height(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_height(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -883,7 +883,7 @@ static void conf_edit_height(ctx_cam *cam, std::string &parm, enum PARM_ACT pact MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","height",_("height")); } -static void conf_edit_framerate(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_framerate(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -902,7 +902,7 @@ static void conf_edit_framerate(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","framerate",_("framerate")); } -static void conf_edit_rotate(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_rotate(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -924,7 +924,7 @@ static void conf_edit_rotate(ctx_cam *cam, std::string &parm, enum PARM_ACT pact MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","rotate",_("rotate")); } -static void conf_edit_flip_axis(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_flip_axis(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->flip_axis = "none"; @@ -946,7 +946,7 @@ static void conf_edit_flip_axis(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","flip_axis",_("flip_axis")); } -static void conf_edit_locate_motion_mode(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_locate_motion_mode(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->locate_motion_mode = "off"; @@ -967,7 +967,7 @@ static void conf_edit_locate_motion_mode(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","locate_motion_mode",_("locate_motion_mode")); } -static void conf_edit_locate_motion_style(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_locate_motion_style(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->locate_motion_style = "box"; @@ -989,7 +989,7 @@ static void conf_edit_locate_motion_style(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","locate_motion_style",_("locate_motion_style")); } -static void conf_edit_text_left(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_text_left(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->text_left = ""; @@ -1002,7 +1002,7 @@ static void conf_edit_text_left(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","text_left",_("text_left")); } -static void conf_edit_text_right(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_text_right(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->text_right = "%Y-%m-%d\\n%T"; @@ -1015,7 +1015,7 @@ static void conf_edit_text_right(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","text_right",_("text_right")); } -static void conf_edit_text_changes(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_text_changes(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->text_changes = false; @@ -1028,7 +1028,7 @@ static void conf_edit_text_changes(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","text_changes",_("text_changes")); } -static void conf_edit_text_scale(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_text_scale(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1052,7 +1052,7 @@ static void conf_edit_text_scale(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","text_scale",_("text_scale")); } -static void conf_edit_text_event(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_text_event(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->text_event = "%Y%m%d%H%M%S"; @@ -1065,7 +1065,7 @@ static void conf_edit_text_event(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","text_event",_("text_event")); } -static void conf_edit_emulate_motion(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_emulate_motion(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->emulate_motion = false; @@ -1078,7 +1078,7 @@ static void conf_edit_emulate_motion(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","emulate_motion",_("emulate_motion")); } -static void conf_edit_threshold(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1097,7 +1097,7 @@ static void conf_edit_threshold(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold",_("threshold")); } -static void conf_edit_threshold_maximum(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_maximum(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1116,7 +1116,7 @@ static void conf_edit_threshold_maximum(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_maximum",_("threshold_maximum")); } -static void conf_edit_threshold_sdevx(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_sdevx(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1135,7 +1135,7 @@ static void conf_edit_threshold_sdevx(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_sdevx",_("threshold_sdevx")); } -static void conf_edit_threshold_sdevy(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_sdevy(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1154,7 +1154,7 @@ static void conf_edit_threshold_sdevy(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_sdevy",_("threshold_sdevy")); } -static void conf_edit_threshold_sdevxy(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_sdevxy(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1173,7 +1173,7 @@ static void conf_edit_threshold_sdevxy(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_sdevxy",_("threshold_sdevxy")); } -static void conf_edit_threshold_ratio(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_ratio(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1192,7 +1192,7 @@ static void conf_edit_threshold_ratio(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_ratio",_("threshold_ratio")); } -static void conf_edit_threshold_ratio_change(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_ratio_change(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1211,7 +1211,7 @@ static void conf_edit_threshold_ratio_change(ctx_cam *cam, std::string &parm, en MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_ratio_change",_("threshold_ratio_change")); } -static void conf_edit_threshold_tune(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_threshold_tune(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->threshold_tune = false; @@ -1224,7 +1224,7 @@ static void conf_edit_threshold_tune(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","threshold_tune",_("threshold_tune")); } -static void conf_edit_secondary_method(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_secondary_method(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->secondary_method = "none"; @@ -1246,7 +1246,7 @@ static void conf_edit_secondary_method(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","secondary_method",_("secondary_method")); } -static void conf_edit_secondary_params(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_secondary_params(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->secondary_params = ""; @@ -1259,7 +1259,7 @@ static void conf_edit_secondary_params(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","secondary_params",_("secondary_params")); } -static void conf_edit_noise_level(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_noise_level(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1278,7 +1278,7 @@ static void conf_edit_noise_level(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","noise_level",_("noise_level")); } -static void conf_edit_noise_tune(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_noise_tune(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->noise_tune = true; @@ -1291,7 +1291,7 @@ static void conf_edit_noise_tune(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","noise_tune",_("noise_tune")); } -static void conf_edit_despeckle_filter(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_despeckle_filter(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->despeckle_filter = ""; @@ -1304,7 +1304,7 @@ static void conf_edit_despeckle_filter(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","despeckle_filter",_("despeckle_filter")); } -static void conf_edit_area_detect(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_area_detect(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->area_detect = ""; @@ -1317,7 +1317,7 @@ static void conf_edit_area_detect(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","area_detect",_("area_detect")); } -static void conf_edit_mask_file(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_mask_file(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->mask_file = ""; @@ -1330,7 +1330,7 @@ static void conf_edit_mask_file(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","mask_file",_("mask_file")); } -static void conf_edit_mask_privacy(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_mask_privacy(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->mask_privacy = ""; @@ -1343,7 +1343,7 @@ static void conf_edit_mask_privacy(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","mask_privacy",_("mask_privacy")); } -static void conf_edit_smart_mask_speed(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_smart_mask_speed(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1367,7 +1367,7 @@ static void conf_edit_smart_mask_speed(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","smart_mask_speed",_("smart_mask_speed")); } -static void conf_edit_lightswitch_percent(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_lightswitch_percent(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1386,7 +1386,7 @@ static void conf_edit_lightswitch_percent(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","lightswitch_percent",_("lightswitch_percent")); } -static void conf_edit_lightswitch_frames(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_lightswitch_frames(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1405,7 +1405,7 @@ static void conf_edit_lightswitch_frames(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","lightswitch_frames",_("lightswitch_frames")); } -static void conf_edit_minimum_motion_frames(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_minimum_motion_frames(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1424,7 +1424,7 @@ static void conf_edit_minimum_motion_frames(ctx_cam *cam, std::string &parm, enu MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","minimum_motion_frames",_("minimum_motion_frames")); } -static void conf_edit_static_object_time(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_static_object_time(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1443,7 +1443,7 @@ static void conf_edit_static_object_time(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","static_object_time",_("static_object_time")); } -static void conf_edit_event_gap(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_event_gap(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1462,7 +1462,7 @@ static void conf_edit_event_gap(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","event_gap",_("event_gap")); } -static void conf_edit_pre_capture(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_pre_capture(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1481,7 +1481,7 @@ static void conf_edit_pre_capture(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","pre_capture",_("pre_capture")); } -static void conf_edit_post_capture(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_post_capture(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1500,7 +1500,7 @@ static void conf_edit_post_capture(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","post_capture",_("post_capture")); } -static void conf_edit_on_event_start(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_event_start(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_event_start = ""; @@ -1513,7 +1513,7 @@ static void conf_edit_on_event_start(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_event_start",_("on_event_start")); } -static void conf_edit_on_event_end(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_event_end(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_event_end = ""; @@ -1526,7 +1526,7 @@ static void conf_edit_on_event_end(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_event_end",_("on_event_end")); } -static void conf_edit_on_picture_save(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_picture_save(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_picture_save = ""; @@ -1539,7 +1539,7 @@ static void conf_edit_on_picture_save(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_picture_save",_("on_picture_save")); } -static void conf_edit_on_area_detected(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_area_detected(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_area_detected = ""; @@ -1552,7 +1552,7 @@ static void conf_edit_on_area_detected(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_area_detected",_("on_area_detected")); } -static void conf_edit_on_motion_detected(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_motion_detected(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_motion_detected = ""; @@ -1565,7 +1565,7 @@ static void conf_edit_on_motion_detected(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_motion_detected",_("on_motion_detected")); } -static void conf_edit_on_movie_start(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_movie_start(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_movie_start = ""; @@ -1578,7 +1578,7 @@ static void conf_edit_on_movie_start(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_movie_start",_("on_movie_start")); } -static void conf_edit_on_movie_end(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_movie_end(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_movie_end = ""; @@ -1591,7 +1591,7 @@ static void conf_edit_on_movie_end(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_movie_end",_("on_movie_end")); } -static void conf_edit_on_camera_lost(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_camera_lost(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_camera_lost = ""; @@ -1604,7 +1604,7 @@ static void conf_edit_on_camera_lost(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_camera_lost",_("on_camera_lost")); } -static void conf_edit_on_camera_found(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_camera_found(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_camera_found = ""; @@ -1617,7 +1617,7 @@ static void conf_edit_on_camera_found(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_camera_found",_("on_camera_found")); } -static void conf_edit_on_secondary_detect(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_secondary_detect(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_secondary_detect = ""; @@ -1630,7 +1630,7 @@ static void conf_edit_on_secondary_detect(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_secondary_detect",_("on_secondary_detect")); } -static void conf_edit_on_action_user(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_on_action_user(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->on_action_user = ""; @@ -1643,7 +1643,7 @@ static void conf_edit_on_action_user(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","on_action_user",_("on_action_user")); } -static void conf_edit_picture_output(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_output(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->picture_output = "off"; @@ -1667,7 +1667,7 @@ static void conf_edit_picture_output(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_output",_("picture_output")); } -static void conf_edit_picture_output_motion(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_output_motion(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->picture_output_motion = "off"; @@ -1690,7 +1690,7 @@ static void conf_edit_picture_output_motion(ctx_cam *cam, std::string &parm, enu MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_output_motion",_("picture_output_motion")); } -static void conf_edit_picture_type(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_type(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->picture_type = "jpeg"; @@ -1713,7 +1713,7 @@ static void conf_edit_picture_type(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_type",_("picture_type")); } -static void conf_edit_picture_quality(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_quality(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1732,7 +1732,7 @@ static void conf_edit_picture_quality(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_quality",_("picture_quality")); } -static void conf_edit_picture_exif(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_exif(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->picture_exif = ""; @@ -1745,7 +1745,7 @@ static void conf_edit_picture_exif(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_exif",_("picture_exif")); } -static void conf_edit_picture_filename(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_picture_filename(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->picture_filename = "%v-%Y%m%d%H%M%S-%q"; @@ -1758,7 +1758,7 @@ static void conf_edit_picture_filename(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","picture_filename",_("picture_filename")); } -static void conf_edit_snapshot_interval(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_snapshot_interval(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1777,7 +1777,7 @@ static void conf_edit_snapshot_interval(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","snapshot_interval",_("snapshot_interval")); } -static void conf_edit_snapshot_filename(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_snapshot_filename(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->snapshot_filename = "%v-%Y%m%d%H%M%S-snapshot"; @@ -1790,7 +1790,7 @@ static void conf_edit_snapshot_filename(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","snapshot_filename",_("snapshot_filename")); } -static void conf_edit_movie_output(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_output(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_output = true; @@ -1803,7 +1803,7 @@ static void conf_edit_movie_output(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_output",_("movie_output")); } -static void conf_edit_movie_output_motion(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_output_motion(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_output_motion = false; @@ -1816,7 +1816,7 @@ static void conf_edit_movie_output_motion(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_output_motion",_("movie_output_motion")); } -static void conf_edit_movie_max_time(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_max_time(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1835,7 +1835,7 @@ static void conf_edit_movie_max_time(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_max_time",_("movie_max_time")); } -static void conf_edit_movie_bps(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_bps(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1854,7 +1854,7 @@ static void conf_edit_movie_bps(ctx_cam *cam, std::string &parm, enum PARM_ACT p MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_bps",_("movie_bps")); } -static void conf_edit_movie_quality(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_quality(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1873,7 +1873,7 @@ static void conf_edit_movie_quality(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_quality",_("movie_quality")); } -static void conf_edit_movie_container(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_container(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_container = "mkv"; @@ -1886,7 +1886,7 @@ static void conf_edit_movie_container(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_container",_("movie_container")); } -static void conf_edit_movie_passthrough(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_passthrough(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_passthrough = false; @@ -1899,7 +1899,7 @@ static void conf_edit_movie_passthrough(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_passthrough",_("movie_passthrough")); } -static void conf_edit_movie_filename(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_filename(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_filename = "%v-%Y%m%d%H%M%S"; @@ -1912,7 +1912,7 @@ static void conf_edit_movie_filename(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_filename",_("movie_filename")); } -static void conf_edit_movie_retain(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_retain(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_retain = "all"; @@ -1935,7 +1935,7 @@ static void conf_edit_movie_retain(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_retain",_("movie_retain")); } -static void conf_edit_movie_extpipe_use(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_extpipe_use(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_extpipe_use = false; @@ -1948,7 +1948,7 @@ static void conf_edit_movie_extpipe_use(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_extpipe_use",_("movie_extpipe_use")); } -static void conf_edit_movie_extpipe(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_movie_extpipe(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->movie_extpipe = ""; @@ -1961,7 +1961,7 @@ static void conf_edit_movie_extpipe(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","movie_extpipe",_("movie_extpipe")); } -static void conf_edit_timelapse_interval(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_timelapse_interval(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -1980,7 +1980,7 @@ static void conf_edit_timelapse_interval(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","timelapse_interval",_("timelapse_interval")); } -static void conf_edit_timelapse_mode(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_timelapse_mode(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->timelapse_mode = "daily"; @@ -2006,7 +2006,7 @@ static void conf_edit_timelapse_mode(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","timelapse_mode",_("timelapse_mode")); } -static void conf_edit_timelapse_fps(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_timelapse_fps(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2025,7 +2025,7 @@ static void conf_edit_timelapse_fps(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","timelapse_fps",_("timelapse_fps")); } -static void conf_edit_timelapse_container(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_timelapse_container(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->timelapse_container = "mpg"; @@ -2048,7 +2048,7 @@ static void conf_edit_timelapse_container(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","timelapse_container",_("timelapse_container")); } -static void conf_edit_timelapse_filename(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_timelapse_filename(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->timelapse_filename = "%Y%m%d-timelapse"; @@ -2061,7 +2061,7 @@ static void conf_edit_timelapse_filename(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","timelapse_filename",_("timelapse_filename")); } -static void conf_edit_video_pipe(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_video_pipe(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->video_pipe = ""; @@ -2074,7 +2074,7 @@ static void conf_edit_video_pipe(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","video_pipe",_("video_pipe")); } -static void conf_edit_video_pipe_motion(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_video_pipe_motion(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->video_pipe_motion = ""; @@ -2087,7 +2087,7 @@ static void conf_edit_video_pipe_motion(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","video_pipe_motion",_("video_pipe_motion")); } -static void conf_edit_webcontrol_port(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_port(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2106,7 +2106,7 @@ static void conf_edit_webcontrol_port(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_port",_("webcontrol_port")); } -static void conf_edit_webcontrol_base_path(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_base_path(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_base_path = ""; @@ -2133,7 +2133,7 @@ static void conf_edit_webcontrol_base_path(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_base_path",_("webcontrol_base_path")); } -static void conf_edit_webcontrol_ipv6(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_ipv6(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_ipv6 = false; @@ -2146,7 +2146,7 @@ static void conf_edit_webcontrol_ipv6(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_ipv6",_("webcontrol_ipv6")); } -static void conf_edit_webcontrol_localhost(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_localhost(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_localhost = true; @@ -2159,7 +2159,7 @@ static void conf_edit_webcontrol_localhost(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_localhost",_("webcontrol_localhost")); } -static void conf_edit_webcontrol_parms(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_parms(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2182,7 +2182,7 @@ static void conf_edit_webcontrol_parms(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_parms",_("webcontrol_parms")); } -static void conf_edit_webcontrol_interface(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_interface(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_interface = "default"; @@ -2205,7 +2205,7 @@ static void conf_edit_webcontrol_interface(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_interface",_("webcontrol_interface")); } -static void conf_edit_webcontrol_auth_method(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_auth_method(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_auth_method = "none"; @@ -2228,7 +2228,7 @@ static void conf_edit_webcontrol_auth_method(ctx_cam *cam, std::string &parm, en MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_auth_method",_("webcontrol_auth_method")); } -static void conf_edit_webcontrol_authentication(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_authentication(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_authentication = ""; @@ -2241,7 +2241,7 @@ static void conf_edit_webcontrol_authentication(ctx_cam *cam, std::string &parm, MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_authentication",_("webcontrol_authentication")); } -static void conf_edit_webcontrol_tls(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_tls(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_tls = false; @@ -2254,7 +2254,7 @@ static void conf_edit_webcontrol_tls(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_tls",_("webcontrol_tls")); } -static void conf_edit_webcontrol_cert(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_cert(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_cert = ""; @@ -2267,7 +2267,7 @@ static void conf_edit_webcontrol_cert(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_cert",_("webcontrol_cert")); } -static void conf_edit_webcontrol_key(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_key(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_key = ""; @@ -2280,7 +2280,7 @@ static void conf_edit_webcontrol_key(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_key",_("webcontrol_key")); } -static void conf_edit_webcontrol_headers(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_headers(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_headers = ""; @@ -2293,7 +2293,7 @@ static void conf_edit_webcontrol_headers(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_headers",_("webcontrol_headers")); } -static void conf_edit_webcontrol_html(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_html(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_html = ""; @@ -2306,7 +2306,7 @@ static void conf_edit_webcontrol_html(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_html",_("webcontrol_html")); } -static void conf_edit_webcontrol_actions(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_actions(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->webcontrol_actions = ""; @@ -2319,7 +2319,7 @@ static void conf_edit_webcontrol_actions(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_actions",_("webcontrol_actions")); } -static void conf_edit_webcontrol_lock_minutes(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_lock_minutes(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2338,7 +2338,7 @@ static void conf_edit_webcontrol_lock_minutes(ctx_cam *cam, std::string &parm, e MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_lock_minutes",_("webcontrol_lock_minutes")); } -static void conf_edit_webcontrol_lock_attempts(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_webcontrol_lock_attempts(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2357,7 +2357,7 @@ static void conf_edit_webcontrol_lock_attempts(ctx_cam *cam, std::string &parm, MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_lock_attempts",_("webcontrol_lock_attempts")); } -static void conf_edit_stream_preview_scale(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_preview_scale(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2376,7 +2376,7 @@ static void conf_edit_stream_preview_scale(ctx_cam *cam, std::string &parm, enum MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_preview_scale",_("stream_preview_scale")); } -static void conf_edit_stream_preview_newline(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_preview_newline(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->stream_preview_newline = false; @@ -2389,7 +2389,7 @@ static void conf_edit_stream_preview_newline(ctx_cam *cam, std::string &parm, en MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_preview_newline",_("stream_preview_newline")); } -static void conf_edit_stream_preview_method(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_preview_method(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->stream_preview_method = "mjpg"; @@ -2412,7 +2412,7 @@ static void conf_edit_stream_preview_method(ctx_cam *cam, std::string &parm, enu MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_preview_method",_("stream_preview_method")); } -static void conf_edit_stream_preview_ptz(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_preview_ptz(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->stream_preview_ptz = true; @@ -2425,7 +2425,7 @@ static void conf_edit_stream_preview_ptz(ctx_cam *cam, std::string &parm, enum P MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_preview_ptz",_("stream_preview_ptz")); } -static void conf_edit_stream_quality(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_quality(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2444,7 +2444,7 @@ static void conf_edit_stream_quality(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_quality",_("stream_quality")); } -static void conf_edit_stream_grey(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_grey(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->stream_grey = false; @@ -2457,7 +2457,7 @@ static void conf_edit_stream_grey(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_grey",_("stream_grey")); } -static void conf_edit_stream_motion(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_motion(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->stream_motion = false; @@ -2470,7 +2470,7 @@ static void conf_edit_stream_motion(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_motion",_("stream_motion")); } -static void conf_edit_stream_maxrate(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_maxrate(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2489,7 +2489,7 @@ static void conf_edit_stream_maxrate(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_maxrate",_("stream_maxrate")); } -static void conf_edit_stream_scan_time(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_scan_time(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2508,7 +2508,7 @@ static void conf_edit_stream_scan_time(ctx_cam *cam, std::string &parm, enum PAR MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_scan_time",_("stream_scan_time")); } -static void conf_edit_stream_scan_scale(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_stream_scan_scale(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2527,7 +2527,7 @@ static void conf_edit_stream_scan_scale(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","stream_scan_scale",_("stream_scan_scale")); } -static void conf_edit_database_type(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_type(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->database_type = ""; @@ -2549,7 +2549,7 @@ static void conf_edit_database_type(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_type",_("database_type")); } -static void conf_edit_database_dbname(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_dbname(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->database_dbname = ""; @@ -2562,7 +2562,7 @@ static void conf_edit_database_dbname(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_dbname",_("database_dbname")); } -static void conf_edit_database_host(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_host(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->database_host = ""; @@ -2575,7 +2575,7 @@ static void conf_edit_database_host(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_host",_("database_host")); } -static void conf_edit_database_port(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_port(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2594,7 +2594,7 @@ static void conf_edit_database_port(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_port",_("database_port")); } -static void conf_edit_database_user(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_user(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->database_user = ""; @@ -2607,7 +2607,7 @@ static void conf_edit_database_user(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_user",_("database_user")); } -static void conf_edit_database_password(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_password(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->database_password = ""; @@ -2620,7 +2620,7 @@ static void conf_edit_database_password(ctx_cam *cam, std::string &parm, enum PA MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_password",_("database_password")); } -static void conf_edit_database_busy_timeout(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_database_busy_timeout(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2639,7 +2639,7 @@ static void conf_edit_database_busy_timeout(ctx_cam *cam, std::string &parm, enu MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","database_busy_timeout",_("database_busy_timeout")); } -static void conf_edit_sql_event_start(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_sql_event_start(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->sql_event_start = ""; @@ -2652,7 +2652,7 @@ static void conf_edit_sql_event_start(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","sql_event_start",_("sql_event_start")); } -static void conf_edit_sql_event_end(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_sql_event_end(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->sql_event_end = ""; @@ -2665,7 +2665,7 @@ static void conf_edit_sql_event_end(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","sql_event_end",_("sql_event_end")); } -static void conf_edit_sql_movie_start(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_sql_movie_start(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->sql_movie_start = ""; @@ -2678,7 +2678,7 @@ static void conf_edit_sql_movie_start(ctx_cam *cam, std::string &parm, enum PARM MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","sql_movie_start",_("sql_movie_start")); } -static void conf_edit_sql_movie_end(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_sql_movie_end(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->sql_movie_end = ""; @@ -2691,7 +2691,7 @@ static void conf_edit_sql_movie_end(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","sql_movie_end",_("sql_movie_end")); } -static void conf_edit_sql_pic_save(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_sql_pic_save(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->sql_pic_save = ""; @@ -2704,7 +2704,7 @@ static void conf_edit_sql_pic_save(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","sql_pic_save",_("sql_pic_save")); } -static void conf_edit_ptz_auto_track(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_auto_track(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_auto_track = false; @@ -2717,7 +2717,7 @@ static void conf_edit_ptz_auto_track(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_auto_track",_("ptz_auto_track")); } -static void conf_edit_ptz_wait(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_wait(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { int parm_in; if (pact == PARM_ACT_DFLT) { @@ -2736,7 +2736,7 @@ static void conf_edit_ptz_wait(ctx_cam *cam, std::string &parm, enum PARM_ACT pa MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_wait",_("ptz_wait")); } -static void conf_edit_ptz_move_track(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_move_track(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_move_track = ""; @@ -2749,7 +2749,7 @@ static void conf_edit_ptz_move_track(ctx_cam *cam, std::string &parm, enum PARM_ MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_move_track",_("ptz_move_track")); } -static void conf_edit_ptz_pan_left(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_pan_left(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_pan_left = ""; @@ -2762,7 +2762,7 @@ static void conf_edit_ptz_pan_left(ctx_cam *cam, std::string &parm, enum PARM_AC MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_pan_left",_("ptz_pan_left")); } -static void conf_edit_ptz_pan_right(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_pan_right(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_pan_right = ""; @@ -2775,7 +2775,7 @@ static void conf_edit_ptz_pan_right(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_pan_right",_("ptz_pan_right")); } -static void conf_edit_ptz_tilt_up(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_tilt_up(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_tilt_up = ""; @@ -2788,7 +2788,7 @@ static void conf_edit_ptz_tilt_up(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_tilt_up",_("ptz_tilt_up")); } -static void conf_edit_ptz_tilt_down(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_tilt_down(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_tilt_down = ""; @@ -2801,7 +2801,7 @@ static void conf_edit_ptz_tilt_down(ctx_cam *cam, std::string &parm, enum PARM_A MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_tilt_down",_("ptz_tilt_down")); } -static void conf_edit_ptz_zoom_in(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_zoom_in(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_zoom_in = ""; @@ -2814,7 +2814,7 @@ static void conf_edit_ptz_zoom_in(ctx_cam *cam, std::string &parm, enum PARM_ACT MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","ptz_zoom_in",_("ptz_zoom_in")); } -static void conf_edit_ptz_zoom_out(ctx_cam *cam, std::string &parm, enum PARM_ACT pact) +static void conf_edit_ptz_zoom_out(ctx_dev *cam, std::string &parm, enum PARM_ACT pact) { if (pact == PARM_ACT_DFLT) { cam->conf->ptz_zoom_out = ""; @@ -2843,7 +2843,7 @@ static void conf_edit_cat00(ctx_motapp *motapp, std::string cmd } -static void conf_edit_cat01(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat01(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "camera_dir") { conf_edit_camera_dir(cam, parm_val, pact); @@ -2858,7 +2858,7 @@ static void conf_edit_cat01(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat02(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat02(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { @@ -2875,7 +2875,7 @@ static void conf_edit_cat02(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat03(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat03(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "width") { conf_edit_width(cam, parm_val, pact); @@ -2887,7 +2887,7 @@ static void conf_edit_cat03(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat04(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat04(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "locate_motion_mode") { conf_edit_locate_motion_mode(cam, parm_val, pact); @@ -2901,7 +2901,7 @@ static void conf_edit_cat04(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat05(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat05(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "emulate_motion") { conf_edit_emulate_motion(cam, parm_val, pact); @@ -2919,7 +2919,7 @@ static void conf_edit_cat05(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat06(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat06(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "noise_level") { conf_edit_noise_level(cam, parm_val, pact); @@ -2933,7 +2933,7 @@ static void conf_edit_cat06(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat07(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat07(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "lightswitch_percent") { conf_edit_lightswitch_percent(cam, parm_val, pact); @@ -2947,7 +2947,7 @@ static void conf_edit_cat07(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat08(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat08(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "on_event_start") { conf_edit_on_event_start(cam, parm_val, pact); @@ -2965,7 +2965,7 @@ static void conf_edit_cat08(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat09(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat09(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "picture_output") { conf_edit_picture_output(cam, parm_val, pact); @@ -2980,7 +2980,7 @@ static void conf_edit_cat09(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat10(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat10(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "movie_output") { conf_edit_movie_output(cam, parm_val, pact); @@ -2998,7 +2998,7 @@ static void conf_edit_cat10(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat11(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat11(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "timelapse_interval") { conf_edit_timelapse_interval(cam, parm_val, pact); @@ -3010,7 +3010,7 @@ static void conf_edit_cat11(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat12(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat12(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "video_pipe") { conf_edit_video_pipe(cam, parm_val, pact); @@ -3019,7 +3019,7 @@ static void conf_edit_cat12(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat13(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat13(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "webcontrol_port") { conf_edit_webcontrol_port(cam, parm_val, pact); @@ -3042,7 +3042,7 @@ static void conf_edit_cat13(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat14(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat14(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "stream_preview_scale") { conf_edit_stream_preview_scale(cam, parm_val, pact); @@ -3059,7 +3059,7 @@ static void conf_edit_cat14(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat15(ctx_cam *cam, std::string parm_nm, std::string &parm_val, enum PARM_ACT pact) +static void conf_edit_cat15(ctx_dev *cam, std::string parm_nm, std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "database_type") { conf_edit_database_type(cam, parm_val, pact); } else if (parm_nm == "database_dbname") { conf_edit_database_dbname(cam, parm_val, pact); @@ -3072,7 +3072,7 @@ static void conf_edit_cat15(ctx_cam *cam, std::string parm_nm, std::string &parm } -static void conf_edit_cat16(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat16(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "sql_event_start") { conf_edit_sql_event_start(cam, parm_val, pact); @@ -3084,7 +3084,7 @@ static void conf_edit_cat16(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat17(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat17(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact) { if (parm_nm == "ptz_auto_track") { conf_edit_ptz_auto_track(cam, parm_val, pact); @@ -3100,7 +3100,7 @@ static void conf_edit_cat17(ctx_cam *cam, std::string parm_nm } -static void conf_edit_cat(ctx_cam *cam, std::string parm_nm +static void conf_edit_cat(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_ACT pact, enum PARM_CAT pcat) { @@ -3146,7 +3146,7 @@ static void conf_edit_dflt_app(ctx_motapp *motapp) } -static void conf_edit_dflt_cam(ctx_cam *cam) +static void conf_edit_dflt_cam(ctx_dev *cam) { int indx; enum PARM_CAT pcat; @@ -3278,7 +3278,7 @@ static int conf_edit_set_depr(ctx_motapp *motapp, bool ismotapp, int threadnbr return -1; } -void conf_edit_get(ctx_cam *cam, std::string parm_nm, std::string &parm_val, enum PARM_CAT parm_cat) +void conf_edit_get(ctx_dev *cam, std::string parm_nm, std::string &parm_val, enum PARM_CAT parm_cat) { if (parm_cat == PARM_CAT_00) { conf_edit_cat00(cam->motapp, parm_nm, parm_val, PARM_ACT_GET); @@ -3289,7 +3289,7 @@ void conf_edit_get(ctx_cam *cam, std::string parm_nm, std::string &parm_val, enu } /* Interim overload until webu goes to c++ with std::string */ -void conf_edit_get(ctx_cam *cam, std::string parm_nm, char *parm_chr, enum PARM_CAT parm_cat) +void conf_edit_get(ctx_dev *cam, std::string parm_nm, char *parm_chr, enum PARM_CAT parm_cat) { std::string parm_val(parm_chr); int retcd; @@ -3387,7 +3387,7 @@ void conf_edit_set(ctx_motapp *motapp, bool ismotapp, int threadnbr } -void conf_edit_list(ctx_cam *cam, std::string parm_nm, std::string &parm_val, enum PARM_CAT parm_cat) +void conf_edit_list(ctx_dev *cam, std::string parm_nm, std::string &parm_val, enum PARM_CAT parm_cat) { if (parm_cat == PARM_CAT_00) { conf_edit_cat00(cam->motapp, parm_nm, parm_val, PARM_ACT_LIST); @@ -3398,7 +3398,7 @@ void conf_edit_list(ctx_cam *cam, std::string parm_nm, std::string &parm_val, en } /* Interim overload until webu goes to c++ with std::string */ -void conf_edit_list(ctx_cam *cam, std::string parm_nm, char *parm_chr, enum PARM_CAT parm_cat) +void conf_edit_list(ctx_dev *cam, std::string parm_nm, char *parm_chr, enum PARM_CAT parm_cat) { std::string parm_val(parm_chr); int retcd; @@ -3594,11 +3594,11 @@ void conf_camera_add(ctx_motapp *motapp) }; /* Index starts at zero (+1) plus another for our new camera(+2)*/ - motapp->cam_list = (ctx_cam **)myrealloc( - motapp->cam_list, sizeof(ctx_cam *) * (indx_cams + 2), "config_camera"); + motapp->cam_list = (ctx_dev **)myrealloc( + motapp->cam_list, sizeof(ctx_dev *) * (indx_cams + 2), "config_camera"); - motapp->cam_list[indx_cams] = new ctx_cam; - memset(motapp->cam_list[indx_cams],0,sizeof(ctx_cam)); + motapp->cam_list[indx_cams] = new ctx_dev; + memset(motapp->cam_list[indx_cams],0,sizeof(ctx_dev)); motapp->cam_list[indx_cams]->conf = new ctx_config; @@ -3696,7 +3696,7 @@ static void conf_parm_camera_dir(ctx_motapp *motapp, std::string str) MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO ,_("Processing config file %s"), conf_file ); conf_parm_camera(motapp, conf_file); - /* The last ctx_cam thread would be ours, + /* The last ctx_dev thread would be ours, * set it as created from conf directory. */ i = 0; @@ -3788,7 +3788,7 @@ void conf_process(ctx_motapp *motapp, bool ismotapp, FILE *fp, int threadnbr) } /** Write the configuration(s) to the log */ -void conf_parms_log(ctx_cam **cam_list) +void conf_parms_log(ctx_dev **cam_list) { int i, threadnbr; bool diff_val; @@ -4029,9 +4029,9 @@ void conf_init_cams(ctx_motapp *motapp) FILE *fp = NULL; int indx, retcd; - motapp->cam_list = (ctx_cam**)calloc(sizeof(ctx_cam *), 2); - motapp->cam_list[0] = new ctx_cam; - memset(motapp->cam_list[0],0,sizeof(ctx_cam)); + motapp->cam_list = (ctx_dev**)calloc(sizeof(ctx_dev *), 2); + motapp->cam_list[0] = new ctx_dev; + memset(motapp->cam_list[0],0,sizeof(ctx_dev)); motapp->cam_list[1] = NULL; diff --git a/src/conf.hpp b/src/conf.hpp index 767fa4e0..b44d4317 100644 --- a/src/conf.hpp +++ b/src/conf.hpp @@ -243,7 +243,7 @@ void conf_init_app(ctx_motapp *motapp, int argc, char* argv[]); void conf_init_cams(ctx_motapp *motapp); void conf_deinit(ctx_motapp *motapp); - void conf_parms_log(ctx_cam **cam_list); + void conf_parms_log(ctx_dev **cam_list); void conf_parms_write(ctx_motapp *motapp); void conf_camera_add(ctx_motapp *motapp); @@ -256,14 +256,14 @@ void conf_edit_set(ctx_motapp *motapp, bool ismotapp, int threadnbr ,const char *parm_nm_chr, const char *parm_val_chr); - void conf_edit_get(ctx_cam *cam, std::string parm_nm + void conf_edit_get(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_CAT parm_cat); - void conf_edit_get(ctx_cam *cam, std::string parm_nm + void conf_edit_get(ctx_dev *cam, std::string parm_nm , char *parm_chr, enum PARM_CAT parm_cat); - void conf_edit_list(ctx_cam *cam, std::string parm_nm + void conf_edit_list(ctx_dev *cam, std::string parm_nm , std::string &parm_val, enum PARM_CAT parm_cat); - void conf_edit_list(ctx_cam *cam, std::string parm_nm + void conf_edit_list(ctx_dev *cam, std::string parm_nm , char *parm_chr, enum PARM_CAT parm_cat); std::string conf_type_desc(enum PARM_TYP ptype); diff --git a/src/dbse.cpp b/src/dbse.cpp index 44a4db89..b8eb4935 100644 --- a/src/dbse.cpp +++ b/src/dbse.cpp @@ -1282,7 +1282,7 @@ void dbse_exec_sql(ctx_motapp *motapp, const char *sqlquery) } /* Create and execute user provided sql with mutex lock*/ -void dbse_exec(ctx_cam *cam, char *filename +void dbse_exec(ctx_dev *cam, char *filename , int sqltype, struct timespec *ts1, const char *cmd) { char sqlquery[PATH_MAX]; @@ -1323,7 +1323,7 @@ void dbse_exec(ctx_cam *cam, char *filename } /* Add a record to motionplus table for new movies */ -void dbse_movies_addrec(ctx_cam *cam, ctx_movie *movie, timespec *ts1) +void dbse_movies_addrec(ctx_dev *cam, ctx_movie *movie, timespec *ts1) { std::string sqlquery; struct stat statbuf; diff --git a/src/dbse.hpp b/src/dbse.hpp index 9f3b408e..5f4b78ee 100644 --- a/src/dbse.hpp +++ b/src/dbse.hpp @@ -125,9 +125,9 @@ void dbse_init_motpls(ctx_motapp *motapp); void dbse_deinit(ctx_motapp *motapp); void dbse_deinit_motpls(ctx_motapp *motapp); - void dbse_exec(ctx_cam *cam, char *filename + void dbse_exec(ctx_dev *cam, char *filename , int sqltype, timespec *ts1, const char *cmd); void dbse_movies_getlist(ctx_motapp *motapp, int camera_id); - void dbse_movies_addrec(ctx_cam *cam, ctx_movie *movie, timespec *ts1); + void dbse_movies_addrec(ctx_dev *cam, ctx_movie *movie, timespec *ts1); #endif /* _INCLUDE_DBSE_HPP_ */ \ No newline at end of file diff --git a/src/draw.cpp b/src/draw.cpp index 75655c63..0cbd1524 100644 --- a/src/draw.cpp +++ b/src/draw.cpp @@ -1219,7 +1219,7 @@ int draw_init_chars(void) return 0; } -void draw_init_scale(ctx_cam *cam) +void draw_init_scale(ctx_dev *cam) { /* Consider that web interface may change conf values at any moment. @@ -1427,7 +1427,7 @@ static void draw_red_location(ctx_coord *cent, ctx_images *imgs, int width } } -void draw_locate_preview(ctx_cam *cam, ctx_image_data *img) +void draw_locate_preview(ctx_dev *cam, ctx_image_data *img) { /* draw locate box here when mode = LOCATE_PREVIEW */ if (cam->locate_motion_mode == LOCATE_PREVIEW) { @@ -1448,7 +1448,7 @@ void draw_locate_preview(ctx_cam *cam, ctx_image_data *img) } } -void draw_locate(ctx_cam *cam, ctx_image_data *img) +void draw_locate(ctx_dev *cam, ctx_image_data *img) { ctx_images *imgs = &cam->imgs; ctx_coord *location = &img->location; @@ -1471,7 +1471,7 @@ void draw_locate(ctx_cam *cam, ctx_image_data *img) } } -void draw_smartmask(ctx_cam *cam, unsigned char *out) +void draw_smartmask(ctx_dev *cam, unsigned char *out) { int i, x, v, width, height, line; ctx_images *imgs = &cam->imgs; @@ -1510,7 +1510,7 @@ void draw_smartmask(ctx_cam *cam, unsigned char *out) } } -void draw_fixed_mask(ctx_cam *cam, unsigned char *out) +void draw_fixed_mask(ctx_dev *cam, unsigned char *out) { int i, x, v, width, height, line; ctx_images *imgs = &cam->imgs; @@ -1549,7 +1549,7 @@ void draw_fixed_mask(ctx_cam *cam, unsigned char *out) } } -void draw_largest_label(ctx_cam *cam, unsigned char *out) +void draw_largest_label(ctx_dev *cam, unsigned char *out) { int i, x, v, width, height, line; ctx_images *imgs = &cam->imgs; diff --git a/src/draw.hpp b/src/draw.hpp index a1c2fd33..ddc14369 100644 --- a/src/draw.hpp +++ b/src/draw.hpp @@ -26,12 +26,12 @@ int startx, int starty, const char *text, int factor); int draw_init_chars(void); - void draw_init_scale(ctx_cam *cam); + void draw_init_scale(ctx_dev *cam); - void draw_locate_preview(ctx_cam *cam, ctx_image_data *img); - void draw_locate(ctx_cam *cam, ctx_image_data *img); - void draw_smartmask(ctx_cam *cam, unsigned char *out); - void draw_fixed_mask(ctx_cam *cam, unsigned char *out); - void draw_largest_label(ctx_cam *cam, unsigned char *out); + void draw_locate_preview(ctx_dev *cam, ctx_image_data *img); + void draw_locate(ctx_dev *cam, ctx_image_data *img); + void draw_smartmask(ctx_dev *cam, unsigned char *out); + void draw_fixed_mask(ctx_dev *cam, unsigned char *out); + void draw_largest_label(ctx_dev *cam, unsigned char *out); #endif /* _INCLUDE_DRAW_HPP_ */ \ No newline at end of file diff --git a/src/event.cpp b/src/event.cpp index 9c43e1d4..0a7f4290 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -55,7 +55,7 @@ const char *eventList[] = { "EVENT_LAST" }; -static void event_newfile(ctx_cam *cam, motion_event evnt +static void event_newfile(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -78,7 +78,7 @@ static void event_newfile(ctx_cam *cam, motion_event evnt * The scripts are executed with the filename of picture or movie appended * to the config parameter. */ -static void on_picture_save_command(ctx_cam *cam, motion_event evnt +static void on_picture_save_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -97,7 +97,7 @@ static void on_picture_save_command(ctx_cam *cam, motion_event evnt } } -static void on_motion_detected_command(ctx_cam *cam, motion_event evnt +static void on_motion_detected_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -112,7 +112,7 @@ static void on_motion_detected_command(ctx_cam *cam, motion_event evnt } } -static void on_area_command(ctx_cam *cam, motion_event evnt +static void on_area_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -127,7 +127,7 @@ static void on_area_command(ctx_cam *cam, motion_event evnt } } -static void on_event_start_command(ctx_cam *cam, motion_event evnt +static void on_event_start_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -142,7 +142,7 @@ static void on_event_start_command(ctx_cam *cam, motion_event evnt } } -static void on_event_end_command(ctx_cam *cam, motion_event evnt +static void on_event_end_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -157,7 +157,7 @@ static void on_event_end_command(ctx_cam *cam, motion_event evnt } } -static void event_stream_put(ctx_cam *cam, motion_event evnt +static void event_stream_put(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -171,7 +171,7 @@ static void event_stream_put(ctx_cam *cam, motion_event evnt } -static void event_vlp_putpipe(ctx_cam *cam, motion_event evnt +static void event_vlp_putpipe(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -187,14 +187,14 @@ static void event_vlp_putpipe(ctx_cam *cam, motion_event evnt } } -const char *imageext(ctx_cam *cam) { +const char *imageext(ctx_dev *cam) { if (cam->conf->picture_type == "ppm") return "ppm"; if (cam->conf->picture_type == "webp") return "webp"; return "jpg"; } -static void event_image_detect(ctx_cam *cam, motion_event evnt +static void event_image_detect(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -226,7 +226,7 @@ static void event_image_detect(ctx_cam *cam, motion_event evnt } } -static void event_imagem_detect(ctx_cam *cam, motion_event evnt +static void event_imagem_detect(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -266,7 +266,7 @@ static void event_imagem_detect(ctx_cam *cam, motion_event evnt } } -static void event_image_snapshot(ctx_cam *cam, motion_event evnt +static void event_image_snapshot(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -330,7 +330,7 @@ static void event_image_snapshot(ctx_cam *cam, motion_event evnt cam->snapshot = 0; } -static void event_image_preview(ctx_cam *cam, motion_event evnt +static void event_image_preview(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -371,7 +371,7 @@ static void event_image_preview(ctx_cam *cam, motion_event evnt } } -static void event_camera_lost(ctx_cam *cam, motion_event evnt +static void event_camera_lost(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -386,7 +386,7 @@ static void event_camera_lost(ctx_cam *cam, motion_event evnt } } -static void event_secondary_detect(ctx_cam *cam, motion_event evnt +static void event_secondary_detect(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -403,7 +403,7 @@ static void event_secondary_detect(ctx_cam *cam, motion_event evnt } } -static void event_camera_found(ctx_cam *cam, motion_event evnt +static void event_camera_found(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -418,7 +418,7 @@ static void event_camera_found(ctx_cam *cam, motion_event evnt } } -static void on_movie_end_command(ctx_cam *cam, motion_event evnt +static void on_movie_end_command(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -433,7 +433,7 @@ static void on_movie_end_command(ctx_cam *cam, motion_event evnt } } -static void event_extpipe_end(ctx_cam *cam, motion_event evnt +static void event_extpipe_end(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -471,7 +471,7 @@ static void event_extpipe_end(ctx_cam *cam, motion_event evnt } } -static void event_extpipe_start(ctx_cam *cam, motion_event evnt +static void event_extpipe_start(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -544,7 +544,7 @@ static void event_extpipe_start(ctx_cam *cam, motion_event evnt } } -static void event_extpipe_put(ctx_cam *cam, motion_event evnt +static void event_extpipe_put(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -579,7 +579,7 @@ static void event_extpipe_put(ctx_cam *cam, motion_event evnt } } -static void event_movie_start(ctx_cam *cam, motion_event evnt +static void event_movie_start(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { int retcd; @@ -602,7 +602,7 @@ static void event_movie_start(ctx_cam *cam, motion_event evnt retcd = movie_init_norm(cam, ts1); if (retcd < 0) { MOTION_LOG(ERR, TYPE_EVENTS, NO_ERRNO - ,_("Error opening ctx_cam for movie output.")); + ,_("Error opening ctx_dev for movie output.")); myfree(&cam->movie_norm); return; } @@ -621,7 +621,7 @@ static void event_movie_start(ctx_cam *cam, motion_event evnt } } -static void event_movie_put(ctx_cam *cam, motion_event evnt +static void event_movie_put(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -641,7 +641,7 @@ static void event_movie_put(ctx_cam *cam, motion_event evnt } } -static void event_movie_end(ctx_cam *cam, motion_event evnt +static void event_movie_end(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -709,7 +709,7 @@ static void event_movie_end(ctx_cam *cam, motion_event evnt } -static void event_tlapse_start(ctx_cam *cam, motion_event evnt +static void event_tlapse_start(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -739,7 +739,7 @@ static void event_tlapse_start(ctx_cam *cam, motion_event evnt } -static void event_tlapse_end(ctx_cam *cam, motion_event evnt +static void event_tlapse_end(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname, void *ftype, struct timespec *ts1) { @@ -905,7 +905,7 @@ struct event_handlers event_handlers[] = { * The split between unsigned images and signed filenames was introduced in 3.2.2 * as a code reading friendly solution to avoid a stream of compiler warnings in gcc 4.0. */ -void event(ctx_cam *cam, motion_event evnt +void event(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname,void *ftype, struct timespec *ts1) { int i=-1; diff --git a/src/event.hpp b/src/event.hpp index 18e917c9..1c93f2d3 100644 --- a/src/event.hpp +++ b/src/event.hpp @@ -44,11 +44,11 @@ typedef enum { EVENT_LAST, } motion_event; -typedef void(* event_handler)(ctx_cam *cam, motion_event, ctx_image_data *, +typedef void(* event_handler)(ctx_dev *cam, motion_event, ctx_image_data *, char *, void *, struct timespec *); -void event(ctx_cam *cam, motion_event evnt +void event(ctx_dev *cam, motion_event evnt ,ctx_image_data *img_data, char *fname,void *ftype, struct timespec *ts1); -const char * imageext(ctx_cam *cam); +const char * imageext(ctx_dev *cam); #endif /* _INCLUDE_EVENT_HPP_ */ diff --git a/src/exif.cpp b/src/exif.cpp index 1f4d675c..268b812f 100644 --- a/src/exif.cpp +++ b/src/exif.cpp @@ -164,7 +164,7 @@ static void put_subjectarea(struct tiff_writing *into, ctx_coord *box) * exif data to be inserted into jpeg or webp files * */ -unsigned exif_prepare(unsigned char **exif, ctx_cam *cam, +unsigned exif_prepare(unsigned char **exif, ctx_dev *cam, const struct timespec *ts_in1, ctx_coord *box) { /* description, datetime, and subtime are the values that are actually diff --git a/src/exif.hpp b/src/exif.hpp index 0d3771be..43482bd2 100644 --- a/src/exif.hpp +++ b/src/exif.hpp @@ -24,7 +24,7 @@ #ifndef _INCLUDE_EXIF_HPP_ #define _INCLUDE_EXIF_HPP_ - unsigned exif_prepare(unsigned char **exif, ctx_cam *cam, + unsigned exif_prepare(unsigned char **exif, ctx_dev *cam, const struct timespec *ts_in1, ctx_coord *box); #endif /* _INCLUDE_EXIF_HPP_ */ \ No newline at end of file diff --git a/src/jpegutils.cpp b/src/jpegutils.cpp index ebe15ce9..64671274 100644 --- a/src/jpegutils.cpp +++ b/src/jpegutils.cpp @@ -394,7 +394,7 @@ static GLOBAL(int) _jpeg_mem_size(j_compress_ptr cinfo) * It must be called after jpeg_start_compress() but before * any image data is written by jpeg_write_scanlines(). */ -static void put_jpeg_exif(j_compress_ptr cinfo, ctx_cam *cam, +static void put_jpeg_exif(j_compress_ptr cinfo, ctx_dev *cam, const struct timespec *ts1, ctx_coord *box) { unsigned char *exif = NULL; @@ -523,7 +523,7 @@ int jpgutl_decode_jpeg (unsigned char *jpeg_data_in, int jpeg_data_len, int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size, unsigned char *input_image, int width, int height, int quality, - ctx_cam *cam, struct timespec *ts1, ctx_coord *box) + ctx_dev *cam, struct timespec *ts1, ctx_coord *box) { int i, j, jpeg_image_size; @@ -612,7 +612,7 @@ int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size, int jpgutl_put_grey(unsigned char *dest_image, int image_size, unsigned char *input_image, int width, int height, int quality, - ctx_cam *cam, struct timespec *ts1, ctx_coord *box) + ctx_dev *cam, struct timespec *ts1, ctx_coord *box) { int y, dest_image_size; JSAMPROW row_ptr[1]; diff --git a/src/jpegutils.hpp b/src/jpegutils.hpp index ed082bd4..44b16c59 100644 --- a/src/jpegutils.hpp +++ b/src/jpegutils.hpp @@ -26,9 +26,9 @@ unsigned int width, unsigned int height, unsigned char *volatile img_out); int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size, unsigned char *input_image, int width, int height, int quality, - ctx_cam *cam, struct timespec *ts1, ctx_coord *box); + ctx_dev *cam, struct timespec *ts1, ctx_coord *box); int jpgutl_put_grey(unsigned char *dest_image, int image_size, unsigned char *input_image, int width, int height, int quality, - ctx_cam *cam, struct timespec *ts1, ctx_coord *box); + ctx_dev *cam, struct timespec *ts1, ctx_coord *box); #endif /* _INCLUDE_JPEGUTILS_HPP_ */ diff --git a/src/libcam.cpp b/src/libcam.cpp index 84ebd095..df7d2183 100644 --- a/src/libcam.cpp +++ b/src/libcam.cpp @@ -46,7 +46,7 @@ using namespace libcamera; -void cls_libcam::cam_start_params(ctx_cam *ptr) +void cls_libcam::cam_start_params(ctx_dev *ptr) { int indx; @@ -263,7 +263,7 @@ void cls_libcam::req_complete(Request *request) req_queue.push(request); } -int cls_libcam::cam_start(ctx_cam *cam) +int cls_libcam::cam_start(ctx_dev *cam) { int retcd; @@ -371,7 +371,7 @@ int cls_libcam::cam_next(ctx_image_data *img_data) #endif /** close and stop libcam */ -void libcam_cleanup(ctx_cam *cam) +void libcam_cleanup(ctx_dev *cam) { #ifdef HAVE_LIBCAM cam->libcam->cam_stop(); @@ -382,7 +382,7 @@ void libcam_cleanup(ctx_cam *cam) } /** initialize and start libcam */ -void libcam_start(ctx_cam *cam) +void libcam_start(ctx_dev *cam) { #ifdef HAVE_LIBCAM int retcd; @@ -404,7 +404,7 @@ void libcam_start(ctx_cam *cam) /** get next image from libcam */ -int libcam_next(ctx_cam *cam, ctx_image_data *img_data) +int libcam_next(ctx_dev *cam, ctx_image_data *img_data) { #ifdef HAVE_LIBCAM int retcd; diff --git a/src/libcam.hpp b/src/libcam.hpp index 2791a499..225f2c71 100644 --- a/src/libcam.hpp +++ b/src/libcam.hpp @@ -36,11 +36,11 @@ public: cls_libcam(){}; ~cls_libcam(){}; - int cam_start(ctx_cam *cam); + int cam_start(ctx_dev *cam); void cam_stop(); int cam_next(ctx_image_data *img_data); private: - ctx_cam *camctx; + ctx_dev *camctx; ctx_params *params; std::unique_ptr cam_mgr; @@ -57,7 +57,7 @@ bool started_aqr; bool started_req; - void cam_start_params(ctx_cam *ptr); + void cam_start_params(ctx_dev *ptr); int cam_start_mgr(); int cam_start_config(); int cam_start_req(); @@ -73,8 +73,8 @@ }; #endif - void libcam_start (ctx_cam *cam); - int libcam_next (ctx_cam *cam, ctx_image_data *img_data); - void libcam_cleanup (ctx_cam *cam); + void libcam_start (ctx_dev *cam); + int libcam_next (ctx_dev *cam, ctx_image_data *img_data); + void libcam_cleanup (ctx_dev *cam); #endif /* _INCLUDE_LIBCAM_HPP_ */ diff --git a/src/motion_loop.cpp b/src/motion_loop.cpp index 723d5e05..b0ce58ea 100644 --- a/src/motion_loop.cpp +++ b/src/motion_loop.cpp @@ -41,7 +41,7 @@ #include "webu_stream.hpp" /* Resize the image ring */ -static void mlp_ring_resize(ctx_cam *cam) +static void mlp_ring_resize(ctx_dev *cam) { int i, new_size; ctx_image_data *tmp; @@ -74,7 +74,7 @@ static void mlp_ring_resize(ctx_cam *cam) } /* Clean image ring */ -static void mlp_ring_destroy(ctx_cam *cam) +static void mlp_ring_destroy(ctx_dev *cam) { int i; @@ -98,7 +98,7 @@ static void mlp_ring_destroy(ctx_cam *cam) } /* Add debug messsage to image */ -static void mlp_ring_process_debug(ctx_cam *cam) +static void mlp_ring_process_debug(ctx_dev *cam) { char tmp[32]; const char *t; @@ -124,7 +124,7 @@ static void mlp_ring_process_debug(ctx_cam *cam) } /* Process the entire image ring */ -static void mlp_ring_process(ctx_cam *cam) +static void mlp_ring_process(ctx_dev *cam) { ctx_image_data *saved_current_image = cam->current_image; @@ -170,7 +170,7 @@ static void mlp_ring_process(ctx_cam *cam) } /* Reset the image info variables*/ -static void mlp_info_reset(ctx_cam *cam) +static void mlp_info_reset(ctx_dev *cam) { cam->info_diff_cnt = 0; cam->info_diff_tot = 0; @@ -180,7 +180,7 @@ static void mlp_info_reset(ctx_cam *cam) } /* Process the motion detected items*/ -static void mlp_detected_trigger(ctx_cam *cam, ctx_image_data *img) +static void mlp_detected_trigger(ctx_dev *cam, ctx_image_data *img) { time_t raw_time; struct tm evt_tm; @@ -222,7 +222,7 @@ static void mlp_detected_trigger(ctx_cam *cam, ctx_image_data *img) } /* call ptz camera center */ -static void mlp_track_center(ctx_cam *cam) +static void mlp_track_center(ctx_dev *cam) { if ((cam->conf->ptz_auto_track) && (cam->conf->ptz_move_track != "")) { cam->track_posx = 0; @@ -233,7 +233,7 @@ static void mlp_track_center(ctx_cam *cam) } /* call ptz camera move */ -static void mlp_track_move(ctx_cam *cam, ctx_coord *cent) +static void mlp_track_move(ctx_dev *cam, ctx_coord *cent) { if ((cam->conf->ptz_auto_track) && (cam->conf->ptz_move_track != "")) { cam->track_posx += cent->x; @@ -244,7 +244,7 @@ static void mlp_track_move(ctx_cam *cam, ctx_coord *cent) } /* motion detected */ -static void mlp_detected(ctx_cam *cam, ctx_image_data *img) +static void mlp_detected(ctx_dev *cam, ctx_image_data *img) { ctx_config *conf = cam->conf; unsigned int distX, distY; @@ -273,7 +273,7 @@ static void mlp_detected(ctx_cam *cam, ctx_image_data *img) } /* Apply the privacy mask to image*/ -static void mlp_mask_privacy(ctx_cam *cam) +static void mlp_mask_privacy(ctx_dev *cam) { if (cam->imgs.mask_privacy == NULL) { return; @@ -357,7 +357,7 @@ static void mlp_mask_privacy(ctx_cam *cam) } /* Close and clean up camera*/ -void mlp_cam_close(ctx_cam *cam) +void mlp_cam_close(ctx_dev *cam) { if (cam->libcam != NULL) { libcam_cleanup(cam); @@ -380,7 +380,7 @@ void mlp_cam_close(ctx_cam *cam) } /* Start camera */ -void mlp_cam_start(ctx_cam *cam) +void mlp_cam_start(ctx_dev *cam) { if (cam->camera_type == CAMERA_TYPE_LIBCAM) { libcam_start(cam); @@ -396,7 +396,7 @@ void mlp_cam_start(ctx_cam *cam) } /* Get next image from camera */ -int mlp_cam_next(ctx_cam *cam, ctx_image_data *img_data) +int mlp_cam_next(ctx_dev *cam, ctx_image_data *img_data) { if (cam->camera_type == CAMERA_TYPE_LIBCAM) { return libcam_next(cam, img_data); @@ -410,7 +410,7 @@ int mlp_cam_next(ctx_cam *cam, ctx_image_data *img_data) } /* Assign the camera type */ -static void mlp_init_camera_type(ctx_cam *cam) +static void mlp_init_camera_type(ctx_dev *cam) { if (cam->conf->libcam_name != "") { cam->camera_type = CAMERA_TYPE_LIBCAM; @@ -428,7 +428,7 @@ static void mlp_init_camera_type(ctx_cam *cam) } /** Get first images from camera at startup */ -static void mlp_init_firstimage(ctx_cam *cam) +static void mlp_init_firstimage(ctx_dev *cam) { int indx; const char *msg; @@ -462,7 +462,7 @@ static void mlp_init_firstimage(ctx_cam *cam) } /** Check the image size to determine if modulo 8 and over 64 */ -static void mlp_check_szimg(ctx_cam *cam) +static void mlp_check_szimg(ctx_dev *cam) { if ((cam->imgs.width % 8) || (cam->imgs.height % 8)) { MOTION_LOG(CRT, TYPE_NETCAM, NO_ERRNO @@ -485,7 +485,7 @@ static void mlp_check_szimg(ctx_cam *cam) } /** Set the items required for the area detect */ -static void mlp_init_areadetect(ctx_cam *cam) +static void mlp_init_areadetect(ctx_dev *cam) { cam->area_minx[0] = cam->area_minx[3] = cam->area_minx[6] = 0; cam->area_miny[0] = cam->area_miny[1] = cam->area_miny[2] = 0; @@ -509,7 +509,7 @@ static void mlp_init_areadetect(ctx_cam *cam) } /** Allocate the required buffers */ -static void mlp_init_buffers(ctx_cam *cam) +static void mlp_init_buffers(ctx_dev *cam) { cam->imgs.ref =(unsigned char*) mymalloc(cam->imgs.size_norm); cam->imgs.image_motion.image_norm = (unsigned char*)mymalloc(cam->imgs.size_norm); @@ -536,7 +536,7 @@ static void mlp_init_buffers(ctx_cam *cam) } /* Initialize loop values */ -static void mlp_init_values(ctx_cam *cam) +static void mlp_init_values(ctx_dev *cam) { cam->event_nr = 1; cam->prev_event = 0; @@ -566,7 +566,7 @@ static void mlp_init_values(ctx_cam *cam) } /* start the camera */ -static void mlp_init_cam_start(ctx_cam *cam) +static void mlp_init_cam_start(ctx_dev *cam) { mlp_cam_start(cam); @@ -583,7 +583,7 @@ static void mlp_init_cam_start(ctx_cam *cam) } /* initialize reference images*/ -static void mlp_init_ref(ctx_cam *cam) +static void mlp_init_ref(ctx_dev *cam) { memcpy(cam->imgs.image_virgin, cam->current_image->image_norm, cam->imgs.size_norm); @@ -595,7 +595,7 @@ static void mlp_init_ref(ctx_cam *cam) } /** clean up all memory etc. from motion init */ -void mlp_cleanup(ctx_cam *cam) +void mlp_cleanup(ctx_dev *cam) { event(cam, EVENT_TLAPSE_END, NULL, NULL, NULL, NULL); if (cam->event_nr == cam->prev_event) { @@ -653,7 +653,7 @@ void mlp_cleanup(ctx_cam *cam) } /* initialize everything for the loop */ -static void mlp_init(ctx_cam *cam) +static void mlp_init(ctx_dev *cam) { if ((cam->camera_status != STATUS_INIT) && (cam->camera_status != STATUS_RESET)) { @@ -712,7 +712,7 @@ static void mlp_init(ctx_cam *cam) /* check the area detect */ -static void mlp_areadetect(ctx_cam *cam) +static void mlp_areadetect(ctx_dev *cam) { int i, j, z = 0; @@ -739,7 +739,7 @@ static void mlp_areadetect(ctx_cam *cam) } /* Prepare for the next iteration of loop*/ -static void mlp_prepare(ctx_cam *cam) +static void mlp_prepare(ctx_dev *cam) { cam->watchdog = cam->conf->watchdog_tmo; @@ -764,7 +764,7 @@ static void mlp_prepare(ctx_cam *cam) } /* reset the images */ -static void mlp_resetimages(ctx_cam *cam) +static void mlp_resetimages(ctx_dev *cam) { /* ring_buffer_in is pointing to current pos, update before put in a new image */ if (++cam->imgs.ring_in >= cam->imgs.ring_size) { @@ -793,7 +793,7 @@ static void mlp_resetimages(ctx_cam *cam) } /* Try to reconnect to camera */ -static void mlp_retry(ctx_cam *cam) +static void mlp_retry(ctx_dev *cam) { int size_high; @@ -825,7 +825,7 @@ static void mlp_retry(ctx_cam *cam) } /* Get next image from camera */ -static int mlp_capture(ctx_cam *cam) +static int mlp_capture(ctx_dev *cam) { const char *tmpin; char tmpout[80]; @@ -895,7 +895,7 @@ static int mlp_capture(ctx_cam *cam) } /* call detection */ -static void mlp_detection(ctx_cam *cam) +static void mlp_detection(ctx_dev *cam) { if (cam->frame_skip) { cam->frame_skip--; @@ -913,7 +913,7 @@ static void mlp_detection(ctx_cam *cam) } /* tune the detection parameters*/ -static void mlp_tuning(ctx_cam *cam) +static void mlp_tuning(ctx_dev *cam) { if ((cam->conf->noise_tune && cam->shots == 0) && (!cam->detecting_motion && (cam->current_image->diffs <= cam->threshold))) { @@ -946,7 +946,7 @@ static void mlp_tuning(ctx_cam *cam) } /* apply image overlays */ -static void mlp_overlay(ctx_cam *cam) +static void mlp_overlay(ctx_dev *cam) { char tmp[PATH_MAX]; @@ -1016,7 +1016,7 @@ static void mlp_overlay(ctx_cam *cam) } /* emulate motion */ -static void mlp_actions_emulate(ctx_cam *cam) +static void mlp_actions_emulate(ctx_dev *cam) { int indx; @@ -1039,7 +1039,7 @@ static void mlp_actions_emulate(ctx_cam *cam) } /* call the actions */ -static void mlp_actions_motion(ctx_cam *cam) +static void mlp_actions_motion(ctx_dev *cam) { int indx, frame_count = 0; int pos = cam->imgs.ring_in; @@ -1081,7 +1081,7 @@ static void mlp_actions_motion(ctx_cam *cam) } /* call the event actions*/ -static void mlp_actions_event(ctx_cam *cam) +static void mlp_actions_event(ctx_dev *cam) { if ((cam->conf->event_gap > 0) && ((cam->frame_curr_ts.tv_sec - cam->lasttime ) >= cam->conf->event_gap)) { @@ -1132,7 +1132,7 @@ static void mlp_actions_event(ctx_cam *cam) } -static void mlp_actions(ctx_cam *cam) +static void mlp_actions(ctx_dev *cam) { if ((cam->current_image->diffs > cam->threshold) && (cam->current_image->diffs < cam->threshold_maximum)) { @@ -1189,7 +1189,7 @@ static void mlp_actions(ctx_cam *cam) } /* Process for setup mode */ -static void mlp_setupmode(ctx_cam *cam) +static void mlp_setupmode(ctx_dev *cam) { if (cam->motapp->setup_mode) { char msg[1024] = "\0"; @@ -1223,7 +1223,7 @@ static void mlp_setupmode(ctx_cam *cam) } /* Snapshot interval*/ -static void mlp_snapshot(ctx_cam *cam) +static void mlp_snapshot(ctx_dev *cam) { if ((cam->conf->snapshot_interval > 0 && cam->shots == 0 && cam->frame_curr_ts.tv_sec % cam->conf->snapshot_interval <= @@ -1235,7 +1235,7 @@ static void mlp_snapshot(ctx_cam *cam) } /* Create timelapse video*/ -static void mlp_timelapse(ctx_cam *cam) +static void mlp_timelapse(ctx_dev *cam) { struct tm timestamp_tm; @@ -1285,7 +1285,7 @@ static void mlp_timelapse(ctx_cam *cam) } /* send images to loopback device*/ -static void mlp_loopback(ctx_cam *cam) +static void mlp_loopback(ctx_dev *cam) { if (cam->motapp->setup_mode) { event(cam, EVENT_IMAGE, &cam->imgs.image_motion, NULL, &cam->pipe, &cam->current_image->imgts); @@ -1302,7 +1302,7 @@ static void mlp_loopback(ctx_cam *cam) } /* Update parameters from web interface*/ -static void mlp_parmsupdate(ctx_cam *cam) +static void mlp_parmsupdate(ctx_dev *cam) { /* Check for some config parameter changes but only every second */ if (cam->shots != 0) { @@ -1377,7 +1377,7 @@ static void mlp_parmsupdate(ctx_cam *cam) } /* sleep the loop to get framerate requested */ -static void mlp_frametiming(ctx_cam *cam) +static void mlp_frametiming(ctx_dev *cam) { int indx; struct timespec ts2; @@ -1421,7 +1421,7 @@ static void mlp_frametiming(ctx_cam *cam) /** main processing loop for each camera */ void *motion_loop(void *arg) { - ctx_cam *cam =(ctx_cam *) arg; + ctx_dev *cam =(ctx_dev *) arg; cam->running_cam = true; diff --git a/src/motion_loop.hpp b/src/motion_loop.hpp index e97c6d7d..270801a6 100644 --- a/src/motion_loop.hpp +++ b/src/motion_loop.hpp @@ -23,6 +23,6 @@ #define _INCLUDE_MOTION_LOOP_HPP_ void *motion_loop(void *arg); -void mlp_cleanup(ctx_cam *cam); +void mlp_cleanup(ctx_dev *cam); #endif /* _INCLUDE_MOTION_LOOP_HPP_ */ \ No newline at end of file diff --git a/src/motionplus.cpp b/src/motionplus.cpp index 346d3168..893cb2ea 100644 --- a/src/motionplus.cpp +++ b/src/motionplus.cpp @@ -272,9 +272,9 @@ static void motion_shutdown(ctx_motapp *motapp) } -static void motion_camera_ids(ctx_cam **cam_list) +static void motion_camera_ids(ctx_dev **cam_list) { - /* Set the camera id's on the ctx_cam. They must be unique */ + /* Set the camera id's on the ctx_dev. They must be unique */ int indx, indx2; int invalid_ids; @@ -643,7 +643,7 @@ static void motion_cam_add(ctx_motapp *motapp) static void motion_cam_delete(ctx_motapp *motapp) { int indx_cam, indx; - ctx_cam **tmp; + ctx_dev **tmp; if (motapp->cam_delete == 0) { return; @@ -666,7 +666,7 @@ static void motion_cam_delete(ctx_motapp *motapp) motapp->cam_list[motapp->cam_delete] = NULL; /* Set up a new cam_list */ - tmp = (ctx_cam **)mymalloc(sizeof(ctx_cam *) * indx_cam); + tmp = (ctx_dev **)mymalloc(sizeof(ctx_dev *) * indx_cam); tmp[indx_cam-1] = NULL; /* Copy all the other cam pointers */ diff --git a/src/motionplus.hpp b/src/motionplus.hpp index 07700d73..7e815ab8 100644 --- a/src/motionplus.hpp +++ b/src/motionplus.hpp @@ -299,7 +299,7 @@ struct ctx_stream { ctx_stream_data secondary; /* Copy of the image to use for web stream*/ }; -struct ctx_cam { +struct ctx_dev { ctx_motapp *motapp; char conf_filename[PATH_MAX]; @@ -406,7 +406,7 @@ struct ctx_cam { /* ctx_motapp for whole motion application including all the cameras */ struct ctx_motapp { - ctx_cam **cam_list; + ctx_dev **cam_list; pthread_mutex_t global_lock; volatile int threads_running; diff --git a/src/movie.cpp b/src/movie.cpp index 8a62ba2a..7b8ec962 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1640,7 +1640,7 @@ void movie_reset_start_time(ctx_movie *movie, const struct timespec *ts1) } -static const char* movie_init_container(ctx_cam *cam) +static const char* movie_init_container(ctx_dev *cam) { /* The following section allows for testing of all the various containers @@ -1684,7 +1684,7 @@ static const char* movie_init_container(ctx_cam *cam) } -int movie_init_norm(ctx_cam *cam, struct timespec *ts1) +int movie_init_norm(ctx_dev *cam, struct timespec *ts1) { char tmp[PATH_MAX]; const char *container; @@ -1758,7 +1758,7 @@ int movie_init_norm(ctx_cam *cam, struct timespec *ts1) } -int movie_init_motion(ctx_cam *cam, struct timespec *ts1) +int movie_init_motion(ctx_dev *cam, struct timespec *ts1) { char tmp[PATH_MAX]; const char *container; @@ -1825,7 +1825,7 @@ int movie_init_motion(ctx_cam *cam, struct timespec *ts1) } -int movie_init_timelapse(ctx_cam *cam, struct timespec *ts1) +int movie_init_timelapse(ctx_dev *cam, struct timespec *ts1) { char tmp[PATH_MAX]; const char *container_mpg = "mpg"; diff --git a/src/movie.hpp b/src/movie.hpp index a8908d70..0dff18b1 100644 --- a/src/movie.hpp +++ b/src/movie.hpp @@ -90,9 +90,9 @@ int movie_open(ctx_movie *movie); int movie_put_image(ctx_movie *movie, ctx_image_data *img_data, const struct timespec *tv1); void movie_close(ctx_movie *movie); void movie_reset_start_time(ctx_movie *movie, const struct timespec *tv1); -int movie_init_timelapse(ctx_cam *cam, struct timespec *ts1); -int movie_init_norm(ctx_cam *cam, struct timespec *ts1); -int movie_init_motion(ctx_cam *cam, struct timespec *ts1); +int movie_init_timelapse(ctx_dev *cam, struct timespec *ts1); +int movie_init_norm(ctx_dev *cam, struct timespec *ts1); +int movie_init_motion(ctx_dev *cam, struct timespec *ts1); void movie_free(ctx_movie *movie); #endif /* #define _INCLUDE_MOVIE_HPP_ */ diff --git a/src/netcam.cpp b/src/netcam.cpp index 158730c0..af4158a9 100644 --- a/src/netcam.cpp +++ b/src/netcam.cpp @@ -326,7 +326,7 @@ static void netcam_close_context(ctx_netcam *netcam) } -static void netcam_pktarray_resize(ctx_cam *cam, bool is_highres) +static void netcam_pktarray_resize(ctx_dev *cam, bool is_highres) { /* This is called from netcam_next and is on the motion loop thread * The netcam->mutex is locked around the call to this function. @@ -1435,7 +1435,7 @@ static void netcam_set_options(ctx_netcam *netcam) } -static void netcam_set_path (ctx_cam *cam, ctx_netcam *netcam ) +static void netcam_set_path (ctx_dev *cam, ctx_netcam *netcam ) { char userpass[PATH_MAX]; @@ -1494,7 +1494,7 @@ static void netcam_set_path (ctx_cam *cam, ctx_netcam *netcam ) } -static void netcam_set_parms (ctx_cam *cam, ctx_netcam *netcam ) +static void netcam_set_parms (ctx_dev *cam, ctx_netcam *netcam ) { /* Set the parameters to be used with our camera */ int indx, val_len; @@ -1586,7 +1586,7 @@ static void netcam_set_parms (ctx_cam *cam, ctx_netcam *netcam ) } -static void netcam_set_dimensions (ctx_cam *cam) +static void netcam_set_dimensions (ctx_dev *cam) { cam->imgs.width = 0; @@ -2099,7 +2099,7 @@ static int netcam_start_handler(ctx_netcam *netcam) } -void netcam_cleanup(ctx_cam *cam) +void netcam_cleanup(ctx_dev *cam) { int wait_counter; int indx_cam, indx_max; @@ -2163,7 +2163,7 @@ void netcam_cleanup(ctx_cam *cam) } -void netcam_start(ctx_cam *cam) +void netcam_start(ctx_dev *cam) { int indx_cam, indx_max; ctx_netcam *netcam; @@ -2248,7 +2248,7 @@ void netcam_start(ctx_cam *cam) } /* netcam_next (Called from the motion loop thread) */ -int netcam_next(ctx_cam *cam, ctx_image_data *img_data) +int netcam_next(ctx_dev *cam, ctx_image_data *img_data) { if ((cam == NULL) || (cam->netcam == NULL)) { return CAPTURE_FAILURE; diff --git a/src/netcam.hpp b/src/netcam.hpp index e4ad5afc..f06a7827 100644 --- a/src/netcam.hpp +++ b/src/netcam.hpp @@ -149,8 +149,8 @@ struct ctx_netcam { }; -void netcam_start(ctx_cam *cam); -int netcam_next(ctx_cam *cam, ctx_image_data *img_data); -void netcam_cleanup(ctx_cam *cam); +void netcam_start(ctx_dev *cam); +int netcam_next(ctx_dev *cam, ctx_image_data *img_data); +void netcam_cleanup(ctx_dev *cam); #endif /* _INCLUDE_NETCAM_HPP_ */ diff --git a/src/picture.cpp b/src/picture.cpp index 9f8027ee..d4dd923b 100644 --- a/src/picture.cpp +++ b/src/picture.cpp @@ -39,7 +39,7 @@ * It must be called after WebPEncode() and the result * can then be written out to webp a file */ -static void pic_webp_exif(WebPMux* webp_mux, ctx_cam *cam, +static void pic_webp_exif(WebPMux* webp_mux, ctx_dev *cam, const struct timespec *ts1, ctx_coord *box) { unsigned char *exif = NULL; @@ -65,7 +65,7 @@ static void pic_webp_exif(WebPMux* webp_mux, ctx_cam *cam, /** Save image as webp to file */ static void pic_save_webp(FILE *fp, unsigned char *image, int width, int height, - int quality, ctx_cam *cam, struct timespec *ts1, ctx_coord *box) + int quality, ctx_dev *cam, struct timespec *ts1, ctx_coord *box) { #ifdef HAVE_WEBP /* Create a config present and check for compatible library version */ @@ -155,7 +155,7 @@ static void pic_save_webp(FILE *fp, unsigned char *image, int width, int height, /** Save image as yuv420p jpeg to file */ static void pic_save_yuv420p(FILE *fp, unsigned char *image, int width, int height, - int quality, ctx_cam *cam, struct timespec *ts1, ctx_coord *box) + int quality, ctx_dev *cam, struct timespec *ts1, ctx_coord *box) { int sz, image_size; @@ -172,7 +172,7 @@ static void pic_save_yuv420p(FILE *fp, unsigned char *image, int width, int heig /** Save image as grey jpeg to file */ static void pic_save_grey(FILE *picture, unsigned char *image, int width, int height, - int quality, ctx_cam *cam, struct timespec *ts1, ctx_coord *box) + int quality, ctx_dev *cam, struct timespec *ts1, ctx_coord *box) { int sz, image_size; @@ -254,7 +254,7 @@ static void pic_save_ppm(FILE *picture, unsigned char *image, int width, int hei /** Put picture into memory as jpg */ -int pic_put_memory(ctx_cam *cam, unsigned char* dest_image, int image_size +int pic_put_memory(ctx_dev *cam, unsigned char* dest_image, int image_size , unsigned char *image, int quality, int width, int height) { struct timespec ts1; @@ -272,7 +272,7 @@ int pic_put_memory(ctx_cam *cam, unsigned char* dest_image, int image_size } /* Write the picture to a file */ -static void pic_write(ctx_cam *cam, FILE *picture, unsigned char *image, int quality, int ftype) +static void pic_write(ctx_dev *cam, FILE *picture, unsigned char *image, int quality, int ftype) { int width, height; int passthrough; @@ -302,7 +302,7 @@ static void pic_write(ctx_cam *cam, FILE *picture, unsigned char *image, int qua } /* Saves image to a file in format requested */ -void pic_save_norm(ctx_cam *cam, char *file, unsigned char *image, int ftype) +void pic_save_norm(ctx_dev *cam, char *file, unsigned char *image, int ftype) { FILE *picture; @@ -330,7 +330,7 @@ void pic_save_norm(ctx_cam *cam, char *file, unsigned char *image, int ftype) } /* Saves image to a file in format requested */ -void pic_save_roi(ctx_cam *cam, char *file, unsigned char *image) +void pic_save_roi(ctx_dev *cam, char *file, unsigned char *image) { FILE *picture; int image_size, sz, indxh; @@ -464,7 +464,7 @@ unsigned char *pic_load_pgm(FILE *picture, int width, int height) } /** Write out a base mask file if needed */ -static void pic_write_mask(ctx_cam *cam, const char *file) +static void pic_write_mask(ctx_dev *cam, const char *file) { FILE *picture; @@ -521,7 +521,7 @@ void pic_scale_img(int width_src, int height_src, unsigned char *img_src, unsign return; } -void pic_save_preview(ctx_cam *cam, ctx_image_data *img) +void pic_save_preview(ctx_dev *cam, ctx_image_data *img) { unsigned char *image_norm, *image_high; @@ -554,7 +554,7 @@ void pic_save_preview(ctx_cam *cam, ctx_image_data *img) } -void pic_init_privacy(ctx_cam *cam) +void pic_init_privacy(ctx_dev *cam) { int indxrow, indxcol; @@ -664,7 +664,7 @@ void pic_init_privacy(ctx_cam *cam) } -void pic_init_mask(ctx_cam *cam) +void pic_init_mask(ctx_dev *cam) { FILE *picture; diff --git a/src/picture.hpp b/src/picture.hpp index 69de9a22..899ca385 100644 --- a/src/picture.hpp +++ b/src/picture.hpp @@ -20,16 +20,16 @@ #ifndef _INCLUDE_PICTURE_HPP_ #define _INCLUDE_PICTURE_HPP_ - struct ctx_cam; + struct ctx_dev; - int pic_put_memory(struct ctx_cam *cam, unsigned char* dest_image + int pic_put_memory(struct ctx_dev *cam, unsigned char* dest_image , int image_size, unsigned char *image, int quality, int width, int height); - void pic_save_norm(struct ctx_cam *cam, char *file, unsigned char *image, int ftype); - void pic_save_roi(struct ctx_cam *cam, char *file, unsigned char *image); + void pic_save_norm(struct ctx_dev *cam, char *file, unsigned char *image, int ftype); + void pic_save_roi(struct ctx_dev *cam, char *file, unsigned char *image); unsigned char *pic_load_pgm(FILE *picture, int width, int height); void pic_scale_img(int width_src, int height_src, unsigned char *img_src, unsigned char *img_dst); - void pic_save_preview(struct ctx_cam *cam, struct ctx_image_data *img); - void pic_init_privacy(struct ctx_cam *cam); - void pic_init_mask(struct ctx_cam *cam); + void pic_save_preview(struct ctx_dev *cam, struct ctx_image_data *img); + void pic_init_privacy(struct ctx_dev *cam); + void pic_init_mask(struct ctx_dev *cam); #endif /* _INCLUDE_PICTURE_HPP_ */ diff --git a/src/rotate.cpp b/src/rotate.cpp index b8b455d8..95369505 100644 --- a/src/rotate.cpp +++ b/src/rotate.cpp @@ -177,7 +177,7 @@ static inline void rot90ccw(unsigned char *src, unsigned char *dst, int size, in * * Returns: nothing */ -void rotate_init(ctx_cam *cam) +void rotate_init(ctx_dev *cam) { int size_norm, size_high; @@ -272,7 +272,7 @@ void rotate_init(ctx_cam *cam) * * Returns: nothing */ -void rotate_deinit(ctx_cam *cam) +void rotate_deinit(ctx_dev *cam) { if (cam->rotate_data == NULL) { @@ -298,7 +298,7 @@ void rotate_deinit(ctx_cam *cam) * 0 - success * -1 - failure (shouldn't happen) */ -int rotate_map(ctx_cam *cam, ctx_image_data *img_data) +int rotate_map(ctx_dev *cam, ctx_image_data *img_data) { /* * The image format is YUV 4:2:0 planar, which has the pixel diff --git a/src/rotate.hpp b/src/rotate.hpp index 591cbfdb..79175cd6 100644 --- a/src/rotate.hpp +++ b/src/rotate.hpp @@ -32,8 +32,8 @@ int capture_height_high; /* Capture height of high resolution image */ }; - void rotate_init(ctx_cam *cam); - void rotate_deinit(ctx_cam *cam); - int rotate_map(ctx_cam *cam, ctx_image_data *img_data); + void rotate_init(ctx_dev *cam); + void rotate_deinit(ctx_dev *cam); + int rotate_map(ctx_dev *cam, ctx_image_data *img_data); #endif /* _INCLUDE_ROTATE_HPP_ */ diff --git a/src/util.cpp b/src/util.cpp index 12894d64..5a0a9f5e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -260,7 +260,7 @@ int myfclose(FILE* fh) * host Replaced with the name of the local machine (see gethostname(2)). * fps Equivalent to %fps. */ -static void mystrftime_long (const ctx_cam *cam, +static void mystrftime_long (const ctx_dev *cam, int width, const char *word, int l, char *out) { @@ -347,7 +347,7 @@ static void mystrftime_long (const ctx_cam *cam, * * Returns: number of bytes written to the string s */ -size_t mystrftime(ctx_cam *cam, char *s, size_t max, const char *userformat, +size_t mystrftime(ctx_dev *cam, char *s, size_t max, const char *userformat, const struct timespec *ts1, const char *filename, int sqltype) { char formatstring[PATH_MAX] = ""; @@ -558,7 +558,7 @@ void mythreadname_get(char *threadname) #endif } -bool mycheck_passthrough(ctx_cam *cam) +bool mycheck_passthrough(ctx_dev *cam) { #if (MYFFVER >= 57041) if (cam->movie_passthrough) { @@ -1239,7 +1239,7 @@ void util_parms_update(ctx_params *params, std::string &confline) * that the fork inherited from the parent in order not to pass * the open handles on to the shell */ -void util_exec_command(ctx_cam *cam, const char *command, char *filename, int filetype) +void util_exec_command(ctx_dev *cam, const char *command, char *filename, int filetype) { char stamp[PATH_MAX]; mystrftime(cam, stamp, sizeof(stamp), command, &cam->current_image->imgts, filename, filetype); diff --git a/src/util.hpp b/src/util.hpp index e7eef8cd..086a1742 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -106,13 +106,13 @@ int mycreate_path(const char *path); FILE *myfopen(const char *path, const char *mode); int myfclose(FILE *fh); - size_t mystrftime(ctx_cam *cam, char *s, size_t max, const char *userformat, + size_t mystrftime(ctx_dev *cam, char *s, size_t max, const char *userformat, const struct timespec *ts1, const char *filename, int sqltype); - void util_exec_command(ctx_cam *cam, const char *command, char *filename, int filetype); + void util_exec_command(ctx_dev *cam, const char *command, char *filename, int filetype); void mythreadname_set(const char *abbr, int threadnbr, const char *threadname); void mythreadname_get(char *threadname); - bool mycheck_passthrough(ctx_cam *cam); + bool mycheck_passthrough(ctx_dev *cam); char* mytranslate_text(const char *msgid, int setnls); void mytranslate_init(void); diff --git a/src/video_loopback.cpp b/src/video_loopback.cpp index ee074845..9b0a6c28 100644 --- a/src/video_loopback.cpp +++ b/src/video_loopback.cpp @@ -241,7 +241,7 @@ int vlp_putpipe(int dev, unsigned char *image, int imgsize) #endif } -void vlp_init(ctx_cam *cam) +void vlp_init(ctx_dev *cam) { #if defined(HAVE_V4L2) && !defined(BSD) diff --git a/src/video_loopback.hpp b/src/video_loopback.hpp index aefbd8f2..ac9a21ab 100644 --- a/src/video_loopback.hpp +++ b/src/video_loopback.hpp @@ -21,5 +21,5 @@ int vlp_startpipe(const char *dev_name, int width, int height); int vlp_putpipe(int dev, unsigned char *image, int imgsize); - void vlp_init(ctx_cam *cam); + void vlp_init(ctx_dev *cam); #endif /* _INCLUDE_VIDEO_LOOPBACK_HPP_ */ diff --git a/src/video_v4l2.cpp b/src/video_v4l2.cpp index 3fdbe942..cb95f350 100644 --- a/src/video_v4l2.cpp +++ b/src/video_v4l2.cpp @@ -87,14 +87,14 @@ static int xioctl(ctx_v4l2cam *v4l2cam, unsigned long request, void *arg) return retcd; } -static void v4l2_device_close(ctx_cam *cam) +static void v4l2_device_close(ctx_dev *cam) { close(cam->v4l2cam->fd_device); cam->v4l2cam->fd_device = -1; } /* Get the count of how many controls and menu items the device supports */ -static void v4l2_ctrls_count(ctx_cam *cam) +static void v4l2_ctrls_count(ctx_dev *cam) { int indx; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -132,7 +132,7 @@ static void v4l2_ctrls_count(ctx_cam *cam) } /* Print the device controls to the log */ -static void v4l2_ctrls_log(ctx_cam *cam) +static void v4l2_ctrls_log(ctx_dev *cam) { int indx; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -159,7 +159,7 @@ static void v4l2_ctrls_log(ctx_cam *cam) } /* Get names of the controls and menu items the device supports */ -static void v4l2_ctrls_list(ctx_cam *cam) +static void v4l2_ctrls_list(ctx_dev *cam) { int indx, indx_ctrl; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -235,7 +235,7 @@ static void v4l2_ctrls_list(ctx_cam *cam) } /* Set the control array items to the device */ -static void v4l2_ctrls_set(ctx_cam *cam) +static void v4l2_ctrls_set(ctx_dev *cam) { int indx_dev, retcd; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -271,7 +271,7 @@ static void v4l2_ctrls_set(ctx_cam *cam) } -static int v4l2_parms_set(ctx_cam *cam) +static int v4l2_parms_set(ctx_dev *cam) { int indx_dev, indx_user; ctx_params_item *usritem; @@ -326,7 +326,7 @@ static int v4l2_parms_set(ctx_cam *cam) } /* Set the device to the input number requested by user */ -static void v4l2_set_input(ctx_cam *cam) +static void v4l2_set_input(ctx_dev *cam) { int indx, spec; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -387,7 +387,7 @@ static void v4l2_set_input(ctx_cam *cam) } /* Set the video standard(norm) for the device to the user requested value*/ -static void v4l2_set_norm(ctx_cam *cam) +static void v4l2_set_norm(ctx_dev *cam) { int indx, spec; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -454,7 +454,7 @@ static void v4l2_set_norm(ctx_cam *cam) } /* Set the frequency on the device to the user requested value */ -static void v4l2_set_frequency(ctx_cam *cam) +static void v4l2_set_frequency(ctx_dev *cam) { int indx; long spec; @@ -506,7 +506,7 @@ static void v4l2_set_frequency(ctx_cam *cam) return; } -static int v4l2_pixfmt_try(ctx_cam *cam, uint pixformat) +static int v4l2_pixfmt_try(ctx_dev *cam, uint pixformat) { int retcd; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -539,7 +539,7 @@ static int v4l2_pixfmt_try(ctx_cam *cam, uint pixformat) return 0; } -static int v4l2_pixfmt_stride(ctx_cam *cam) +static int v4l2_pixfmt_stride(ctx_dev *cam) { int wd, bpl, wps; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -593,7 +593,7 @@ static int v4l2_pixfmt_stride(ctx_cam *cam) } -static int v4l2_pixfmt_adjust(ctx_cam *cam) +static int v4l2_pixfmt_adjust(ctx_dev *cam) { ctx_v4l2cam *v4l2cam = cam->v4l2cam; struct v4l2_format *fmt = &v4l2cam->fmt; @@ -623,7 +623,7 @@ static int v4l2_pixfmt_adjust(ctx_cam *cam) } /* Set the pixel format on the device */ -static int v4l2_pixfmt_set(ctx_cam *cam, unsigned int pixformat) +static int v4l2_pixfmt_set(ctx_dev *cam, unsigned int pixformat) { int retcd; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -659,7 +659,7 @@ static int v4l2_pixfmt_set(ctx_cam *cam, unsigned int pixformat) return 0; } -static void v4l2_params_check(ctx_cam *cam) +static void v4l2_params_check(ctx_dev *cam) { int indx, spec; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -697,7 +697,7 @@ static void v4l2_params_check(ctx_cam *cam) } /*List camera palettes and return index of one that Motionplus supports*/ -static int v4l2_pixfmt_list(ctx_cam *cam, palette_item *palette_array) +static int v4l2_pixfmt_list(ctx_dev *cam, palette_item *palette_array) { int v4l2_pal, indx_palette, indx; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -733,7 +733,7 @@ static int v4l2_pixfmt_list(ctx_cam *cam, palette_item *palette_array) } /* Find and select the pixel format for camera*/ -static void v4l2_palette_set(ctx_cam *cam) +static void v4l2_palette_set(ctx_dev *cam) { int indxp, indx, retcd; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -793,7 +793,7 @@ static void v4l2_palette_set(ctx_cam *cam) } /* Set the memory mapping from device to Motion*/ -static void v4l2_set_mmap(ctx_cam *cam) +static void v4l2_set_mmap(ctx_dev *cam) { enum v4l2_buf_type type; int buffer_index; @@ -900,7 +900,7 @@ static void v4l2_set_mmap(ctx_cam *cam) } /* Assign the resulting sizes to the camera context items */ -static void v4l2_set_imgs(ctx_cam *cam) +static void v4l2_set_imgs(ctx_dev *cam) { if (cam->v4l2cam->fd_device == -1) { return; @@ -914,7 +914,7 @@ static void v4l2_set_imgs(ctx_cam *cam) } /* Capture the image into the buffer */ -static int v4l2_capture(ctx_cam *cam) +static int v4l2_capture(ctx_dev *cam) { int retcd; sigset_t set, old; @@ -962,7 +962,7 @@ static int v4l2_capture(ctx_cam *cam) } /* Convert captured image to the standard pixel format*/ -static int v4l2_convert(ctx_cam *cam, unsigned char *img_norm) +static int v4l2_convert(ctx_dev *cam, unsigned char *img_norm) { ctx_v4l2cam *v4l2cam = cam->v4l2cam; video_buff *the_buffer = &v4l2cam->buffers[v4l2cam->buf.index]; @@ -1038,7 +1038,7 @@ static int v4l2_convert(ctx_cam *cam, unsigned char *img_norm) } -static void v4l2_device_init(ctx_cam *cam) +static void v4l2_device_init(ctx_dev *cam) { cam->v4l2cam = (ctx_v4l2cam*)mymalloc(sizeof(ctx_v4l2cam)); cam->v4l2cam->devctrl_array = NULL; @@ -1067,7 +1067,7 @@ static void v4l2_device_init(ctx_cam *cam) } /* Update and set user params if needed */ -static void v4l2_device_select(ctx_cam *cam) +static void v4l2_device_select(ctx_dev *cam) { int retcd; @@ -1087,7 +1087,7 @@ static void v4l2_device_select(ctx_cam *cam) } /* Open the device */ -static void v4l2_device_open(ctx_cam *cam) +static void v4l2_device_open(ctx_dev *cam) { int fd_device; @@ -1121,7 +1121,7 @@ static void v4l2_device_open(ctx_cam *cam) } -static void v4l2_log_types(ctx_cam *cam) +static void v4l2_log_types(ctx_dev *cam) { ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -1175,7 +1175,7 @@ static void v4l2_log_types(ctx_cam *cam) } -static void v4l2_log_formats(ctx_cam *cam) +static void v4l2_log_formats(ctx_dev *cam) { ctx_v4l2cam *v4l2cam = cam->v4l2cam; palette_item *palette_array; @@ -1242,7 +1242,7 @@ static void v4l2_log_formats(ctx_cam *cam) } -static void v4l2_set_fps(ctx_cam *cam) +static void v4l2_set_fps(ctx_dev *cam) { int retcd; ctx_v4l2cam *v4l2cam = cam->v4l2cam; @@ -1276,7 +1276,7 @@ static void v4l2_set_fps(ctx_cam *cam) #endif /* HAVE_V4L2 */ -void v4l2_cleanup(ctx_cam *cam) +void v4l2_cleanup(ctx_dev *cam) { #ifdef HAVE_V4L2 @@ -1319,7 +1319,7 @@ void v4l2_cleanup(ctx_cam *cam) } -void v4l2_start(ctx_cam *cam) +void v4l2_start(ctx_dev *cam) { #ifdef HAVE_V4L2 MOTION_LOG(NTC, TYPE_VIDEO, NO_ERRNO,_("Opening V4L2 device")); @@ -1350,7 +1350,7 @@ void v4l2_start(ctx_cam *cam) #endif // HAVE_V4l2 } -int v4l2_next(ctx_cam *cam, ctx_image_data *img_data) +int v4l2_next(ctx_dev *cam, ctx_image_data *img_data) { #ifdef HAVE_V4L2 int retcd; diff --git a/src/video_v4l2.hpp b/src/video_v4l2.hpp index e28daf47..70bd5acf 100644 --- a/src/video_v4l2.hpp +++ b/src/video_v4l2.hpp @@ -69,8 +69,8 @@ struct ctx_v4l2cam { #endif }; - void v4l2_start(ctx_cam *cam); - int v4l2_next(ctx_cam *cam, ctx_image_data *img_data); - void v4l2_cleanup(ctx_cam *cam); + void v4l2_start(ctx_dev *cam); + int v4l2_next(ctx_dev *cam, ctx_image_data *img_data); + void v4l2_cleanup(ctx_dev *cam); #endif /* _INCLUDE_VIDEO_V4L2_HPP_ */ diff --git a/src/webu.hpp b/src/webu.hpp index d9d6bf8b..35ef8eb7 100644 --- a/src/webu.hpp +++ b/src/webu.hpp @@ -99,7 +99,7 @@ int mhd_first; /* Boolean for whether it is the first connection*/ struct MHD_Connection *connection; /* The MHD connection value from the client */ ctx_motapp *motapp; /* The motionplus context pointer */ - ctx_cam *cam; /* The ctx_cam information for the camera requested */ + ctx_dev *cam; /* The ctx_dev information for the camera requested */ }; diff --git a/src/webu_json.cpp b/src/webu_json.cpp index e24580e1..10712a27 100644 --- a/src/webu_json.cpp +++ b/src/webu_json.cpp @@ -393,7 +393,7 @@ static void webu_json_status_vars(ctx_webui *webui, int indx_cam) char buf[32]; struct tm timestamp_tm; struct timespec curr_ts; - ctx_cam *cam; + ctx_dev *cam; cam = webui->motapp->cam_list[indx_cam]; diff --git a/src/webu_post.cpp b/src/webu_post.cpp index 12d6912d..121d7c90 100644 --- a/src/webu_post.cpp +++ b/src/webu_post.cpp @@ -404,7 +404,7 @@ void webu_post_action_user(ctx_webui *webui) { int indx, indx2; ctx_params *wact; - ctx_cam *cam; + ctx_dev *cam; std::string tmp; wact = webui->motapp->webcontrol_actions; @@ -573,7 +573,7 @@ static void webu_post_config(ctx_webui *webui) void webu_post_ptz(ctx_webui *webui) { int indx; - ctx_cam *cam; + ctx_dev *cam; ctx_params *wact; wact = webui->motapp->webcontrol_actions; diff --git a/src/webu_stream.cpp b/src/webu_stream.cpp index 8191a3bd..7b4d026b 100644 --- a/src/webu_stream.cpp +++ b/src/webu_stream.cpp @@ -449,7 +449,7 @@ mhdrslt webu_stream_main(ctx_webui *webui) } /* Initial the stream context items for the camera */ -void webu_stream_init(ctx_cam *cam) +void webu_stream_init(ctx_dev *cam) { /* NOTE: This runs on the motion_loop thread. */ @@ -485,7 +485,7 @@ void webu_stream_init(ctx_cam *cam) } /* Free the stream buffers and mutex for shutdown */ -void webu_stream_deinit(ctx_cam *cam) +void webu_stream_deinit(ctx_dev *cam) { /* NOTE: This runs on the motion_loop thread. */ @@ -501,7 +501,7 @@ void webu_stream_deinit(ctx_cam *cam) } /* Get a normal image from the motion loop and compress it*/ -static void webu_stream_getimg_norm(ctx_cam *cam, ctx_image_data *img_data) +static void webu_stream_getimg_norm(ctx_dev *cam, ctx_image_data *img_data) { /*This is on the motion_loop thread */ if (cam->stream.norm.jpeg_data == NULL) { @@ -521,7 +521,7 @@ static void webu_stream_getimg_norm(ctx_cam *cam, ctx_image_data *img_data) } /* Get a substream image from the motion loop and compress it*/ -static void webu_stream_getimg_sub(ctx_cam *cam, ctx_image_data *img_data) +static void webu_stream_getimg_sub(ctx_dev *cam, ctx_image_data *img_data) { /*This is on the motion_loop thread */ @@ -566,7 +566,7 @@ static void webu_stream_getimg_sub(ctx_cam *cam, ctx_image_data *img_data) } /* Get a motion image from the motion loop and compress it*/ -static void webu_stream_getimg_motion(ctx_cam *cam) +static void webu_stream_getimg_motion(ctx_dev *cam) { /*This is on the motion_loop thread */ @@ -587,7 +587,7 @@ static void webu_stream_getimg_motion(ctx_cam *cam) } /* Get a source image from the motion loop and compress it*/ -static void webu_stream_getimg_source(ctx_cam *cam) +static void webu_stream_getimg_source(ctx_dev *cam) { /*This is on the motion_loop thread */ @@ -608,7 +608,7 @@ static void webu_stream_getimg_source(ctx_cam *cam) } /* Get a secondary image from the motion loop and compress it*/ -static void webu_stream_getimg_secondary(ctx_cam *cam) +static void webu_stream_getimg_secondary(ctx_dev *cam) { /*This is on the motion_loop thread */ @@ -627,7 +627,7 @@ static void webu_stream_getimg_secondary(ctx_cam *cam) } /* Get image from the motion loop and compress it*/ -void webu_stream_getimg(ctx_cam *cam, ctx_image_data *img_data) +void webu_stream_getimg(ctx_dev *cam, ctx_image_data *img_data) { /*This is on the motion_loop thread */ diff --git a/src/webu_stream.hpp b/src/webu_stream.hpp index 58bdeb34..1e35de3a 100644 --- a/src/webu_stream.hpp +++ b/src/webu_stream.hpp @@ -20,9 +20,9 @@ #ifndef _INCLUDE_WEBU_STREAM_HPP_ #define _INCLUDE_WEBU_STREAM_HPP_ - void webu_stream_init(ctx_cam *cam); - void webu_stream_deinit(ctx_cam *cam); - void webu_stream_getimg(ctx_cam *cam, ctx_image_data *img_data); + void webu_stream_init(ctx_dev *cam); + void webu_stream_deinit(ctx_dev *cam); + void webu_stream_getimg(ctx_dev *cam, ctx_image_data *img_data); mhdrslt webu_stream_main(ctx_webui *webui);