Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian packaging fixes and variable fps fixes #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: gstreamer1.0-rpicamsrc
Priority: optional
Section: libs
Maintainer: Holger Steinhaus <[email protected]>
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

Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions src/RaspiCapture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to make the timeout a bit better calculated. Arbitrarily increasing it to 10 seconds will annoy @staroselskii. I think the ideal will be something based on expected frame time + startup-delay-for-first-frame + 100ms or so, but for now just 500ms + when-variable-fps-add-1/shutter_speed might do


if (G_UNLIKELY(buffer == NULL)) {
return GST_FLOW_ERROR;
Expand Down Expand Up @@ -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}};
Expand Down Expand Up @@ -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}};
Expand Down