[Scummvm-cvs-logs] SF.net SVN: scummvm:[51870] scummvm/trunk/graphics/video
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Aug 8 02:44:05 CEST 2010
Revision: 51870
http://scummvm.svn.sourceforge.net/scummvm/?rev=51870&view=rev
Author: drmccoy
Date: 2010-08-08 00:44:05 +0000 (Sun, 08 Aug 2010)
Log Message:
-----------
VIDEO/GOB: Fixing the frame rate for mult'd videos.
In the gob engine, some videos are opened, and then played, at
a later time, one frame at a time. In this case, we need to
emulate the original's video player's behaviour, not calculating
any "lag" for videos without sound.
Modified Paths:
--------------
scummvm/trunk/graphics/video/coktel_decoder.cpp
scummvm/trunk/graphics/video/coktel_decoder.h
Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp 2010-08-08 00:43:45 UTC (rev 51869)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp 2010-08-08 00:44:05 UTC (rev 51870)
@@ -439,6 +439,13 @@
return _frameRate;
}
+uint32 CoktelDecoder::getTimeToNextFrame() const {
+ if (hasSound())
+ return FixedRateVideoDecoder::getTimeToNextFrame();
+
+ return (Common::Rational(1000) / _frameRate).toInt();
+}
+
inline void CoktelDecoder::unsignedToSigned(byte *buffer, int length) {
while (length-- > 0) *buffer++ ^= 0x80;
}
Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h 2010-08-08 00:43:45 UTC (rev 51869)
+++ scummvm/trunk/graphics/video/coktel_decoder.h 2010-08-08 00:44:05 UTC (rev 51870)
@@ -174,6 +174,8 @@
public:
// FixedRateVideoDecoder interface
Common::Rational getFrameRate() const;
+
+ uint32 getTimeToNextFrame() const;
};
class PreIMDDecoder : public CoktelDecoder {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list