Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Capture SDK Questions



I'd like to add the following:

the two questions below are related. If I try to get the current viewfinder image, I often get a result code that is the same as the property value.
>From this moment the camera does not respond correctly anymore, but returns very strange return codes.
Three times I could load images, one was OK, but the other ones were corrupted. The lower half was only gray noise.

This is the code I'm using:

buf = malloc(32 * 1024 + sizeof(PTPPassThroughPB) );
if ( buf )
{
passThroughPB = (PTPPassThroughPB *)buf;
passThroughPB->commandCode = 0x901d;//kCanonGetViewfinderImage;
passThroughPB->numOfInputParams = 0;
passThroughPB->numOfOutputParams = 0;
passThroughPB->dataUsageMode = kPTPPassThruReceive;
passThroughPB->dataSize = 1024;

memset( &msgPB, 0, sizeof( ICAObjectSendMessagePB ) );

msgPB.object = curDevice;
msgPB.message.messageType = kICAMessageCameraPassThrough;
msgPB.message.startByte = 0;
msgPB.message.dataPtr = buf;
msgPB.message.dataSize = 1024 +
msgPB.message.dataType = kICATypeData;


err = ICAObjectSendMessage( &msgPB, NULL );
}


Any hints?

Stefan

Am 18.02.2005 um 08:05 schrieb Stefan Hanshans:

Dino,

thank you, now it is working.

Now I have a few new questions (sorry for the noise on this list, but I'm no USB expert).

If I read properties, it often happens that the command is executed, but no data is returned. Sometimes the result code is set to the same value as the property, sometimes the result code is 0x2001, but without data.

Do you know how to get the current viewfinder image or an image that has been captured to memory (and not to memory card) from a Canon PowerShot camera? I think that this is a vendor related issue, and I've tried it many times without success.
Downloading an image that is already on the card is no problem, but I'd like to get the image that is still in internal memory. I know that there must be a solution, because in the Canon ImageCapture application it is working.

Thanks in advance

Stefan

Am 16.02.2005 um 20:11 schrieb Dino Tang:

You probably have some memory issues. I'll turn on guard malloc and see what's going on. If you are on Tiger, you can do source level debugging on your module ( or the SimplePTPCamera module ). Delete the PTPCamera module in /System/Library/ImageCapture/Devices and launch the SimplePTPCamera from Xcode.

--Dino

On Feb 16, 2005, at 10:35 AM, Stefan Hanshans wrote:

0 szone_malloc
1 malloc_zone_malloc
2 malloc
3 operator new(unsigned long)
4 aeConvertClassicToCarbon
5 AECreateAppleEvent
6 AECreateAppleEvent
7 AEPutParamDesc
8 ICASharedMemoryUnmap
9 ICASharedMemoryUnmap
10 ICAObjectSendMessage


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Image Capture SDK Questions (From: Stefan Hanshans <email@hidden>)
 >Re: Image Capture SDK Questions (From: Dino Tang <email@hidden>)
 >Re: Image Capture SDK Questions (From: Stefan Hanshans <email@hidden>)
 >Re: Image Capture SDK Questions (From: Stefan Hanshans <email@hidden>)
 >Re: Image Capture SDK Questions (From: Dino Tang <email@hidden>)
 >Re: Image Capture SDK Questions (From: Stefan Hanshans <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.