Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not receiving GP_EVENT_CAPTURE_COMPLETE event when capturetarget = Memory Card #929

Open
artyom-beilis opened this issue Oct 6, 2023 · 6 comments

Comments

@artyom-beilis
Copy link
Contributor

Describe the bug

When using trigger capture and waiting for events I receive FILE_ADDED but never receive GP_EVENT_CAPTURE_COMPLETE event when capturetarget = Memory Card, When capturetarget is set to internal memory I receive capture completed.

Note, I can't use only FILE Added since I don't know in advance how many are saved (jpeg, raw or jpeg & raw)

Name the camera
Canon EOS 7D

libgphoto2 and gphoto2 version

gphoto2 2.5.15

Copyright (c) 2000-2017 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.15         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.16         all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

To Reproduce

Since I use libgphoto2 basic sequence is just set save target to sd card and than catpture completed event is not fired.

I'm attaching libgphoto log (with some additions) for case when target is sdcard and internal memory

With internal memory there is an entry camera_wait_for_event:entry type 0004 it does not appear when target in SDCard.

ols_camera_strorage_memory.log
ols_camera_storage_sdcard.log

@artyom-beilis
Copy link
Contributor Author

Same with latest libgphoto2 2.5.30.1

@artyom-beilis
Copy link
Contributor Author

Currently, I workaround it by requiring from user to save only a single type of file per trigger - either raw or jpeg but not both. So I can take action on "file added" event.

So now I implemented same requirement, limitation as Indi. But I'd rather prefer to use capture complete event as more correct and flexible one.

@Sija
Copy link
Contributor

Sija commented Oct 2, 2024

@axxel Is this sth that can be fixed with the newest changes?

@axxel
Copy link
Contributor

axxel commented Oct 2, 2024

There is nothing that I added that directly affects this issue. The EOS cameras simply don't emit the standard PTP_EC_CaptureComplete event, neither a canon-specific one with the same meaning. There is the EOS specific PTP_EC_CANON_EOS_CameraStatusChanged event comes with an int parameter. If this is 0, the CAPTURE_COMPLETE is triggered. That is obviously not a standard behavior of all EOS cameras in all configurations. The R5m2 is another one where this is not reliably triggered (#1028).

I would argue the best way to move forward is trying to find another "internal" event that can be used to trigger the CAPTURE_COMPLETE event.

My question to @artyom-beilis is: what is it that you are waiting for? There are at least 2 points in time that could be considered here

  1. The camera is ready to take another picture. See my PR make camera_trigger_canon_eos_capture "synchronous" #1027.
  2. The camera has successfully stored the image(s) somewhere, so you can now rip out the battery without data loss.

@artyom-beilis
Copy link
Contributor Author

The camera is ready to take another picture.

Exactly. I download images in parallel to setting a new capture. However if there are more than one file, trigger will fail.

I use it for astrophotography automation and I need a reliable sequence of caputure/download - and batch the processing so I can capture a next image while downloading.

@axxel
Copy link
Contributor

axxel commented Oct 2, 2024

So you want to store the data on the memory card, take pictures back to back, as fast as possible and simultaneously download the images from the card to the PC?

What is the "frame rate" you achieved with your current setup? Astrophotography sounds like very long exposure times, so you are not really that much in a hurry, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants