Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: app just dyes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: app just dyes



Hi,

Vickie, I'm a bit new to all this...I would have thought the GWorld is the place to get the latest data but from what you said it sounds like the PixMap is better. Why would looking at the GWorld cause a crash and not the PixMap? In my case I have video being displayed and then when I call "grabPict" from the Sequence Grabber it will crash about 50% of the time.

-- Aaron

The reason I thought of pixmaps as opposed to GWorlds was purely hierarchical. I thought, "why not get closer to the data?".

From what I understand, a GWorld in QuickDraw and QuickTime is a Structure which itself contains (amongst other things) a GrafPort Structure, which contains fields that are handles to the PixMap. So that's at least three levels of indirection before you start. When I looked at aNt's code I wondered if it were possible that he was_not_ actually iterating through pixel data. This is the line of questioning I would pursue, as I don't have an answer to the question, "Why might it crash?". Anyway, if you are looking for speed when repeatedly iterating,I would think you want to avoid all of the dereferencing.

A pixmap is also a Structure. There is a field in the pixmap structure called baseAddr which contains a pointer to the beginning of the pixels. I asked some questions about this a few months ago, and it seems that the RawEncodedImage Class gives you this for free.

I must add that I haven't done anything with sequence grabbers, so I may be totally off base here. I enclose a copy of one of Bill Stewart's messages on this subject dating back to December last year, which I think supports this line of enquiry.

Vickie
-------------------------------------------------



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.