aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-02 08:20:10 -0400
committerPaul Gilbert2016-10-02 08:20:10 -0400
commit28b2609b927a889b3e3b17da76ab99f642ac72f0 (patch)
treed5e9fb6e032b4e0bc1959cdb1da05350ef350e98 /engines/titanic/support
parent90ec4f6ac52fc104f08e796f907f44f6fdde2122 (diff)
downloadscummvm-rg350-28b2609b927a889b3e3b17da76ab99f642ac72f0.tar.gz
scummvm-rg350-28b2609b927a889b3e3b17da76ab99f642ac72f0.tar.bz2
scummvm-rg350-28b2609b927a889b3e3b17da76ab99f642ac72f0.zip
TITANIC: Remove track select logic from AVIDecoder
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/avi_surface.cpp23
-rw-r--r--engines/titanic/support/avi_surface.h8
2 files changed, 8 insertions, 23 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 7fbb05ed58..7d9c681f39 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -38,22 +38,6 @@ Video::AVIDecoder::AVIVideoTrack &AVIDecoder::getVideoTrack() {
error("Could not find video track");
}
-/**
- * Track filter for AVIDecoder that filters out any secondary
- * video track some videos have to hold transparency masks
- */
-static bool primaryTrackSelect(bool isVideo, int trackCounter) {
- return !isVideo || trackCounter == 0;
-}
-
-/**
- * Track filter for AVIDecoder that only accepts the secondary
- * transparency msak video track for a video, if present
- */
-static bool secondaryTrackSelect(bool isVideo, int trackCounter) {
- return isVideo && trackCounter > 0;
-}
-
AVISurface::AVISurface(const CResourceKey &key) {
_videoSurface = nullptr;
_streamCount = 0;
@@ -66,13 +50,13 @@ AVISurface::AVISurface(const CResourceKey &key) {
_currentFrame = -1;
_isReversed = false;
- // Create a decoder for the audio (if any) and primary video track
- _decoders[0] = new AVIDecoder(Audio::Mixer::kPlainSoundType, primaryTrackSelect);
+ // Create a decoder
+ _decoders[0] = new AVIDecoder(Audio::Mixer::kPlainSoundType);
if (!_decoders[0]->loadFile(key.getString()))
error("Could not open video - %s", key.getString().c_str());
_streamCount = 1;
-
+/*
// Create a decoder for any secondary video track
AVIDecoder *decoder2 = new AVIDecoder(Audio::Mixer::kPlainSoundType, secondaryTrackSelect);
if (decoder2->loadFile(key.getString())) {
@@ -82,6 +66,7 @@ AVISurface::AVISurface(const CResourceKey &key) {
delete decoder2;
_decoders[1] = nullptr;
}
+ */
}
AVISurface::~AVISurface() {
diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h
index c0cf0af60c..ae9ee316c9 100644
--- a/engines/titanic/support/avi_surface.h
+++ b/engines/titanic/support/avi_surface.h
@@ -40,10 +40,10 @@ enum MovieFlag {
class AVIDecoder : public Video::AVIDecoder {
public:
- AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType, SelectTrackFn trackFn = nullptr) :
- Video::AVIDecoder(soundType, trackFn) {}
- AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType,
- SelectTrackFn trackFn = nullptr) : Video::AVIDecoder(frameRateOverride, soundType, trackFn) {}
+ AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType) :
+ Video::AVIDecoder(soundType) {}
+ AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType) :
+ Video::AVIDecoder(frameRateOverride, soundType) {}
Video::AVIDecoder::AVIVideoTrack &getVideoTrack();
};