| xoreos
    0.0.5
    | 
A decoder for Microsoft Xbox XMV videos. More...
#include <xmv.h>


| Classes | |
| struct | AudioInfo | 
| An audio track's information.  More... | |
| struct | Packet | 
| An XMV packet.  More... | |
| struct | PacketAudio | 
| An audio packet.  More... | |
| struct | PacketVideo | 
| A video packet.  More... | |
| class | XMVAudioTrack | 
| An XMV audio track.  More... | |
| class | XMVAudioTrack51 | 
| An XMV 5.1 audio track.  More... | |
| class | XMVVideoTrack | 
| Public Member Functions | |
| XboxMediaVideo (Common::SeekableReadStream *xmv) | |
| ~XboxMediaVideo () | |
|  Public Member Functions inherited from Video::VideoDecoder | |
| VideoDecoder () | |
| ~VideoDecoder () | |
| void | setScale (Scale scale) | 
| bool | isPlaying () const | 
| Is the video currently playing?  More... | |
| virtual uint32 | getWidth () const | 
| Returns the width of the video's frames.  More... | |
| virtual uint32 | getHeight () const | 
| Returns the height of the video's frames.  More... | |
| void | start () | 
| Start playing the video.  More... | |
| void | abort () | 
| Abort the playing of the video.  More... | |
| bool | needsUpdate () const | 
| Check whether a new frame should be decoded, i.e.  More... | |
| bool | endOfVideo () const | 
| Returns if the video has reached the end or not.  More... | |
| bool | endOfVideoTracks () const | 
| Have all video tracks finished?  More... | |
| uint32 | getTime () const | 
| Returns the time position (in ms) of the current video.  More... | |
| uint32 | getTimeToNextFrame () const | 
| Return the time, in milliseconds, to the next frame.  More... | |
| void | calculateDistance () | 
| Calculate the object's distance.  More... | |
| void | render (Graphics::RenderPass pass) | 
| Render the object.  More... | |
| virtual Common::Timestamp | getDuration () const | 
| Get the duration of the video.  More... | |
| void | pauseVideo (bool pause) | 
| Pause or resume the video.  More... | |
| bool | isPaused () const | 
| Return whether the video is currently paused or not.  More... | |
|  Public Member Functions inherited from Graphics::GLContainer | |
| GLContainer () | |
| ~GLContainer () | |
| void | rebuild () | 
| void | destroy () | 
|  Public Member Functions inherited from Graphics::Queueable | |
| Queueable () | |
| virtual | ~Queueable () | 
|  Public Member Functions inherited from Graphics::Renderable | |
| Renderable (RenderableType type) | |
| ~Renderable () | |
| bool | operator< (const Queueable &q) const | 
| virtual void | advanceTime (float dt) | 
| Advance time (used by renderables with animations).  More... | |
| virtual void | renderImmediate (const glm::mat4 &parentTransform) | 
| For shader based systems, don't sort anything, render this right_now.  More... | |
| virtual void | queueRender (const glm::mat4 &parentTransform) | 
| Queue the object for later rendering.  More... | |
| double | getDistance () const | 
| Get the distance of the object from the viewer.  More... | |
| uint32 | getID () const | 
| Get the object's unique ID.  More... | |
| bool | isClickable () const | 
| Is the object clickable?  More... | |
| void | setClickable (bool clickable) | 
| Set the object's clickable state.  More... | |
| const Common::UString & | getTag () const | 
| Get the object's tag.  More... | |
| void | setTag (const Common::UString &tag) | 
| Set the object's tag.  More... | |
| bool | isVisible () const | 
| Is the object visible?  More... | |
| virtual void | show () | 
| Show the object.  More... | |
| virtual void | hide () | 
| Hide the object.  More... | |
| virtual bool | isIn (float x, float y) const | 
| Is that point within the object?  More... | |
| virtual bool | isIn (float x, float y, float z) const | 
| Is that point within the object?  More... | |
| virtual bool | isIn (float x1, float y1, float z1, float x2, float y2, float z2) const | 
| Does the line from x1.y1.z1 to x2.y2.z2 intersect with the object?  More... | |
| Protected Member Functions | |
| void | decodeNextTrackFrame (VideoTrack &track) | 
| Decode enough data for the next frame.  More... | |
|  Protected Member Functions inherited from Video::VideoDecoder | |
| void | initVideo () | 
| Create a surface for video of these dimensions.  More... | |
| void | deinit () | 
| void | doRebuild () | 
| void | doDestroy () | 
| virtual void | checkAudioBuffer (AudioTrack &track, const Common::Timestamp &endTime) | 
| Ensure that there is enough audio buffered in the given track to reach the given timestamp.  More... | |
| void | addTrack (Track *track, bool isExternal=false) | 
| Define a track to be used by this class.  More... | |
| TrackPtr | getTrack (uint track) | 
| Get the given internal track based on its index.  More... | |
| ConstTrackPtr | getTrack (uint track) const | 
| Get the given internal track based on its index.  More... | |
| VideoTrackPtr | findNextVideoTrack () | 
| Set _nextVideoTrack to the video track with the lowest start time for the next frame.  More... | |
| TrackList | getInternalTracks () | 
| Get a copy of the internal tracks.  More... | |
| ConstTrackList | getInternalTracks () const | 
| Get a copy of the internal tracks.  More... | |
|  Protected Member Functions inherited from Graphics::Queueable | |
| bool | isInQueue (QueueType queue) const | 
| void | addToQueue (QueueType queue) | 
| void | removeFromQueue (QueueType queue) | 
| void | lockQueue (QueueType queue) | 
| void | unlockQueue (QueueType queue) | 
| void | sortQueue (QueueType queue) | 
|  Protected Member Functions inherited from Graphics::Renderable | |
| void | resort () | 
| void | lockFrame () | 
| void | unlockFrame () | 
| void | lockFrameIfVisible () | 
| void | unlockFrameIfVisible () | 
| Private Member Functions | |
| void | load () | 
| Load an XMV file.  More... | |
| void | fetchNextPacket (Packet &packet) | 
| Fetch the next packet.  More... | |
| void | processPacketHeader (Packet &packet) | 
| Process a packet's header.  More... | |
| void | queueNewAudio (PacketAudio &audioPacket) | 
| Queue the data from this audio packet.  More... | |
| void | queueNewAudio (Packet &packet) | 
| Queue the data from all audio packets in this packet.  More... | |
| void | processNextFrame (PacketVideo &videoPacket) | 
| Process the next frame.  More... | |
| Private Attributes | |
| Common::ScopedPtr< Common::SeekableReadStream > | _xmv | 
| XMVVideoTrack * | _videoTrack | 
| The current video track.  More... | |
| uint32 | _audioTrackCount | 
| The audio track count.  More... | |
| Packet | _curPacket | 
| The current packet.  More... | |
| Additional Inherited Members | |
|  Public Types inherited from Video::VideoDecoder | |
| enum | Scale { kScaleNone, kScaleUp, kScaleDown, kScaleUpDown } | 
|  Protected Types inherited from Video::VideoDecoder | |
| typedef boost::shared_ptr< Track > | TrackPtr | 
| A Track pointer.  More... | |
| typedef boost::shared_ptr< const Track > | ConstTrackPtr | 
| A const Track pointer.  More... | |
| typedef boost::shared_ptr< AudioTrack > | AudioTrackPtr | 
| An AudioTrack pointer.  More... | |
| typedef boost::shared_ptr< VideoTrack > | VideoTrackPtr | 
| A VideoTrack pointer.  More... | |
| typedef std::vector< TrackPtr > | TrackList | 
| A list of tracks.  More... | |
| typedef std::vector< ConstTrackPtr > | ConstTrackList | 
| A list of const tracks.  More... | |
|  Protected Attributes inherited from Video::VideoDecoder | |
| bool | _needCopy | 
| Is new frame content available that needs to by copied?  More... | |
| Common::ScopedPtr< Graphics::Surface > | _surface | 
| The video's surface.  More... | |
|  Protected Attributes inherited from Graphics::Renderable | |
| QueueType | _queueExists | 
| QueueType | _queueVisible | 
| uint32 | _id | 
| bool | _clickable | 
| Common::UString | _tag | 
| double | _distance | 
| The distance of the object from the viewer.  More... | |
| Video::XboxMediaVideo::XboxMediaVideo | ( | Common::SeekableReadStream * | xmv | ) | 
| 
 | protectedvirtual | 
