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: ANN: Sequence Grabber + OpenGL texture example code



Note that VisualContexts can be based on an OpenGL-texture (nominally opaque, since it resides on the video card, unless you're doing client storage trickery) or on a pixel buffer. It sounds like you need to use a VCPixelBuffer instead of a GWorld -- have a look at

http://developer.apple.com/documentation/GraphicsImaging/Reference/CoreVideoRef/Reference/reference.html


for the top-level functions available, but you should be able to directly access pixel data this way. I don't know if there's any acceleration available for VCPixelBuffers, but at least you'll be using the modern calls.


Hope this helps,
Seth

David Cairns wrote:



On 6/6/06, Jerry <email@hidden <mailto:email@hidden>> wrote:

    On 5 Jun 2006, at 17:38, Jeff Szuhay wrote:
    > On Jun 5, 2006, at 12:27 PM, David Cairns wrote:
    >> I'm currently still using GWorlds and Rects, which Xcode warns me
    >> have
    >> become deprecated.
    >
    > Look for QTNewGWorld and/or QTGWorldFromPixMap. These are the non-
    > deprecated
    > calls for what you need.

    But once you have one of these, there's no non-deprecated way to
    dispose of it :-(

    Jerry


If you look at my code, I already use QTNewGWorld (QTNewGWorldFromPtr was giving me annoying results, so I just scrapped it – and yes, i did allocate a buffer for it beforehand).


The problem is that we apparently have two options in accessing the pixel data in a GWorld directly:

QTNewGWorld + GetGWorldPixMap + LockPixels
or
QTNewGWorldFromPtr

I chose the first, but LockPixels was deprecated in 10.4. As I understand it, GWorlds et al are on their way out, and I know there must be some kind of alternative (like Core Image), but none of them allow *direct access to pixel data*, which I kind of need (as far as i can tell).

it's possible that i'm completely wrong about Core Image. if i am, let me know; i'd love to update this sample code again and make it "actually current" in regard to Apple's APIs.

:^)
 -- David Cairns
Pennsylvania State University

------------------------------------------------------------------------

_______________________________________________
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


_______________________________________________ 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
References: 
 >Re: ANN: Sequence Grabber + OpenGL texture example code (From: "David Cairns" <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.