[Lazarus] libgphoto2 camera capture and control

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] libgphoto2 camera capture and control

Free Pascal - Lazarus mailing list
Does anyone know if any projects exists for libgphoto2?

I wrote an object oriented interface to libgphoto2 and have a problem with tethering (using the computer to control a camera) where after some time my camera will turn off during a period of inactivity.

To reset camera tethering you have to manually turn the switch on the camera to off then turn it back on again, wait a bit then press a button in my application to try and connect again. This is a inconvenient as you have to stop using the computer and fiddle with the camera constantly. I am wondering if anyone has handled this before and had any insight on how to prevent a camera from just powering down. If I continually take photos this might fix the problem, but that would interfere with other operations as the camera is occupied during that period and it would cause random intervals where camera settings could not be made.

The library seems to have some application idle timeout functions, but they don't seem to do anything with my camera at least.

I appreciate your thoughts.



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] libgphoto2 camera capture and control

Free Pascal - Lazarus mailing list
Sounds like a configuration change in the camera settings is called for so it will stop shutting down after apparent inactivity.


---- On Tue, 03 Mar 2020 07:57:28 -0500 Anthony Walter via lazarus <[hidden email]> wrote ----

The library seems to have some application idle timeout functions, but they don't seem to do anything with my camera at least.

I appreciate your thoughts.



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] libgphoto2 camera capture and control

Free Pascal - Lazarus mailing list
My libgphoto2 pascal file is located here.

That's what I've been doing on an idle timer, but admittedly when I submitted the changes I didn't actually change any of the libgphoto2 "widget" values. I just am calling ...

function TCamera.ApplyChanges: Boolean;
begin
  if Connected then
    Result := gp_camera_set_config(FCamera, FWindow.FWidget, FContext) = GP_OK
  else
    Result := False;
end;

From a timer without settings and new "widget" values. I might try changing a widget value and see if that works. I will upload complete application sources to a a git repo soon and maybe someone with a gphoto2 supported camera can test.

Thanks for the advice.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus