Mailing Lists: Apple Mailing Lists

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

Getting an image fro OpenGL into the sequence grabber, via a vdig



Hello again,

If I understand quick time correctly (and I'm not sure I do!), then a simple VDig (not compressed, not using async grabbing) will give images to the sequence grabber via the PixMap pointer, passed in through the call VDSetPlayThruDestination.

At which point it's supposed to copy data from it's internal frame buffer, to this PixMap, I'm not sure. But ignoring that - how do I go about it? (I'm new to quicktime, new to OpenGL and new to Quart/ QuickDraw - so .... Im feeling a little lost).

I've got an image, currently it can be either raw bit of data, grabbed using:

glReadPixels((GLint)captureSize.origin.x, (GLint) captureSize.origin.y, width, height,
GL_BGRA,
GL_UNSIGNED_INT_8_8_8_8_REV,
data);


or a bitmap structure, created from the above data, like so:


/* Make an image out of our bitmap; does a cheap vm_copy of the bitmap */
bitmap = CGBitmapContextCreate(data, width, height, 8, byteWidth,
cSpace,
kCGImageAlphaNoneSkipFirst /* XRGB */);
CGImageRef image = CGBitmapContextCreateImage(bitmap);


QT (or the SG) has given me a PixMap structure. How do I go about transferring data from what I have available as a source, into the PixMap? I guess I'm looking for some 'CopyToPixMap' style function, that I can use... and while these seem to exist (CopyBits being one) - they don't work with both PixMaps and CGImageRefs. So I must convert, which is understandable. I'm just a bit lost on what's the best data format to convert to (primarily interested in speed).

Sorry if this msg appears a little off-topic (since it's not dealing 100% with quicktime APIs)

---
Neil Clayton


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

This email sent to 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.