Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EnterMoviesOnThread(), MoviesTask(), and MP Task...



Hi there,

I want to gain some understandings on EnterMoviesOnThread() so I decided to write a test application.

I do the usual OpenMovieFile() and NewMovieFromFile() to get to a Movie.

Then I do the SetMoiveGWorld(), GetMovieBox(), OffsetRect(), SetMovieBox(), SizeWindow() etc.

All the code above is done from the main thread.

Here's the code right after SizeWindow() and that the part I am not sure:

1. StartMovie(gMovie);
2. MPCreateTask(moviesTaskMP, NULL, 0, NULL, NULL, NULL, 0, &gTaskID);

And the code in the moviesTaskMP() looks like this:

OSStatus moviesTaskProcMP(void *inParameter)
{
OSStatus error = EnterMoviesOnThread(0);

if (error == noErr) {
AttachMovieToCurrentThread(gMovie);

// StartMovie(gMovie);

while (true) {
MoviesTask(gMovie, 0);
}
ExitMoviesOnThread();
}
return error;
}

Everything works fine until I tried to move StartMovie(gMovie) from the main thread to the beginning of the MPTask, then I don't get any sound. Must I always need to start the movie from the main thread before I attach to a different MP task?

Thanks.

pete
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.