Closed jo-ei closed 7 years ago
0:00:00.761862501 6411 0x2aadf70 INFO photobooth photobooth.c:739:photo_booth_cam_config:<PhotoBooth@0x28142e0> capturetarget configured to 1 in camera
this line needs to show in the log, otherwise something is wrong. in your logs it said 0
do you have cam_keep_files under the [camera] section of the ini file?
if it failed because of the different camera model, then it should print "couldn't set %s config" with %s = "0" or "1".
i've added extra debug for the boolean ini keys,
try starting with GST_DEBUG=*photo*:7 ./photobooth
there should be a line TRACE photobooth photobooth.c:555:photo_booth_load_settings: read boolean ini key [camera]:cam_keep_files = TRUE
in the log output
Hi,
i can see
0:00:01.488977168 6877 0x1034c90 INFO photobooth photobooth.c:739:photo_booth_cam_config:<PhotoBooth@0xf9a240> capturetarget configured to 1 in camera
but there is no error like couldn't set %s config
But this is not the target from gphoto2? only disable the delete operation in the application?
/main/settings/capturetarget Label: Aufnahmeziel Type: RADIO Current: interner Speicher Choice: 0 interner Speicher Choice: 1 Speicherkarte
it seems you forgot to git pull and make after the last commit. but that doesn't matter since it wouldn't have fixed anything anyway, just added some debug.
however, it looks like canon needs to have the capturetarget set differently than nikon. somebody with a canon has to figure this out, i'll be abroad for 3 weeks now.
it might have something to do with this gphoto error: photobooth photobooth.c:597:_gphoto_err: GPhoto 0, save_settings [gphoto2-setting.c:243]:Can't open settings file for writing.
try setting it manually with the gphoto2 cli tool:
gphoto2 --set-config capturetarget=1
and then see if it's changed
no this does not work
pi@photobox:/tmp$ gphoto2 --set-config capturetarget=1 --capture-image-and-download Neue Datei ist in /store_00020001/DCIM/100CANON/IMG_1217.JPG auf der Kamera Speichere Datei als IMG_1217.JPG Lösche Datei /store_00020001/DCIM/100CANON/IMG_1217.JPG auf der Kamera
but with this it is ok
gphoto2 --set-config capturetarget=1 --capture-image-and-download --keep
pi@photobox:/tmp$ gphoto2 --set-config capturetarget=1 --capture-image-and-download --keep Neue Datei ist in /store_00020001/DCIM/100CANON/IMG_1218.JPG auf der Kamera Speichere Datei als IMG_1218.JPG Behalte Datei /store_00020001/DCIM/100CANON/IMG_1218.JPG auf der Kamera
i would say it does work :) it sets the capturetarget to the card correctly, otherwise the filename would be capt0001.jpg
.
pro tip: prepend a command with LANG=C
and output will be untranslated (english)
in the logfile i see:
photobooth photobooth.c:1700:photo_booth_take_photo:<PhotoBooth@0x2124240> gp_camera_capture gpret=0 Pathname on the camera: //capt0000.jpg
yeah, unfortunately that means that setting the config of capturetarget to 1 didn't work properly (even though there wasn't an error...) thanks libgphoto2 xD
can you add the --keep
option for testing when it is not deleted?
https://sourceforge.net/p/gphoto/bugs/937/#2037 capt0000.jpg indicates that it is a picture captured to SDRAM and not to the card. set the "capturetarget" to "card" and try again (should reported filenames like IMG_4242.JPG then)... Then --keep will work.
what the --keep
in gphoto2 does: it prevents the gp_camera_file_delete function from being called afte downloading the file. when the ini has the cam_keep_files =1
setting, then this call is also omitted in photobooth. you can tell by looking at the logfile. by default, gp_camera_file_delete gpret=0 is showing in the log, with keep activated, it's not in the log.
however, if the capturetarget is the internal camera's ram (0) instead of the flash memory disk (1) then there still isn't a file on the camera afterward, because there never was one on the sdcard to begin with. you can tell that by the capt0000.jpg filename. that is because setting the capturetarget configuration didn't work.
hi,
after some testing i found out that ~/.gphoto/settings
was not writeable for the user.
Fix: Delete folder .gphoto
or set rw-rw-r--
as permission
hi, cam_keep_files =1 in default.ini does`t work