xoreos  0.0.5
actimagine.cpp
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #include <cassert>
26 
27 #include "src/common/error.h"
28 #include "src/common/readstream.h"
29 #include "src/common/strutil.h"
30 
31 #include "src/video/actimagine.h"
32 
33 namespace Video {
34 
36  assert(_vx);
37 
38  load();
39 }
40 
42 }
43 
45  throw Common::Exception("STUB: ActimagineDecoder::decodeNextTrackFrame()");
46 }
47 
49  uint32 tag = _vx->readUint32BE();
50  if (tag != MKTAG('V', 'X', 'D', 'S'))
51  throw Common::Exception("Not a valid Actimagine video (%s)", Common::debugTag(tag).c_str());
52 
53  _vx->readUint32LE(); // header size?
54  _vx->readUint32LE(); // version? (0x100)
55  _vx->readUint32LE(); // unknown
56  _vx->readUint32LE(); // unknown
57  _vx->readUint32LE(); // unknown
58  uint32 sampleRate = _vx->readUint32LE(); // Oh yeah! I'm good at this!
59 
60  throw Common::Exception("STUB: ActimagineDecoder::load(): Sample rate = %d", sampleRate);
61 }
62 
63 
64 } // End of namespace Video
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like &#39;DATA&#39;, to ensure portability.
Definition: endianness.h:140
Decoding Actimagine videos.
Utility templates and functions for working with strings and streams.
Basic exceptions to throw.
#define UNUSED(x)
Definition: system.h:170
StackException Exception
Definition: error.h:59
An abstract representation of a video track.
Definition: decoder.h:226
Common::ScopedPtr< Common::SeekableReadStream > _vx
Definition: actimagine.h:49
Basic reading stream interfaces.
ActimagineDecoder(Common::SeekableReadStream *vx)
Definition: actimagine.cpp:35
uint32_t uint32
Definition: types.h:204
UString debugTag(uint32 tag, bool trim)
Create an elaborate string from an integer tag, for debugging purposes.
Definition: strutil.cpp:117
void load()
Load an Actimagine file.
Definition: actimagine.cpp:48
void decodeNextTrackFrame(VideoTrack &track)
Decode enough data for the next frame.
Definition: actimagine.cpp:44
Interface for a seekable & readable data stream.
Definition: readstream.h:265