I have an experimental version of ofxQTKitMoviePlayer i’m using in a current project. I plan on cleaning it up afterwords and sharing it. In the meantime, here is what I did to get it working…
QTMovieView uses only Core Image under the hood, and doesn’t make it easy to get at the openGL textures which is what we need to connect to OF. But quicktime has a “visual context” object that you can attach to QTMovies that then renders their frames to OpenGL textures
Look at the QTCoreVideo102 sample code, my class is totally based off of this. The only leap was how to create a visual context in OF.
in their code they do this:
CGLContextObj cglContext = (CGLContextObj)[theOpenGLContext CGLContextObj];
CGLPixelFormatObj cglPixelFormat = (CGLPixelFormatObj)[theOpenGLPixelFormat CGLPixelFormatObj];
CFDictionaryRef dictAttribs = NULL;
OSStatus err = QTOpenGLTextureContextCreate( allocator, cglContext, cglPixelFormat, dictAttribs, &visualContext->context );
but we don’t have a an NSOpenGLContext or NSOpenGLPixelFormat in OF since we dont have an NSOpenGLView. But luckily we can do this:
QTOpenGLTextureContextCreate(NULL, CGLGetCurrentContext(), CGLGetPixelFormat(CGLGetCurrentContext()), NULL, &visualContext);
then add that visual context to the QTKit movie via:
also if you are running Snow Leopard, you can get extra hardware acceleration through setting QTMovieOpenForPlaybackAttribute to yes when opening the movie (opts into QuicktimeX)
I get decent framerates at HD+ quality movies, but have seen some slow down playing multiple movies at once. so this is something I want to work through before publishing the code.
Hope this helps a little!