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

Conversation

mlankhorst
Copy link

No description provided.

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 <[email protected]>
@@ -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

@mlankhorst
Copy link
Author

mlankhorst commented Nov 28, 2017 via email

@thaytan
Copy link
Owner

thaytan commented Dec 4, 2017

If by 'if it's completely unset use 10 seconds?' you mean 500ms, then yes. The normal timeout should remain at 500ms

@mlankhorst
Copy link
Author

Hey,

I think not using the 10s timeout will fail if you change shutter_speed, there will be 2 or more frames with the old shutter speed after changing it. So if you change shutter-speed to 0 after it was 5 seconds, you get a massive timeout because only .5 seconds was expected, but the next 2 frames still taking 5 seconds..
Won't 10.5 seconds still be better than 'indefinite', which was the problem being solved?
~Maarten

@thaytan
Copy link
Owner

thaytan commented Dec 11, 2017

The problem being solved by the timeout was detecting that the connector had been unplugged quickly (for a device that wasn't the standard RPi camera), so the pipeline could be restarted and capture resumed as quickly as possible

@mlankhorst
Copy link
Author

Could we set a reasonable timeout based on initial settings (FPS and shutter-speed), and then only ever increase it if either is changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants