aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-02 18:40:49 -0400
committerMatthew Hoops2011-06-02 23:44:40 -0400
commit2e066816983935b8e365fc555f953bdce9f64e46 (patch)
tree08760ac1ed5e7d1754792d8353e0fff19704f42d /common
parent717248e1625bc42fc7f777ca9d3029f6ef8978e6 (diff)
downloadscummvm-rg350-2e066816983935b8e365fc555f953bdce9f64e46.tar.gz
scummvm-rg350-2e066816983935b8e365fc555f953bdce9f64e46.tar.bz2
scummvm-rg350-2e066816983935b8e365fc555f953bdce9f64e46.zip
COMMON: Begin objectifying QuickTimeParser::SampleDesc further
This is preparation for multiple video and audio tracks
Diffstat (limited to 'common')
-rw-r--r--common/quicktime.cpp8
-rw-r--r--common/quicktime.h14
2 files changed, 14 insertions, 8 deletions
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index cf50584cc6..606e1bb9e6 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -686,7 +686,7 @@ int QuickTimeParser::readWAVE(MOVatom atom) {
if (atom.size > (1 << 30))
return -1;
- if (st->sampleDescs[0]->codecTag == MKTAG('Q', 'D', 'M', '2')) // Read extradata for QDM2
+ if (st->sampleDescs[0]->getCodecTag() == MKTAG('Q', 'D', 'M', '2')) // Read extradata for QDM2
st->extradata = _fd->readStream(atom.size - 8);
else if (atom.size > 8)
return readDefault(atom);
@@ -773,9 +773,9 @@ void QuickTimeParser::close() {
_fd = 0;
}
-QuickTimeParser::SampleDesc::SampleDesc() {
- codecTag = 0;
- bitsPerSample = 0;
+QuickTimeParser::SampleDesc::SampleDesc(MOVStreamContext *parentStream, uint32 codecTag) {
+ _parentStream = parentStream;
+ _codecTag = codecTag;
}
QuickTimeParser::MOVStreamContext::MOVStreamContext() {
diff --git a/common/quicktime.h b/common/quicktime.h
index a5903bc0f6..2bd461e389 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -116,12 +116,18 @@ protected:
Common::Rational mediaRate;
};
- struct SampleDesc {
- SampleDesc();
+ struct MOVStreamContext;
+
+ class SampleDesc {
+ public:
+ SampleDesc(MOVStreamContext *parentStream, uint32 codecTag);
virtual ~SampleDesc() {}
- uint32 codecTag;
- uint16 bitsPerSample;
+ uint32 getCodecTag() const { return _codecTag; }
+
+ protected:
+ MOVStreamContext *_parentStream;
+ uint32 _codecTag;
};
enum CodecType {