aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
authorSven Hesse2011-01-23 15:33:30 +0000
committerSven Hesse2011-01-23 15:33:30 +0000
commitccd5129588cd78eb4234c8c3d2b2770a5d19cf40 (patch)
tree35e1a61b0af89f852317426174857951a104a235 /engines/gob/videoplayer.cpp
parent806defa98e2a92129f709246de00e46447bf8ced (diff)
downloadscummvm-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/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp13
1 files changed, 13 insertions, 0 deletions
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)