Getting the original moviebox in Cocoa
Getting the original moviebox in Cocoa
- Subject: Getting the original moviebox in Cocoa
- From: Taxxodium <email@hidden>
- Date: Wed, 26 Dec 2001 13:18:23 +0100
Hello,
I'm trying to write a movie player in cocoa and so far it has worked very
well. The only problem I have is that the movie show up in the same size as
my NSMovieView (which was created using Interface Builder). Is there any way
to make the NSMovieView of the same size as the original movie?
So far I have this (but as you may know, it doesn't work):
theMovie = [[NSMovie alloc] initWithURL:theFileURL byReference:YES];
[movieView setMovie:theMovie];
[movieView showController:NO adjustingSize:NO];
qtMovie = [[movieView movie] QTMovie];
EnterMovies();
GetMovieBox(qtMovie, &movieRect);
viewRect.origin.x = (float)movieRect.bottom;
viewRect.origin.y = (float)movieRect.left;
viewRect.size.width = ((float)movieRect.right -
(float)movieRect.left);
viewRect.size.height = ((float)movieRect.bottom -
(float)movieRect.top);
ViewRect is an NSRect
MovieRect is a Rect
MovieView is an NSMovieView
TheMovie is an NSMovie
Qtmovie is a Movie
Thanks in advance
_____
Jesus De Meyer
CEO @ E dot software
http://homepage.mac.com/edotsoftware
"Evolution never stops..."