Skip navigation.
 
mlRe: QTMovieLayer and renderInContext:
FROM : Bill Dudney
DATE : Thu Nov 22 13:27:17 2007

Hi John,

I'm not sure that I understand the question but if all you want to do 
is put a movie layer into a view I have a simple example here that 
works for me;

- (void)awakeFromNib {
    NSString *moviePath = @"your path here";
    NSError *error = nil;
    movie = [QTMovie movieWithFile:moviePath error:&error];
    [movie autoplay];
    QTMovieLayer *layer = [QTMovieLayer layerWithMovie:movie];
    [self setLayer:layer];
    [self setWantsLayer:YES];
}

This awakeFromNib is from my view class that takes up the whole 
window. The movie plays when the app starts.

In the example (that I've not posted yet but will soon) on my blog I 
have a 'play' button that sits in the view that the movie plays on and 
it works like a champ.

HTH,

-bd-
http://bill.dudney.net/roller/objc

On Nov 21, 2007, at 11:47 PM, John Clayton wrote:

> Hi All,
>
> I am trying to use the CALayer renderInContext: call to put the 
> contents of a QTMovieLayer instance onto a view, but I get a blank 
> view - nothing renders.
>
> Is this call supposed to work for a QTMovieLayer?  I suppose the 
> question could be expanded to: is the renderInContext: method 
> supposed to work for any type of open-gl based layer class?
>
> Thanks,
> --
> John Clayton
> http://www.coderage-software.com/
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlQTMovieLayer and renderInContext: John Clayton Nov 22, 07:47
mlRe: QTMovieLayer and renderInContext: John Clayton Nov 22, 10:07
mlRe: QTMovieLayer and renderInContext: Scott Anguish Nov 22, 11:36
mlRe: QTMovieLayer and renderInContext: Scott Anguish Nov 22, 11:42
mlRe: QTMovieLayer and renderInContext: Bill Dudney Nov 22, 13:27
mlRe: QTMovieLayer and renderInContext: John Clayton Nov 22, 15:24
mlRe: QTMovieLayer and renderInContext: Bill Dudney Nov 23, 14:41
mlRe: QTMovieLayer and renderInContext: John Clayton Nov 23, 16:14
mlRe: QTMovieLayer and renderInContext: Bill Dudney Nov 23, 16:27