diff --git a/src/device.h b/src/device.h index 8e708c5..68f2458 100644 --- a/src/device.h +++ b/src/device.h @@ -73,7 +73,6 @@ struct device_t { unsigned n_buffers; unsigned n_workers; unsigned desired_fps; - unsigned every_frame; unsigned min_frame_size; bool persistent; unsigned timeout; diff --git a/src/main.c b/src/main.c index 0b7c975..48d0b5f 100644 --- a/src/main.c +++ b/src/main.c @@ -40,7 +40,7 @@ #include "http.h" -static const char _short_opts[] = "d:i:x:y:f:a:e:z:tn:w:q:c:s:p:r:h"; +static const char _short_opts[] = "d:i:x:y:f:a:z:tn:w:q:c:s:p:r:h"; static const struct option _long_opts[] = { {"device", required_argument, NULL, 'd'}, {"input", required_argument, NULL, 'i'}, @@ -49,7 +49,6 @@ static const struct option _long_opts[] = { {"format", required_argument, NULL, 'm'}, {"tv-standard", required_argument, NULL, 'a'}, {"desired-fps", required_argument, NULL, 'f'}, - {"every-frame", required_argument, NULL, 'e'}, {"min-frame-size", required_argument, NULL, 'z'}, {"dv-timings", no_argument, NULL, 't'}, {"buffers", required_argument, NULL, 'b'}, @@ -107,7 +106,6 @@ static void _help(struct device_t *dev, struct encoder_t *encoder, struct http_s printf(" -a|--tv-standard -- Force TV standard.\n"); printf(" Available: %s; default: disabled.\n\n", STANDARDS_STR); printf(" -f|--desired-fps -- Desired FPS; default: maximum as possible.\n\n"); - printf(" -e|--every-frame -- Drop all input frames except specified. Default: disabled.\n\n"); printf(" -z|--min-frame-size -- Drop frames smaller then this limit.\n"); printf(" Useful if the device produces small-sized garbage frames.\n\n"); printf(" -t|--dv-timings -- Enable DV timings queriyng and events processing.\n"); @@ -181,7 +179,6 @@ static int _parse_options(int argc, char *argv[], struct device_t *dev, struct e # pragma GCC diagnostic pop case 'a': OPT_PARSE(dev->standard, device_parse_standard, STANDARD_UNKNOWN, "TV standard"); case 'f': OPT_UNSIGNED(dev->desired_fps, "--desired-fps", 0, 30); - case 'e': OPT_UNSIGNED(dev->every_frame, "--every-frame", 1, 30); case 'z': OPT_UNSIGNED(dev->min_frame_size, "--min-frame-size", 0, 8192); case 't': OPT_SET(dev->dv_timings, true); case 'b': OPT_UNSIGNED(dev->n_buffers, "--buffers", 1, 32); diff --git a/src/stream.c b/src/stream.c index dacb3c0..adac20a 100644 --- a/src/stream.c +++ b/src/stream.c @@ -83,7 +83,6 @@ void stream_loop(struct stream_t *stream) { while (_stream_init_loop(stream->dev, &pool) == 0) { struct worker_t *oldest_worker = NULL; struct worker_t *last_worker = NULL; - unsigned frames_count = 0; long double grab_after = 0; unsigned fluency_passed = 0; unsigned captured_fps_accum = 0; @@ -184,15 +183,6 @@ void stream_loop(struct stream_t *stream) { } stream->dev->run->pictures[buf_info.index].grab_time = now; - if (stream->dev->every_frame) { - if (frames_count < stream->dev->every_frame - 1) { - frames_count += 1; - LOG_DEBUG("Dropping frame %d for option --every-frame=%d", frames_count, stream->dev->every_frame); - goto pass_frame; - } - frames_count = 0; - } - // Workaround for broken, corrupted frames: // Under low light conditions corrupted frames may get captured. // The good thing is such frames are quite small compared to the regular pictures.