FROM : Guillem Palou
DATE : Sat Mar 22 20:19:32 2008
Hi all, anyone knows what's wrong with this code?
-(void)loadStateChanged:(NSNotification *) notification
{
QTMovie *movie = [notification object];
long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute]
longValue];
if (loadState >= 20000)
[clipMovieView
setMovie:movie]; <--- crash
}
QTMovie *movie = [QTMovie movieWithQuickTimeMovie:[currentObject theMovie]
disposeWhenDone:NO error:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(loadStateChanged:)
name:QTMovieLoadStateDidChangeNotification object:movie];
if (nil == error)
{
[movie retain];
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification
notificationWithName:@"QTMovieLoadStateDidChangeNotification"
object:movie]];
}
It crashes when I call the setMovie method of the QTMovieView Object. The
code seems to work with movieWithFile instead of movieWithQuicktimeMovie.
Anyone knows what happens?
Thanks to all!
Guillem
DATE : Sat Mar 22 20:19:32 2008
Hi all, anyone knows what's wrong with this code?
-(void)loadStateChanged:(NSNotification *) notification
{
QTMovie *movie = [notification object];
long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute]
longValue];
if (loadState >= 20000)
[clipMovieView
setMovie:movie]; <--- crash
}
QTMovie *movie = [QTMovie movieWithQuickTimeMovie:[currentObject theMovie]
disposeWhenDone:NO error:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(loadStateChanged:)
name:QTMovieLoadStateDidChangeNotification object:movie];
if (nil == error)
{
[movie retain];
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification
notificationWithName:@"QTMovieLoadStateDidChangeNotification"
object:movie]];
}
It crashes when I call the setMovie method of the QTMovieView Object. The
code seems to work with movieWithFile instead of movieWithQuicktimeMovie.
Anyone knows what happens?
Thanks to all!
Guillem
| Related mails | Author | Date |
|---|---|---|
| Guillem Palou | Mar 22, 20:19 | |
| Jens Alfke | Mar 22, 21:29 | |
| Guillem Palou | Mar 22, 23:23 | |
| Bill Monk | Mar 23, 04:32 | |
| Jens Alfke | Mar 23, 06:38 |






Cocoa mail archive

