diff options
author | Paul Gilbert | 2016-07-12 08:38:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-17 13:09:24 -0400 |
commit | 513723c82d5db078236421577924bd9cde29b99b (patch) | |
tree | 611f1a89a16ec26dfe04d7a5169549436f9d61f3 /engines/titanic/support/avi_surface.h | |
parent | c458c3c9b740602002cd0a130a99af8b10402806 (diff) | |
download | scummvm-rg350-513723c82d5db078236421577924bd9cde29b99b.tar.gz scummvm-rg350-513723c82d5db078236421577924bd9cde29b99b.tar.bz2 scummvm-rg350-513723c82d5db078236421577924bd9cde29b99b.zip |
TITANIC: Making the AVISurface frameInfo a video surface
Diffstat (limited to 'engines/titanic/support/avi_surface.h')
-rw-r--r-- | engines/titanic/support/avi_surface.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h index f3722ca513..62fc5172c9 100644 --- a/engines/titanic/support/avi_surface.h +++ b/engines/titanic/support/avi_surface.h @@ -37,22 +37,35 @@ enum MovieFlag { MOVIE_REVERSE = 8, MOVIE_GAMESTATE = 0x10 }; +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) {} + + Video::AVIDecoder::AVIVideoTrack &getVideoTrack(); +}; + class AVISurface { private: - Video::AVIDecoder *_decoders[2]; + AVIDecoder *_decoders[2]; CVideoSurface *_videoSurface; - int _field4; - int _field8; int _currentPos; int _priorFrame; CMovieRangeInfoList _movieRangeInfo; int _streamCount; - void *_frameInfo; + CVideoSurface *_movieFrameSurface[2]; private: /** * Render a frame to the video surface */ bool renderFrame(); + + /** + * Sets up for video decompression + */ + void setupDecompressor(); protected: /** * Change the frame with ??? checking @@ -132,9 +145,10 @@ public: */ void setFrameRate(double rate); - const void *getFrameInfo() const { - return _streamCount <= 1 ? nullptr : _frameInfo; - } + /** + * Returns the surface for the secondary video track frame, if present + */ + CVideoSurface *getSecondarySurface(); /** * Get a reference to the movie range info list @@ -144,9 +158,9 @@ public: } /** - * Duplicate the frame info + * Duplicates the secondary frame, if the movie has a second video track */ - void *duplicateFrameInfo() const; + CVideoSurface *duplicateSecondaryFrame() const; }; } // End of namespace Titanic |