From: <ki...@us...> - 2003-03-29 20:07:23
|
Update of /cvsroot/gphoto/libgphoto2/camlibs/ptp2 In directory sc8-pr-cvs1:/tmp/cvs-serv31571 Modified Files: ChangeLog library.c Log Message: * library.c: enabled back capture image support Index: ChangeLog =================================================================== RCS file: /cvsroot/gphoto/libgphoto2/camlibs/ptp2/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChangeLog 29 Mar 2003 19:39:47 -0000 1.7 +++ ChangeLog 29 Mar 2003 20:07:19 -0000 1.8 @@ -1,4 +1,6 @@ 2003-03-29 Mariusz Woloszyn + * library.c: enabled back capture image support +2003-03-29 Mariusz Woloszyn * ptp.h: added Nparam field to PTPContainer * ptp.c: using Nparam field we send requests with only used params to the camera (although specs says it's legal, some cameras do not Index: library.c =================================================================== RCS file: /cvsroot/gphoto/libgphoto2/camlibs/ptp2/library.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- library.c 27 Mar 2003 13:37:14 -0000 1.7 +++ library.c 29 Mar 2003 20:07:19 -0000 1.8 @@ -536,16 +536,19 @@ if (type != GP_CAPTURE_IMAGE) { return GP_ERROR_NOT_SUPPORTED; } -/* XXX + + if (!ptp_operation_issupported(&camera->pl->params, + PTP_OC_InitiateCapture)) return GP_ERROR_NOT_SUPPORTED; + CPR(context,ptp_initiatecapture(&camera->pl->params, 0x00000000, 0x00000000)); - while (ptp_event_wait (&camera->pl->params, &event)!=PTP_RC_OK); - if (event.EventCode==PTP_EC_ObjectAdded) { - while (ptp_event_wait (&camera->pl->params, &event)!=PTP_RC_OK); - if (event.EventCode==PTP_EC_CaptureComplete) { + while (ptp_usb_event_wait (&camera->pl->params, &event)!=PTP_RC_OK); + if (event.Code==PTP_EC_ObjectAdded) { + while (ptp_usb_event_wait (&camera->pl->params, &event)!=PTP_RC_OK); + if (event.Code==PTP_EC_CaptureComplete) { return GP_OK; } } -*/ + /* we're not going to set path, ptp does not use paths anyway ;) */ return GP_ERROR; } @@ -1063,7 +1066,7 @@ int camera_init (Camera *camera, GPContext *context) { - GPPortSettings settings; + /*GPPortSettings settings;*/ short ret,i; /* Make sure our port is a USB port */ |