diff options
author | Matthew Hoops | 2012-07-22 14:13:20 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-07-22 14:13:20 -0400 |
commit | 0f0c6f935443212d76422959d040b87fc78d02c7 (patch) | |
tree | 1b3d73762e746e4e957a1b4a0e2ad789946c059c /engines | |
parent | 7654b2036268bb56f3b08b88858f2a9e4862b056 (diff) | |
download | scummvm-rg350-0f0c6f935443212d76422959d040b87fc78d02c7.tar.gz scummvm-rg350-0f0c6f935443212d76422959d040b87fc78d02c7.tar.bz2 scummvm-rg350-0f0c6f935443212d76422959d040b87fc78d02c7.zip |
VIDEO: Rewrite the AVI code to use AdvancedVideoDecoder
In addition to using the new API, it should theoretically support multiple audio and video tracks now but that has not been tested.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/console.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 2a4ad1743d..a6a6d4496f 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -259,10 +259,12 @@ void Console::postEnter() { videoDecoder = new RobotDecoder(g_system->getMixer(), _engine->getPlatform() == Common::kPlatformMacintosh); } else if (_videoFile.hasSuffix(".duk")) { duckMode = true; - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); #endif } else if (_videoFile.hasSuffix(".avi")) { - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } else { warning("Unrecognized video type"); } diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index bfe32a8d82..2c1532cc46 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -191,7 +191,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 0: { Common::String filename = s->_segMan->getString(argv[1]); - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); if (filename.equalsIgnoreCase("gk2a.avi")) { // HACK: Switch to 16bpp graphics for Indeo3. @@ -212,6 +212,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { videoDecoder = 0; } else { s->_videoState.fileName = filename; + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } break; } @@ -407,13 +408,15 @@ reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) { s->_videoState.reset(); s->_videoState.fileName = Common::String::format("%d.duk", argv[1].toUint16()); - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); if (!videoDecoder->loadFile(s->_videoState.fileName)) { warning("Could not open Duck %s", s->_videoState.fileName.c_str()); break; } + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + if (reshowCursor) g_sci->_gfxCursor->kernelHide(); |