Playing a QuickTime Movie in Cocoa

rhale1

KU Mac Geek
I want a quicktime movie to play in a window I have. How would I tell Cocoa to display the movie?
 
Use an NSMovieView. Mind you, NSMovieView is a buggy piece of sh**, but so far as I know it's the best way to do it. I'm new to Cocoa (and carbon, and quicktime, and everything!) and I was quite saddened to discover how terribly quicktime works with Cocoa (at least without delving into a lot of unCocoa-like crap; and the quicktime documentation is laid out so terrribly it takes me hours sometimes [yes, seriously] just to find a particular function I need).

Hamish
aas@umail.ucsb.edu
 
Originally posted by Hamish
Use an NSMovieView. Mind you, NSMovieView is a buggy piece of sh**, but so far as I know it's the best way to do it. I'm new to Cocoa (and carbon, and quicktime, and everything!) and I was quite saddened to discover how terribly quicktime works with Cocoa (at least without delving into a lot of unCocoa-like crap; and the quicktime documentation is laid out so terrribly it takes me hours sometimes [yes, seriously] just to find a particular function I need).

Hamish
aas@umail.ucsb.edu

Of course NSMovieView don't do much things (it's limited to play:, stop:, setMovie:, etc... But you can access the full QuickTime API using the movieController method (see NSMovieView and QuickTime API references in the Developer docs for details. I also suggest you take a look at the SimpleCocoaMovie example on Apple's website, which makes call to the QuickTime API directly.

Have fun.
 
yeah and on the SampleCocoaMovie source code that CBaron put up, all you really need is the awakeFromNib function where it sets up the quicktime movie.

Hamish: IMO I think Quicktime with Cocoa is excellent and i havnt really found any bugs at all. You probably just dont know how to use it properly...
 
Back
Top