[Scummvm-git-logs] scummvm master -> 1aff4a4cd3513e3fb80739da52a13ff3a61be113

sev- sev at scummvm.org
Wed Sep 23 22:26:30 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1aff4a4cd3 VIDEO: Added getter for getFrameRate() for BINK and SMK video streams.


Commit: 1aff4a4cd3513e3fb80739da52a13ff3a61be113
    https://github.com/scummvm/scummvm/commit/1aff4a4cd3513e3fb80739da52a13ff3a61be113
Author: Paweł Kołodziejski (aquadran at users.sourceforge.net)
Date: 2020-09-24T00:26:27+02:00

Commit Message:
VIDEO: Added getter for getFrameRate() for BINK and SMK video streams.

Changed paths:
    video/bink_decoder.cpp
    video/bink_decoder.h
    video/smk_decoder.cpp
    video/smk_decoder.h


diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 170fab6495..69cc88d750 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -332,6 +332,11 @@ BinkDecoder::BinkVideoTrack::~BinkVideoTrack() {
 	_surface.free();
 }
 
+Common::Rational BinkDecoder::getFrameRate() {
+	BinkVideoTrack *videoTrack = (BinkVideoTrack *)getTrack(0);
+
+	return videoTrack->getFrameRate();
+}
 void BinkDecoder::BinkVideoTrack::decodePacket(VideoFrame &frame) {
 	assert(frame.bits);
 
diff --git a/video/bink_decoder.h b/video/bink_decoder.h
index 11694314b7..686dca3db1 100644
--- a/video/bink_decoder.h
+++ b/video/bink_decoder.h
@@ -73,6 +73,8 @@ public:
 	bool loadStream(Common::SeekableReadStream *stream);
 	void close();
 
+	Common::Rational getFrameRate();
+
 protected:
 	void readNextPacket();
 	bool supportsAudioTrackSwitching() const { return true; }
@@ -155,7 +157,6 @@ private:
 		/** Decode a video packet. */
 		void decodePacket(VideoFrame &frame);
 
-	protected:
 		Common::Rational getFrameRate() const { return _frameRate; }
 
 	private:
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 8db845f09b..09e1eec49d 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -872,4 +872,10 @@ SmackerDecoder::SmackerVideoTrack *SmackerDecoder::createVideoTrack(uint32 width
 	return new SmackerVideoTrack(width, height, frameCount, frameRate, flags, signature);
 }
 
+Common::Rational SmackerDecoder::getFrameRate() const {
+	const SmackerVideoTrack *videoTrack = (const SmackerVideoTrack *)getTrack(0);
+
+	return videoTrack->getFrameRate();
+}
+
 } // End of namespace Video
diff --git a/video/smk_decoder.h b/video/smk_decoder.h
index d7a4459c85..60969da2ce 100644
--- a/video/smk_decoder.h
+++ b/video/smk_decoder.h
@@ -67,6 +67,8 @@ public:
 
 	bool rewind();
 
+	Common::Rational getFrameRate() const;
+
 protected:
 	void readNextPacket();
 	bool supportsAudioTrackSwitching() const { return true; }
@@ -96,9 +98,9 @@ protected:
 		void decodeFrame(Common::BitStreamMemory8LSB &bs);
 		void unpackPalette(Common::SeekableReadStream *stream);
 
-	protected:
 		Common::Rational getFrameRate() const { return _frameRate; }
 
+	protected:
 		Graphics::Surface *_surface;
 
 	private:




More information about the Scummvm-git-logs mailing list