mirror of
https://github.com/Motion-Project/motion.git
synced 2026-02-01 02:21:26 -05:00
Remove minimum_frame_time
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
<td bgcolor="#edf4f9" ><a href="#width" >width</a> </td>
|
||||
<td bgcolor="#edf4f9" ><a href="#height" >height</a> </td>
|
||||
<td bgcolor="#edf4f9" ><a href="#framerate" >framerate</a> </td>
|
||||
<td bgcolor="#edf4f9" ><a href="#minimum_frame_time" >minimum_frame_time</a> </td>
|
||||
<td bgcolor="#edf4f9" ><a href="#text_event" >text_event</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#edf4f9" ><a href="#rotate" >rotate</a> </td>
|
||||
@@ -192,9 +192,6 @@
|
||||
<td bgcolor="#edf4f9" ><a href="#text_changes" >text_changes</a> </td>
|
||||
<td bgcolor="#edf4f9" ><a href="#text_scale" >text_scale</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#edf4f9" ><a href="#text_event" >text_event</a> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p></p>
|
||||
@@ -1075,12 +1072,6 @@
|
||||
</ul>
|
||||
<p></p>
|
||||
|
||||
<h3><a name="minimum_frame_time"></a> minimum_frame_time </h3>
|
||||
<ul>
|
||||
<li> Values: Integer | Default: 0</li>
|
||||
</ul>
|
||||
<p></p>
|
||||
|
||||
<h3><a name="rotate"></a> rotate </h3>
|
||||
<ul>
|
||||
<li> Values: 0, 90, 180, 270 | Default: 0</li>
|
||||
|
||||
@@ -600,21 +600,6 @@ Typical video devices have a maximum rate of 30.
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B minimum_frame_time
|
||||
.RS
|
||||
.nf
|
||||
Values: 0 to unlimited
|
||||
Default: 0
|
||||
Description:
|
||||
.fi
|
||||
.RS
|
||||
The minimum time in seconds between capturing picture frames from the camera.
|
||||
The default of 0 disables this option and relies upon the capture rate of the camera.
|
||||
This option is used when you want to capture images at a rate lower than 2 per second.
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B rotate
|
||||
.RS
|
||||
|
||||
21
src/conf.cpp
21
src/conf.cpp
@@ -68,7 +68,6 @@ ctx_parm config_parms[] = {
|
||||
{"width", PARM_TYP_INT, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
{"height", PARM_TYP_INT, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
{"framerate", PARM_TYP_INT, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
{"minimum_frame_time", PARM_TYP_INT, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
{"rotate", PARM_TYP_LIST, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
{"flip_axis", PARM_TYP_LIST, PARM_CAT_03, WEBUI_LEVEL_LIMITED },
|
||||
|
||||
@@ -902,25 +901,6 @@ 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_minimum_frame_time(ctx_cam *cam, std::string &parm, enum PARM_ACT pact)
|
||||
{
|
||||
int parm_in;
|
||||
if (pact == PARM_ACT_DFLT) {
|
||||
cam->conf->minimum_frame_time = 0;
|
||||
} else if (pact == PARM_ACT_SET) {
|
||||
parm_in = atoi(parm.c_str());
|
||||
if ((parm_in < 0) || (parm_in > 2147483647)) {
|
||||
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, _("Invalid minimum_frame_time %d"),parm_in);
|
||||
} else {
|
||||
cam->conf->minimum_frame_time = parm_in;
|
||||
}
|
||||
} else if (pact == PARM_ACT_GET) {
|
||||
parm = std::to_string(cam->conf->minimum_frame_time);
|
||||
}
|
||||
return;
|
||||
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","minimum_frame_time",_("minimum_frame_time"));
|
||||
}
|
||||
|
||||
static void conf_edit_rotate(ctx_cam *cam, std::string &parm, enum PARM_ACT pact)
|
||||
{
|
||||
int parm_in;
|
||||
@@ -2887,7 +2867,6 @@ static void conf_edit_cat03(ctx_cam *cam, std::string parm_nm
|
||||
if (parm_nm == "width") { conf_edit_width(cam, parm_val, pact);
|
||||
} else if (parm_nm == "height") { conf_edit_height(cam, parm_val, pact);
|
||||
} else if (parm_nm == "framerate") { conf_edit_framerate(cam, parm_val, pact);
|
||||
} else if (parm_nm == "minimum_frame_time") { conf_edit_minimum_frame_time(cam, parm_val, pact);
|
||||
} else if (parm_nm == "rotate") { conf_edit_rotate(cam, parm_val, pact);
|
||||
} else if (parm_nm == "flip_axis") { conf_edit_flip_axis(cam, parm_val, pact);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
int width;
|
||||
int height;
|
||||
int framerate;
|
||||
int minimum_frame_time;
|
||||
int rotate;
|
||||
std::string flip_axis;
|
||||
std::string locate_motion_mode;
|
||||
|
||||
@@ -566,9 +566,6 @@ static void mlp_init_values(ctx_cam *cam)
|
||||
cam->camera_status = STATUS_CLOSED;
|
||||
cam->startup_frames = (cam->conf->framerate * 2) + cam->conf->pre_capture + cam->conf->minimum_motion_frames;
|
||||
|
||||
cam->minimum_frame_time_downcounter = cam->conf->minimum_frame_time;
|
||||
cam->get_image = 1;
|
||||
|
||||
cam->movie_passthrough = cam->conf->movie_passthrough;
|
||||
if ((cam->camera_type != CAMERA_TYPE_NETCAM) &&
|
||||
(cam->movie_passthrough)) {
|
||||
@@ -766,15 +763,6 @@ static void mlp_prepare(ctx_cam *cam)
|
||||
if (cam->frame_last_ts.tv_sec != cam->frame_curr_ts.tv_sec) {
|
||||
cam->lastrate = cam->shots + 1;
|
||||
cam->shots = -1;
|
||||
|
||||
if (cam->conf->minimum_frame_time) {
|
||||
cam->minimum_frame_time_downcounter--;
|
||||
if (cam->minimum_frame_time_downcounter == 0) {
|
||||
cam->get_image = 1;
|
||||
}
|
||||
} else {
|
||||
cam->get_image = 1;
|
||||
}
|
||||
}
|
||||
|
||||
cam->shots++;
|
||||
@@ -787,11 +775,6 @@ static void mlp_prepare(ctx_cam *cam)
|
||||
/* reset the images */
|
||||
static void mlp_resetimages(ctx_cam *cam)
|
||||
{
|
||||
if (cam->conf->minimum_frame_time) {
|
||||
cam->minimum_frame_time_downcounter = cam->conf->minimum_frame_time;
|
||||
cam->get_image = 0;
|
||||
}
|
||||
|
||||
/* ring_buffer_in is pointing to current pos, update before put in a new image */
|
||||
if (++cam->imgs.ring_in >= cam->imgs.ring_size) {
|
||||
cam->imgs.ring_in = 0;
|
||||
|
||||
@@ -384,8 +384,6 @@ struct ctx_cam {
|
||||
|
||||
int area_minx[9], area_miny[9], area_maxx[9], area_maxy[9];
|
||||
int areadetect_eventnbr;
|
||||
int minimum_frame_time_downcounter;
|
||||
unsigned int get_image; /* Flag used to signal that we capture new image when we run the loop */
|
||||
|
||||
int smartmask_ratio;
|
||||
int smartmask_count;
|
||||
|
||||
Reference in New Issue
Block a user