From: pbw <pb...@ar...> - 2012-05-21 23:52:52
|
Marcus, I took the liberty of hacking the ptp2 library.c (see attached) code to test my theory... lo and behold it worked! I added the following right before the call to "debug_objectinfo" in the second loop (the "do" loop) in the block of code headed with the "/* CANON EOS fast mode */" comment. { uint16_t ret; ret = ptp_getobjectinfo (params, params->handles.Handler[j], ¶ms->objectinfo[j]); gp_log (GP_LOG_DEBUG, "ptp2/std_getobjectinfo", "*** ptp_getobjectinfo: ret=%d ***", ret); if (ret != PTP_RC_OK) { gp_log (GP_LOG_ERROR, "ptp2/std_getobjectinfo", "received error 0x%04x on query of 0x%08x", ret, params->handles.Handler[i]); // if (i < params->handles.n-1) // memmove(¶ms->handles.Handler[i],¶ms->handles.Handler[i+1],(params->handles.n-i-1)*sizeof(params->handles.Handler[i])); // params->handles.n--; // i--; /* so we get the same entry again ... */ // continue; } } As you can see I commented out the error handling... I am not sure what should be done with this. All of the thumbnails were created correctly! Yea!!! Best regards, Perry BTW: the attached code contains some additional changes used in debugging only... On 5/21/2012 3:49 PM, pbw wrote: > Marcus, > > Looking at the code in ptp.c (v2.4.14), the PTPCANONFolderEntry > structure used in the "fast EOS" does not match that used in the > "fallback:" block in the v2.4.12 code. > > v2.4.12 loads this structure: > struct _PTPObjectInfo { > uint32_t StorageID; > uint16_t ObjectFormat; > uint16_t ProtectionStatus; > uint32_t ObjectCompressedSize; > uint16_t ThumbFormat; > uint32_t ThumbCompressedSize; > uint32_t ThumbPixWidth; > uint32_t ThumbPixHeight; > uint32_t ImagePixWidth; > uint32_t ImagePixHeight; > uint32_t ImageBitDepth; > uint32_t ParentObject; > uint16_t AssociationType; > uint32_t AssociationDesc; > uint32_t SequenceNumber; > char *Filename; > time_t CaptureDate; > time_t ModificationDate; > char *Keywords; > }; > > while v2.4.14 loads this structure: > struct _PTPCANONFolderEntry { > uint32_t ObjectHandle; > uint16_t ObjectFormatCode; > uint8_t Flags; > uint32_t ObjectSize; > time_t Time; > char Filename[PTP_CANON_FilenameBufferLen]; > uint32_t StorageID; > }; > > It appears to me that the thumbnail data is not being populated. > I am continuing my research into this issue... please let me know if > you have any other helpful hints or tips...<grin> > > Regards, > Perry > > > On 5/21/2012 2:28 PM, Marcus Meissner wrote: >> On Mon, May 21, 2012 at 11:23:02AM -0600, pbw wrote: >>> Sorry, your suggestion does not work... also, that same line of code is >>> in v2.4.12. >> And did you remove this line and recompiled as I said? >> >> The check is incorrect in this case you can temporary remove it. >> >> So: >> >> remove this line: >> >> if((size=ob->oi.ThumbCompressedSize)==0) return (GP_ERROR_NOT_SUPPORTED); >> >> then rebuild and retry. >> >> Ciao, Marcus >> >> > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Gphoto-devel mailing list > Gph...@li... > https://lists.sourceforge.net/lists/listinfo/gphoto-devel > > |