[go: nahoru, domu]

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

Add bulb mode helper? #853

Open
RReverser opened this issue Oct 23, 2022 · 0 comments
Open

Add bulb mode helper? #853

RReverser opened this issue Oct 23, 2022 · 0 comments

Comments

@RReverser
Copy link
Contributor
RReverser commented Oct 23, 2022

Is your feature request related to a problem? Please describe.

Bulb mode capture is a relatively common usecase for controlling the camera remotely.

Right now it's implemented as a convenient command-line option in gphoto2, but libgphoto2 users have to replicate all the logic with reaching out to the relevant checkbox widget, setting it to checked, waiting, setting the widget to unchecked, and then sifting through camera events to detect and download the image.

In many cases, developer will open an issue here instead of guessing to look at the gphoto2 CLI implementation, which also adds to the triaging churn.

Describe the solution you'd like

Given how common it is, I suggest it's worth adding a gp_camera_{start,end}_bulb_capture helper to libgphoto2 API itself, which would just take the same params as gp_camera_capture, and take care of all the internal implementation details, returning CameraFilePath from the "end" function like the other capture methods. This should be more or less straightforward migration of the mentioned logic from gphoto2 codebase to libgphoto2.

WDYT?

UPD: Initial description suggested a single function that sleeps internally, but splitting it into two start/end functions is more async-friendly as it won't block the thread for a potentially very long duration of capture.

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

No branches or pull requests

1 participant