Decode enough data for the next frame.
Currently, audio may be buffered here at the same time. This is deprecated in favor of using checkAudioBuffer().
Implements Video::VideoDecoder.
Definition at line 328 of file xmv.cpp.
References _audioTrackCount, _curPacket, Video::XboxMediaVideo::Packet::audio, fetchNextPacket(), Video::XboxMediaVideo::PacketVideo::frameCount, processNextFrame(), queueNewAudio(), and Video::XboxMediaVideo::Packet::video.

| 
 | private | 
Fetch the next packet.
Definition at line 240 of file xmv.cpp.
References _audioTrackCount, _xmv, Video::XboxMediaVideo::Packet::nextPacketOffset, Video::XboxMediaVideo::Packet::nextPacketSize, processPacketHeader(), Video::XboxMediaVideo::Packet::thisPacketOffset, and Video::XboxMediaVideo::Packet::thisPacketSize.
Referenced by decodeNextTrackFrame(), and load().


| 
 | private | 
Load an XMV file.
Definition at line 125 of file xmv.cpp.
References _audioTrackCount, _curPacket, _videoTrack, _xmv, Video::VideoDecoder::addTrack(), Video::XboxMediaVideo::Packet::audio, Video::XboxMediaVideo::PacketVideo::currentFrameTimestamp, Common::debugTag(), fetchNextPacket(), Video::XboxMediaVideo::PacketVideo::frameCount, Video::VideoDecoder::initVideo(), kAudioFlagADPCM51, Video::XboxMediaVideo::PacketVideo::lastFrameTime, MKTAG, Video::XboxMediaVideo::Packet::nextPacketOffset, Video::XboxMediaVideo::Packet::nextPacketSize, queueNewAudio(), Common::PtrVector< T, Deallocator >::resize(), Video::XboxMediaVideo::Packet::thisPacketSize, Video::XboxMediaVideo::Packet::video, warning(), and Common::StackException::what().
Referenced by XboxMediaVideo().


