NewMovieFromProperties - crashes.
NewMovieFromProperties - crashes.
- Subject: NewMovieFromProperties - crashes.
- From: Richard Salvatierra <email@hidden>
- Date: Thu, 9 Mar 2006 11:50:49 -0500
I have isolated this function to simply create a Movie object then
dispose of it on success.
If I point to a quicktime file, it works. If I point to an image
file it crashes.
This works on one sample app but not on my main project.
Please, any pointers/advice is appreciated. I must fix this issue.
- (IBAction) movieTest:(id)sender
{
OSStatus theError = noErr;
Boolean active = TRUE;
Movie channelMovie;
QTVisualContextRef visualContext;
NSString *theFilePath = @"/Users/admin/Pictures/myImage.jpg";
//NSString *theFilePath = @"/Users/admin/Movies/myMovie.mov";
QTNewMoviePropertyElement newMovieProperties[] =
{ {kQTPropertyClass_DataLocation,
kQTDataLocationPropertyID_CFStringNativePath, sizeof(theFilePath),
&theFilePath, 0},
{kQTPropertyClass_NewMovieProperty,
kQTNewMoviePropertyID_Active, sizeof(active), &active, 0},
{kQTPropertyClass_Context,
kQTContextPropertyID_VisualContext, sizeof(visualContext),
&visualContext, 0} };
NSOpenGLContext *sharedContext = [[[NSOpenGLContext alloc]
initWithFormat:[NSOpenGLView defaultPixelFormat] shareContext:nil]
retain];
theError = QTOpenGLTextureContextCreate( nil, [sharedContext
CGLContextObj], [[NSOpenGLView defaultPixelFormat]
CGLPixelFormatObj],nil, &visualContext);
theError = NewMovieFromProperties(sizeof(newMovieProperties) / sizeof
(newMovieProperties[0]), newMovieProperties, 0, NULL, &channelMovie);
NSLog(@"movie created");
DisposeMovie(channelMovie);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden