aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-03-30 13:38:21 -0400
committerMatthew Hoops2012-03-30 13:39:49 -0400
commite9f8d0e1a299fb23195648bdc9f455e1cebf1769 (patch)
tree61fce1913f5e22305d46c40aa3e45cbcad5ddf89
parent7c4787e0dcef994999185faf594faf748d5f2ad8 (diff)
downloadscummvm-rg350-e9f8d0e1a299fb23195648bdc9f455e1cebf1769.tar.gz
scummvm-rg350-e9f8d0e1a299fb23195648bdc9f455e1cebf1769.tar.bz2
scummvm-rg350-e9f8d0e1a299fb23195648bdc9f455e1cebf1769.zip
COMMON: Clean up the QuickTime class a bit
-rw-r--r--common/quicktime.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/common/quicktime.h b/common/quicktime.h
index 12d79beb7b..974502d075 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);