| 
 | private | 
Process the next frame.
Definition at line 86 of file xmv.cpp.
References Video::VideoDecoder::_needCopy, Video::VideoDecoder::_surface, _videoTrack, _xmv, Video::XboxMediaVideo::PacketVideo::currentFrameSize, Video::XboxMediaVideo::PacketVideo::currentFrameTimestamp, Video::XboxMediaVideo::PacketVideo::dataOffset, Video::XboxMediaVideo::PacketVideo::dataSize, Video::XboxMediaVideo::XMVVideoTrack::decodeFrame(), Video::XboxMediaVideo::PacketVideo::frameCount, Common::ScopedPtrBase< T, Deallocator >::get(), Video::XboxMediaVideo::PacketVideo::lastFrameTime, and warning().
Referenced by decodeNextTrackFrame().


| 
 | private | 
Process a packet's header.
Definition at line 257 of file xmv.cpp.
References _audioTrackCount, _videoTrack, _xmv, Video::XboxMediaVideo::Packet::audio, Video::XboxMediaVideo::PacketVideo::dataOffset, Video::XboxMediaVideo::PacketVideo::dataSize, Video::XboxMediaVideo::PacketAudio::dataSize, Video::XboxMediaVideo::PacketVideo::frameCount, Common::ScopedPtrBase< T, Deallocator >::get(), Video::XboxMediaVideo::XMVVideoTrack::initCodec(), Video::XboxMediaVideo::PacketAudio::newSlice, Video::XboxMediaVideo::Packet::nextPacketSize, Video::XboxMediaVideo::Packet::video, and warning().
Referenced by fetchNextPacket().


| 
 | private | 
Queue the data from this audio packet.
Definition at line 64 of file xmv.cpp.
References _xmv, Video::XboxMediaVideo::PacketAudio::dataOffset, Video::XboxMediaVideo::PacketAudio::dataSize, Video::XboxMediaVideo::PacketAudio::newSlice, Video::XboxMediaVideo::XMVAudioTrack::queueAudio(), and Video::XboxMediaVideo::PacketAudio::track.
Referenced by decodeNextTrackFrame(), load(), and queueNewAudio().


| 
 | private | 
Queue the data from all audio packets in this packet.
Definition at line 78 of file xmv.cpp.
References Video::XboxMediaVideo::Packet::audio, and queueNewAudio().

| 
 | private | 
The audio track count.
Definition at line 178 of file xmv.h.
Referenced by decodeNextTrackFrame(), fetchNextPacket(), load(), and processPacketHeader().
| 
 | private | 
The current packet.
Definition at line 181 of file xmv.h.
Referenced by decodeNextTrackFrame(), and load().
| 
 | private | 
The current video track.
Definition at line 175 of file xmv.h.
Referenced by load(), processNextFrame(), and processPacketHeader().
| 
 | private | 
Definition at line 172 of file xmv.h.
Referenced by fetchNextPacket(), load(), processNextFrame(), processPacketHeader(), queueNewAudio(), and XboxMediaVideo().
 1.8.14
 1.8.14