Streaming Quicktime to OpenGL Texture

Member
Posts: 142
Joined: 2002.11
Post: #1
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!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
Member
Posts: 142
Joined: 2002.11
Post: #3
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
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.
Quote this message in a reply
Member
Posts: 142
Joined: 2002.11
Post: #5
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. Smile[/Edit]
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #6
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
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL ES Texture Masking airfire 6 14,925 Mar 17, 2014 07:07 PM
Last Post: baioses
  OpenGL ES Texture Compression ajrs84 9 4,328 May 7, 2013 03:36 PM
Last Post: ajrs84
  OpenGL ES Texture Masking dalasjoe sin 0 3,878 Apr 13, 2012 12:17 AM
Last Post: dalasjoe sin
  Texture in OpenGL ES 2 looks pixelated vunterslaush 18 23,544 Aug 30, 2011 09:44 PM
Last Post: Frogblast
  Render video (e.g. QuickTime) to buffer or texture? Ingemar 14 13,259 Jun 8, 2011 04:09 PM
Last Post: mdejong1024