Streaming Quicktime to OpenGL Texture
There was a little bit of code that I had seen about a year back that took a quicktime movie, grabbed the buffer and slapped it into an OpenGL texture. It would then display the texture on a quad a sphere. Code similar to this is available from Apple, but it is horribly cryptic and carbon. The special thing about the example I'm thinking of is that it was written in Cocoa (my weapon of choice) or at least using Cocoa and some carbon includes. I believe it was written by Bryan Blackburn, who ported a lot of the Nehe tutorials to OS X, but I could not verify this.
I cannot find this example anywhere and I would very much appreciate it if anyone here knew where I could find it.
Thanks!
I cannot find this example anywhere and I would very much appreciate it if anyone here knew where I could find it.
Thanks!
Not what you're looking for, but this is my take on simplifying the apple code: http://onesadcookie.is-a-geek.net/svn/repos/QTValuePak/ . Take a look at OpenGLMovie.c.
OneSadCookie Wrote:Not what you're looking for, but this is my take on simplifying the apple code: http://onesadcookie.is-a-geek.net/svn/repos/QTValuePak/ . Take a look at OpenGLMovie.c.
Oh my, comments in the code! What a novel concept, I wish Apple would catch on...
Thanks as always Keith. I can at least get my head around your version of the code, though a Cocoa version would still be best.
It doesn't really get very Cocoa-y. You could use an NSMovie to get the Movie, rather than going path->FSRef->FSSpec->Movie or whatever convoluted sequence my code takes, but the rest is about as you'd do it.
OneSadCookie Wrote:It doesn't really get very Cocoa-y. You could use an NSMovie to get the Movie, rather than going path->FSRef->FSSpec->Movie or whatever convoluted sequence my code takes, but the rest is about as you'd do it.
Ok, I was under the impression that NSMovie was too weak of a class to do this. I'll check it out.
[Edit]I got it working! Thanks OSC! I'm using NSMovie, but basically just as a shell to the pointer of the movie data. Now it's just up to real implementation.
[/Edit]
CocoaBlitz has this very functionality. Just rip the CBMovieTexture class out and make your appropriate modifications. Almost pure Cocoa. Control the movie with CBMovie. Have fun. All the source is LGPL'd.
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL ES Texture Compression | ajrs84 | 9 | 611 |
May 7, 2013 03:36 PM Last Post: ajrs84 |
|
| OpenGL ES Texture Masking | airfire | 5 | 11,509 |
Nov 14, 2012 09:36 AM Last Post: toanNguyen |
|
| OpenGL ES Texture Masking | dalasjoe sin | 0 | 3,159 |
Apr 13, 2012 12:17 AM Last Post: dalasjoe sin |
|
| Texture in OpenGL ES 2 looks pixelated | vunterslaush | 18 | 17,880 |
Aug 30, 2011 09:44 PM Last Post: Frogblast |
|
| Render video (e.g. QuickTime) to buffer or texture? | Ingemar | 14 | 11,041 |
Jun 8, 2011 04:09 PM Last Post: mdejong1024 |
|

