summaryrefslogtreecommitdiff
path: root/indra/media_plugins/quicktime
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2009-10-28 17:34:03 -0700
committerMonroe Linden <monroe@lindenlab.com>2009-10-28 17:34:03 -0700
commit8ae2f388b69105b81c49483bdae443aabfa9e26e (patch)
tree4f2d334e61ce08a05023bffd832d40aa570e16a4 /indra/media_plugins/quicktime
parent437449044583d50c8cad694e65e5a4a23a55d768 (diff)
Fixes for DEV-41791 and DEV-41920.
Reworked some of the autoplay logic in LLViewerMediaImpl to try and make it more consistent when media is unloaded and reloaded by the performance manager. LLViewerMediaImpl will now keep track of the media state and current time of media that it unloads for performance reasons, and attempt to restore playing or paused media to the same playhead time and state (playing or paused) when it reloads. Added "done" status that time-based media plugins can use to indicate that they've reached the end of the media and stopped. Added logging of priority transitions, for use in debugging issues with the peformance manager.
Diffstat (limited to 'indra/media_plugins/quicktime')
-rw-r--r--indra/media_plugins/quicktime/media_plugin_quicktime.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index c9ee1c8ac7..fb6d5b2905 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -420,7 +420,7 @@ private:
{
if ( mCommand == COMMAND_PLAY )
{
- if ( mStatus == STATUS_LOADED || mStatus == STATUS_PAUSED || mStatus == STATUS_PLAYING )
+ if ( mStatus == STATUS_LOADED || mStatus == STATUS_PAUSED || mStatus == STATUS_PLAYING || mStatus == STATUS_DONE )
{
long state = GetMovieLoadState( mMovieHandle );
@@ -446,7 +446,7 @@ private:
else
if ( mCommand == COMMAND_STOP )
{
- if ( mStatus == STATUS_PLAYING || mStatus == STATUS_PAUSED )
+ if ( mStatus == STATUS_PLAYING || mStatus == STATUS_PAUSED || mStatus == STATUS_DONE )
{
if ( GetMovieLoadState( mMovieHandle ) >= kMovieLoadStatePlaythroughOK )
{
@@ -547,12 +547,12 @@ private:
// see if title arrived and if so, update member variable with contents
checkTitle();
-
- // special code for looping - need to rewind at the end of the movie
- if ( mIsLooping )
+
+ // QT call to see if we are at the end - can't do with controller
+ if ( IsMovieDone( mMovieHandle ) )
{
- // QT call to see if we are at the end - can't do with controller
- if ( IsMovieDone( mMovieHandle ) )
+ // special code for looping - need to rewind at the end of the movie
+ if ( mIsLooping )
{
// go back to start
rewind();
@@ -565,8 +565,16 @@ private:
// set the volume
MCDoAction( mMovieController, mcActionSetVolume, (void*)mCurVolume );
};
- };
- };
+ }
+ else
+ {
+ if(mStatus == STATUS_PLAYING)
+ {
+ setStatus(STATUS_DONE);
+ }
+ }
+ }
+
};
int getDataWidth() const