mirror of
https://github.com/Motion-Project/motion.git
synced 2026-04-23 15:37:06 -04:00
Initialize picture parameters. Closes #47
This commit is contained in:
@@ -553,7 +553,7 @@ static void mlp_init_values(ctx_dev *cam)
|
||||
clock_gettime(CLOCK_MONOTONIC, &cam->frame_last_ts);
|
||||
|
||||
cam->noise = cam->conf->noise_level;
|
||||
|
||||
cam->passflag = false;
|
||||
cam->threshold = cam->conf->threshold;
|
||||
cam->device_status = STATUS_CLOSED;
|
||||
cam->startup_frames = (cam->conf->framerate * 2) + cam->conf->pre_capture + cam->conf->minimum_motion_frames;
|
||||
@@ -1315,7 +1315,7 @@ static void mlp_parmsupdate(ctx_dev *cam)
|
||||
return;
|
||||
}
|
||||
|
||||
if (cam->parms_changed ) {
|
||||
if (cam->parms_changed || (cam->passflag == false)) {
|
||||
draw_init_scale(cam); /* Initialize and validate text_scale */
|
||||
|
||||
if (cam->conf->picture_output == "on") {
|
||||
@@ -1421,7 +1421,7 @@ static void mlp_frametiming(ctx_dev *cam)
|
||||
SLEEP(0, avgtime);
|
||||
}
|
||||
}
|
||||
cam->passflag = 1;
|
||||
cam->passflag = true;
|
||||
}
|
||||
|
||||
/** main processing loop for each camera */
|
||||
|
||||
@@ -473,7 +473,7 @@ struct ctx_dev {
|
||||
int smartmask_count;
|
||||
unsigned int smartmask_lastrate;
|
||||
int previous_diffs, previous_location_x, previous_location_y;
|
||||
unsigned int passflag; //only purpose is to flag first frame vs all others.....
|
||||
bool passflag; //flag first frame vs all others.
|
||||
|
||||
pthread_mutex_t parms_lock;
|
||||
ctx_params *params; /* Device parameters*/
|
||||
|
||||
@@ -447,7 +447,7 @@ mhdrslt webu_stream_main(ctx_webui *webui)
|
||||
return MHD_NO;
|
||||
}
|
||||
|
||||
if ((webui->cam->passflag == 0) || (webui->cam->finish_dev)) {
|
||||
if ((webui->cam->passflag == false) || (webui->cam->finish_dev)) {
|
||||
return MHD_NO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user