Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-03

libgphoto2 camera capture and control

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Walter

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 appreciate your thoughts. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200303/f7cec16f/attachment.html>

Reply by email

DougC
to Anthony Walter

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 wrote ----

The library seems to have some application idle timeout functions, but they don't seem to do anything with my appreciate your thoughts. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200303/e65e6447/attachment.html>

Reply by email

Anthony Walter
to DougC

My libgphoto2 pascal file is located here
<https://gist.github.com/sysrpl/d642bdbf9406aa21d77338f7873a32c4>.

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 <http://www.gphoto.org/proj/libgphoto2/support.php> can test.

Thanks for the advice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200303/08ded79b/attachment.html>

Reply by email