jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
357 stars 59 forks source link

wait-for-event: is picture downloaded? #143

Closed anxuae closed 1 year ago

anxuae commented 1 year ago

Hello,

This issue is note a bug but a question: in your exemple wait-for-event.py the comment say:

gp.camera_wait_for_event() function waits for a capture trigger to arrive. When it does, it downloads the image directly from the camera, without using SD card

However in the code, you call the function camera.file_get so it seems that picture is not really download by the camera.wait_for_event(timeout) function but only the oath to the picture.

Can I wait for 4 consecutive event GP_EVENT_FILE_ADDED then only after get the 4 files? Pictures are kept in the sdcard or internal memory of the DSLR?

Thanks

jim-easterbrook commented 1 year ago

You're right that it's only the path to the picture that gets downloaded. I should make that comment clearer.

Pictures will certainly be kept on the camera's SD card, but internal memory is more volatile. Size of picture vs size of memory is one factor, and pictures may get lost if you close the connection to the camera. And different cameras behave differently.

anxuae commented 1 year ago

Hi @jim-easterbrook

Thanks for reply. Can you confirm that event GP_EVENT_FILE_ADDED I'll always occurs when a capture is triggered whatever the DSLR model? I would like to know if I can rely on it.

By the way, you can close the issue if you want.

jim-easterbrook commented 1 year ago

I can't confirm that as I don't know much about the internals of libgphoto2. Best ask on the gphoto2 mailing list.