![]() ![]() Other cameras will likely have different sets of settings, underlying APIs, and quirks. It can take some time, but if the value is actually supported by the camera, it will get there, and, if not, it will stop on the nearest supported value. Check that the last step didn't jump over the desired value nor wrapped around the end or the beginning of the list.Read back the value the camera actually landed on.Wait a bit for the camera to update the settings.Make a step (or a few) in the direction of the chosen value.When setting one of those values, gPhoto2 has no other choice but to: To make matters more complicated, it doesn't return a list of the actually supported values, either-the returned list seems hardcoded across many Sony camera models. Sony a6600 doesn't expose an API to set values like ISO, aperture or shutter speed directly, and instead only provides commands to increase or decrease them by the specified number of steps. Like with most other issues you might see, this is not caused by the performance of WebAssembly or WebUSB, but by how gPhoto2 interacts with the specific camera chosen for the demo. You might have noticed that changing settings takes a while in the video. Feel free to check out the live or the pre-recorded demo before reading up on technical details: The demo running on a laptop connected to a Sony camera. In the end, I got a working web application that previews live feed from a DSLR and can control its settings over USB. In the second post, I'll go into details on porting and integrating gPhoto2 itself. In this blog post, I'll describe how I ported libusb itself, and what tricks might be necessary to port other popular libraries to Fugu APIs. I'll describe the steps for building this demo in two parts. It supports several protocols, but the one I was most interested in was USB support, which it performs via libusb. ![]() In particular, an open source project gPhoto2 has been in this space long enough to reverse-engineer and implement support for a wide variety of digital cameras. The idea I chose was DSLR remote control. The most important thing to do when porting a library is choosing the right demo-something that would showcase the capabilities of the ported library, allowing you to test it in a variety of ways, and be visually compelling at the same time. Isn't the web fun? First things first: a demo # So what the port achieves is, in fact, one libusb, compiled to WebAssembly, talking to another libusb, shipped as part of the browser, through an intermediate layer. Fun fact: On some platforms, implementation of WebUSB also uses libusb under the hood. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |