
Boolean CALLBACK __export MovieStopped (MovieController mc,
UINT uAction,
LPVOID lpParam,
LONG lRefCon)
{
TimeRecord tr;
TimeValue tv;
switch (uAction)
{
case mcActionPlay:
if (lpParam == 0) // Did the movie stop?
{
tv = GetMovieTime (mMovie, &tr);
// Note we stored the movie duration to a global when
// we opened the movie.
if (tv == gMovieDuration) // At the end of the movie?
MessageBox (NULL, "Movie Stopped at the End", "", NULL);
}
return FALSE; // Let the movie toolbox handle the mcActionPlay as well.
default:
return FALSE;
}
}
Note the lpParam parameter contains the rate value called when the
mcDoAction is called with the rate of 0. If you try to get the rate inside
the filter proc using mcActionGetPlayRate, you get the next possible
play rate change, not the current one called. In other words, if you want to
check out the value used when the filter proc is triggered, use lpParam.Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help