On Tue, Apr 14, 2020 at 08:58:55PM +0200, Jon Molin wrote:
> Hi,
> 
> I'm poking around at libgphoto2 and I have a bit of trouble understanding
> how the gp_widgets are intended to be used. Obviously life isn't as easy as
> Nikon, Canon etc are using the same name for the same settings internally.
> 
> What I'm trying to do is to offer camera agnostic ways to do some common
> operations, such as set ISO, shutter speed and aperture.
> 
> Looking at camlibs/ptp2/config.c it seems like you have striven to have the
> same names for the functions no matter the model. But for aperture I
> noticed that (assuming I'm understanding things correct) it's is called
> aperture for about half of the brands while it's called f-number for the
> other half. ISO and shutter speeds seems to be the same though.
> 
> I also had a quick look at Darktable (
> https://github.com/darktable-org/darktable/blob/893effa0f18e5628de6e6636deb70e51fe987ac6/src/libs/camera.c#L573
> ) and it seems like I need to have special cases for a couple of the
> settings.
> 
> So, my two questions would be:
> 
> Is the Darktable way the intended way to implement it? IE I get all
> settings, look if f-number exist among them and if so determine that's the
> way, otherwise go for aperture (if that exist)
> 
> If not getting a nudge in the right direction would be great.

My Entangle Photo app takes the same approach as Darktable in this
respect too, as its the only viable option really. In general while
libgphoto2 makes a reasonable effort to paper over the differences 
between cameras & vendors, it can never be a perfect abstraction.

As well as the three example you see in darktable code, there is also
/main/capturesettings/imagequality (Nikon) vs /main/imgsettings/imageformat 
(Canon) for choosing JPEG/RAW formats. Even that's not simple though, as 
Canon's also have the same setting available per-storage-slot (cf, sd, 
exthd)

The actual values exposed for each setting are often very different,
even if the control names are the same. For example "manualfocusdrive" 
takes an integer value -32767 -> +32767 for Nikon, but a fixed set of 
choice options Near 1, Near 2, Near 3, Far 1, Far 2, Far 3 for Canon.


Regards,
Daniel
--
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



_______________________________________________
Gphoto-devel mailing list
Gphoto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gphoto-devel

Reply via email to