Creating invisible NSMovieViews
Creating invisible NSMovieViews
- Subject: Creating invisible NSMovieViews
- From: Ken Tabb <email@hidden>
- Date: Wed, 16 May 2001 12:55:02 +0100
Hi,
I've got an NSDocument based app which opens and plays a movie using an
NSMovieView in a window (defined in IB) and an NSMovie in it. With a bit
of Carbon code to do some QuickTime stuff, it works great.
I have another app which isn't so great. It opens a movie, grabs frames
from it, and shows those frames in an NSImageView (*not* an NSMovieView)
in a window (defined in IB), after a bit of image processing on the
frame. The problem is that I want to make an NSMovieView to control the
movie with, to get the handy methods like stepForward, without having to
use the QuickTime/Carbon calls like GetMovieNextInterestingTime(). The
NSMovieView isn't required to be shown on screen, so I'm assuming that I
just create an NSMovieView, and assign it the movie, like so:
// nsMovie has already been set up (without a movie controller or
NSMovieView, using initWithURL)
NSMovieView *theMovieView;
theMovieView = [NSMovieView alloc]; //instantiates the NSMovieView???
//there seem to be no init methods for NSMovieView, so I'm assuming
that's all you need to do to make an NSMovieView... all docs say
"description forthcoming"
[theMovieView setMovie:nsMovie];
... this piece of code is all that is needed to exit with SIGSERV 10, in
case you ever need to know how to do that.
So what am I doing wrong? It gets past the alloc call, and the NSMovie is
fine as far as I can tell (I can use it to do other things without
problem). Any ideas welcome,
Thanks in advance,
Ken
---------
Ken Tabb.
Mac & UNIX C/C++/Java developer (Health & Human Sciences),
Machine Vision researcher/programmer (Computer Science),
University of Hertfordshire, Herts AL10 9AB, England
Tel: (+0044 / 0) 1707 286171 e-mail: email@hidden
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider