[Scummvm-cvs-logs] SF.net SVN: scummvm:[55466] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Jan 23 16:33:30 CET 2011


Revision: 55466
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55466&view=rev
Author:   drmccoy
Date:     2011-01-23 15:33:30 +0000 (Sun, 23 Jan 2011)

Log Message:
-----------
GOB: Pass engine pause to the VideoPlayer and decoders

Entering the GMM or the debug console during a video will not
mess up audio/video sync anymore.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/gob.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/engines/gob/videoplayer.h

Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp	2011-01-23 15:07:46 UTC (rev 55465)
+++ scummvm/trunk/engines/gob/gob.cpp	2011-01-23 15:33:30 UTC (rev 55466)
@@ -373,6 +373,7 @@
 			_inter->_soundEndTimeKey += duration;
 	}
 
+	_vidPlayer->pauseAll(pause);
 	_mixer->pauseAll(pause);
 }
 

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-23 15:07:46 UTC (rev 55465)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-23 15:33:30 UTC (rev 55466)
@@ -238,6 +238,19 @@
 		closeVideo(i);
 }
 
+void VideoPlayer::pauseVideo(int slot, bool pause) {
+	Video *video = getVideoBySlot(slot);
+	if (!video || !video->decoder)
+		return;
+
+	video->decoder->pauseVideo(pause);
+}
+
+void VideoPlayer::pauseAll(bool pause) {
+	for (int i = 0; i < kVideoSlotCount; i++)
+		pauseVideo(i, pause);
+}
+
 bool VideoPlayer::play(int slot, Properties &properties) {
 	Video *video = getVideoBySlot(slot);
 	if (!video)

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2011-01-23 15:07:46 UTC (rev 55465)
+++ scummvm/trunk/engines/gob/videoplayer.h	2011-01-23 15:33:30 UTC (rev 55466)
@@ -113,6 +113,9 @@
 	void closeLiveSound();
 	void closeAll();
 
+	void pauseVideo(int slot, bool pause);
+	void pauseAll(bool pause);
+
 	bool play(int slot, Properties &properties);
 	void waitEndFrame(int slot, bool onlySound = false);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list