[Scummvm-cvs-logs] scummvm master -> e9f8d0e1a299fb23195648bdc9f455e1cebf1769

clone2727 clone2727 at gmail.com
Fri Mar 30 19:42:50 CEST 2012


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

Summary:
7c4787e0dc COMMON: Read in QuickTime extra data for SVQ3
e9f8d0e1a2 COMMON: Clean up the QuickTime class a bit


Commit: 7c4787e0dcef994999185faf594faf748d5f2ad8
    https://github.com/scummvm/scummvm/commit/7c4787e0dcef994999185faf594faf748d5f2ad8
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-03-30T10:39:48-07:00

Commit Message:
COMMON: Read in QuickTime extra data for SVQ3

Changed paths:
    common/quicktime.cpp
    common/quicktime.h



diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index fb01e8d..ae009da 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -164,6 +164,7 @@ void QuickTimeParser::initParseTable() {
 		{ &QuickTimeParser::readCMOV,    MKTAG('c', 'm', 'o', 'v') },
 		{ &QuickTimeParser::readWAVE,    MKTAG('w', 'a', 'v', 'e') },
 		{ &QuickTimeParser::readESDS,    MKTAG('e', 's', 'd', 's') },
+		{ &QuickTimeParser::readSMI,     MKTAG('S', 'M', 'I', ' ') },
 		{ 0, 0 }
 	};
 
@@ -761,6 +762,18 @@ int QuickTimeParser::readESDS(Atom atom) {
 	return 0;
 }
 
+int QuickTimeParser::readSMI(Atom atom) {
+	if (_tracks.empty())
+		return 0;
+
+	Track *track = _tracks.back();
+
+	// This atom just contains SVQ3 extra data
+	track->extraData = _fd->readStream(atom.size);
+
+	return 0;
+}
+
 void QuickTimeParser::close() {
 	for (uint32 i = 0; i < _tracks.size(); i++)
 		delete _tracks[i];
diff --git a/common/quicktime.h b/common/quicktime.h
index efd2adb..12d79be 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -205,6 +205,7 @@ protected:
 	int readCMOV(Atom atom);
 	int readWAVE(Atom atom);
 	int readESDS(Atom atom);
+	int readSMI(Atom atom);
 };
 
 } // End of namespace Common


Commit: e9f8d0e1a299fb23195648bdc9f455e1cebf1769
    https://github.com/scummvm/scummvm/commit/e9f8d0e1a299fb23195648bdc9f455e1cebf1769
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-03-30T10:39:49-07:00

Commit Message:
COMMON: Clean up the QuickTime class a bit

Changed paths:
    common/quicktime.h



diff --git a/common/quicktime.h b/common/quicktime.h
index 12d79be..974502d 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -77,25 +77,13 @@ public:
 	 */
 	void setChunkBeginOffset(uint32 offset) { _beginOffset = offset; }
 
+	/** Find out if this parser has an open file handle */
 	bool isOpen() const { return _fd != 0; }
 
 protected:
 	// This is the file handle from which data is read from. It can be the actual file handle or a decompressed stream.
 	SeekableReadStream *_fd;
 
-	DisposeAfterUse::Flag _disposeFileHandle;
-
-	struct Atom {
-		uint32 type;
-		uint32 offset;
-		uint32 size;
-	};
-
-	struct ParseTable {
-		int (QuickTimeParser::*func)(Atom atom);
-		uint32 type;
-	};
-
 	struct TimeToSampleEntry {
 		int count;
 		int duration;
@@ -174,18 +162,33 @@ protected:
 
 	virtual SampleDesc *readSampleDesc(Track *track, uint32 format) = 0;
 
-	const ParseTable *_parseTable;
-	bool _foundMOOV;
 	uint32 _timeScale;
 	uint32 _duration;
 	Rational _scaleFactorX;
 	Rational _scaleFactorY;
 	Array<Track *> _tracks;
+	
+	void init();
+
+private:
+	struct Atom {
+		uint32 type;
+		uint32 offset;
+		uint32 size;
+	};
+
+	struct ParseTable {
+		int (QuickTimeParser::*func)(Atom atom);
+		uint32 type;
+	};
+
+	DisposeAfterUse::Flag _disposeFileHandle;
+	const ParseTable *_parseTable;
 	uint32 _beginOffset;
 	MacResManager *_resFork;
+	bool _foundMOOV;
 
 	void initParseTable();
-	void init();
 
 	int readDefault(Atom atom);
 	int readLeaf(Atom atom);






More information about the Scummvm-git-logs mailing list