-
Notifications
You must be signed in to change notification settings - Fork 17
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
Cannot stop live-view after starting it #13
Comments
I'm also always got
Is there any reference? |
What do you mean by disabling the viewfinder? Manually on the camera? Or somehow via the API? |
Via the API. I call This is the settings object that I retrieve from the camera:
|
Just to be sure, are you awaiting the promise from setConfigValue before continuing? |
Basically yeah, this sounds like typical scheduling problem. That #schedule wrapper in the API should take care of it and make sure that you're not trying to lower the mirror in the middle of a frame capture. If it doesn't, then either the uiTimeout needs to be increased or there is some other ordering bug. |
FWIW this doesn't happen in official CLI because they are not thread-safe, run in single-threaded mode and from their PoV all USB operations are blocking so can't execute concurrently in principle. In our case it's async APIs under the hood which is why the promise queue is needed - if kinda acts like a mutex, ensuring that no operations overlap, otherwise you get the mentioned "device busy" issue. |
Camera: Nikon D5300
When starting the viewfinder (live-view) the camera raises the mirror and you can
capturePreviewAsBlob
at high speed. When trying to disable the viewfinder it will error:Error: libapi.mjs?v=263350c0:9 Uncaught (in promise) Error: I/O in progress
My first guess is that it has something to do with the scheduling of events like @RReverser mentions in his blog.
Notes
The text was updated successfully, but these errors were encountered: