From df44b01540dd311f424f7d3d59be94f491b84293 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 27 Nov 2017 18:06:23 +0100 Subject: [PATCH 1/2] Regenerate all autotools files correctly in debian packaging. Signed-off-by: Maarten Lankhorst --- debian/control | 2 +- debian/rules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 6816829..6d2dbd1 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: gstreamer1.0-rpicamsrc Priority: optional Section: libs Maintainer: Holger Steinhaus -Build-Depends: debhelper (>= 9), autotools-dev, libtool, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, libraspberrypi-dev, pkg-config, dpkg-dev (>= 1.16.1) +Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, libtool, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, libraspberrypi-dev, pkg-config, dpkg-dev (>= 1.16.1) Standards-Version: 3.9.5 Homepage: https://github.com/thaytan/gst-rpicamsrc.git diff --git a/debian/rules b/debian/rules index 2263eae..993f255 100755 --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ TMP = $(CURDIR)/debian/$(PACKAGE) # main packaging script based on dh7 syntax %: - dh $@ --with autotools-dev + dh $@ --with autotools-dev,autoreconf override_dh_auto_install: dh_auto_install From 1e7541598e36d08697aaf827b8d5f5a7bfd23079 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 27 Nov 2017 18:09:05 +0100 Subject: [PATCH 2/2] Add support for using the full sensor range when using variable fps This allows bumping exposure time to 10 seconds when using variable fps. I'm using this in my own webcam to allow night vision to work better. Signed-off-by: Maarten Lankhorst --- src/RaspiCapture.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/RaspiCapture.c b/src/RaspiCapture.c index cae5cf6..783464f 100644 --- a/src/RaspiCapture.c +++ b/src/RaspiCapture.c @@ -939,7 +939,7 @@ raspi_capture_fill_buffer(RASPIVID_STATE *state, GstBuffer **bufp, /* FIXME: Use our own interruptible cond wait: */ - buffer = mmal_queue_timedwait(state->encoded_buffer_q, 500); + buffer = mmal_queue_timedwait(state->encoded_buffer_q, 10500); if (G_UNLIKELY(buffer == NULL)) { return GST_FLOW_ERROR; @@ -1129,7 +1129,11 @@ raspi_capture_set_format_and_start(RASPIVID_STATE *state) format = preview_port->format; - if(config->camera_parameters.shutter_speed > 6000000) + if(!config->fps_n) { + MMAL_PARAMETER_FPS_RANGE_T fps_range = {{MMAL_PARAMETER_FPS_RANGE, sizeof(fps_range)}, + { 50, 1000}, {120, 1}}; + mmal_port_parameter_set(preview_port, &fps_range.hdr); + } else if(config->camera_parameters.shutter_speed > 6000000) { MMAL_PARAMETER_FPS_RANGE_T fps_range = {{MMAL_PARAMETER_FPS_RANGE, sizeof(fps_range)}, { 50, 1000 }, {166, 1000}}; @@ -1176,7 +1180,11 @@ raspi_capture_set_format_and_start(RASPIVID_STATE *state) // Set the encode format on the video port format = video_port->format; - if(config->camera_parameters.shutter_speed > 6000000) + if(!config->fps_n) { + MMAL_PARAMETER_FPS_RANGE_T fps_range = {{MMAL_PARAMETER_FPS_RANGE, sizeof(fps_range)}, + { 50, 1000}, {120, 1}}; + mmal_port_parameter_set(preview_port, &fps_range.hdr); + } else if(config->camera_parameters.shutter_speed > 6000000) { MMAL_PARAMETER_FPS_RANGE_T fps_range = {{MMAL_PARAMETER_FPS_RANGE, sizeof(fps_range)}, { 50, 1000 }, {166, 1000}};