diff options
author | Sven Hesse | 2011-01-23 15:33:30 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-23 15:33:30 +0000 |
commit | ccd5129588cd78eb4234c8c3d2b2770a5d19cf40 (patch) | |
tree | 35e1a61b0af89f852317426174857951a104a235 /engines | |
parent | 806defa98e2a92129f709246de00e46447bf8ced (diff) | |
download | scummvm-rg350-ccd5129588cd78eb4234c8c3d2b2770a5d19cf40.tar.gz scummvm-rg350-ccd5129588cd78eb4234c8c3d2b2770a5d19cf40.tar.bz2 scummvm-rg350-ccd5129588cd78eb4234c8c3d2b2770a5d19cf40.zip |
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.
svn-id: r55466
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/gob.cpp | 1 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 13 | ||||
-rw-r--r-- | engines/gob/videoplayer.h | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 8dfbf7df21..f2bec9b0f0 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -373,6 +373,7 @@ void GobEngine::pauseEngineIntern(bool pause) { _inter->_soundEndTimeKey += duration; } + _vidPlayer->pauseAll(pause); _mixer->pauseAll(pause); } diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index f279cb9744..b9eb42a2fe 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -238,6 +238,19 @@ void VideoPlayer::closeAll() { 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) diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index bae1fe3702..26c2c32a3c 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -113,6 +113,9 @@ public: 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); |