ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <smush_decoder.h>

Inheritance diagram for Grim::SmushDecoder:
Collaboration diagram for Grim::SmushDecoder:

List of all members.

Classes

struct  Frame
class  SmushAudioTrack
class  SmushVideoTrack

Public Member Functions

 SmushDecoder ()
 ~SmushDecoder ()
int getX () const
int getY () const
void setLooping (bool l)
bool isRewindable () const override
 Returns if a video is rewindable or not.
bool isSeekable () const override
 Returns if a video is seekable or not.
bool rewind () override
 Rewind a video to its beginning.
bool seekIntern (const Audio::Timestamp &time) override
 The internal seek function that does the actual seeking.
bool loadStream (Common::SeekableReadStream *stream) override
 Load a video from a generic read stream.

Protected Member Functions

bool readHeader ()
void handleFrameDemo ()
void handleFrame ()
bool handleFramesHeader ()
void handleFRME (Common::SeekableReadStream *stream, uint32 size)
void init ()
void close () override
 Close the active video stream and free any associated resources.
const Graphics::SurfacedecodeNextFrame () override
 Decode the next frame into a surface and return the latter.

Private Member Functions

void initFrames ()

Private Attributes

SmushAudioTrack_audioTrack
SmushVideoTrack_videoTrack
Common::SeekableReadStream_file
uint32 _startPos
bool _videoPause
bool _videoLooping
Frame_frames

Static Private Attributes

static bool _demo = false

Detailed Description

Definition at line 42 of file smush_decoder.h.


Constructor & Destructor Documentation

Grim::SmushDecoder::SmushDecoder (  ) 

Definition at line 53 of file smush_decoder.cpp.

Grim::SmushDecoder::~SmushDecoder (  ) 

Definition at line 65 of file smush_decoder.cpp.


Member Function Documentation

void Grim::SmushDecoder::close (  )  [override, protected, virtual]

Close the active video stream and free any associated resources.

All subclasses that need to close their own resources should still call the base class' close() function at the start of their function.

Reimplemented from Video::VideoDecoder.

Definition at line 121 of file smush_decoder.cpp.

const Graphics::Surface * Grim::SmushDecoder::decodeNextFrame (  )  [override, protected, virtual]

Decode the next frame into a surface and return the latter.

A subclass may override this, but must still call this function. As an example, a subclass may do this to apply some global video scale to individual track's frame.

Note that this will call readNextPacket() internally first before calling the next video track's decodeNextFrame() function.

Returns:
a surface containing the decoded frame, or 0
Note:
Ownership of the returned surface stays with the VideoDecoder, hence the caller must *not* free it.
this may return 0, in which case the last frame should be kept on screen

Reimplemented from Video::VideoDecoder.

Definition at line 270 of file smush_decoder.cpp.

int Grim::SmushDecoder::getX (  )  const [inline]

Definition at line 47 of file smush_decoder.h.

int Grim::SmushDecoder::getY (  )  const [inline]

Definition at line 48 of file smush_decoder.h.

void Grim::SmushDecoder::handleFrame (  )  [protected]

Definition at line 288 of file smush_decoder.cpp.

void Grim::SmushDecoder::handleFrameDemo (  )  [protected]
bool Grim::SmushDecoder::handleFramesHeader (  )  [protected]

Definition at line 220 of file smush_decoder.cpp.

void Grim::SmushDecoder::handleFRME ( Common::SeekableReadStream stream,
uint32  size 
) [protected]

Definition at line 340 of file smush_decoder.cpp.

void Grim::SmushDecoder::init (  )  [protected]

Definition at line 71 of file smush_decoder.cpp.

void Grim::SmushDecoder::initFrames (  )  [private]

Definition at line 76 of file smush_decoder.cpp.

bool Grim::SmushDecoder::isRewindable (  )  const [inline, override, virtual]

Returns if a video is rewindable or not.

The default implementation polls each track for rewindability.

Reimplemented from Video::VideoDecoder.

Definition at line 50 of file smush_decoder.h.

bool Grim::SmushDecoder::isSeekable (  )  const [inline, override, virtual]

Returns if a video is seekable or not.

The default implementation polls each track for seekability.

Reimplemented from Video::VideoDecoder.

Definition at line 51 of file smush_decoder.h.

bool Grim::SmushDecoder::loadStream ( Common::SeekableReadStream stream  )  [override, virtual]

Load a video from a generic read stream.

The ownership of the stream object transfers to this VideoDecoder instance, which is hence also responsible for eventually deleting it.

Implementations of this function are required to call addTrack() for each track in the video upon success.

Parameters:
stream the stream to load
Returns:
whether loading the stream succeeded

Implements Video::VideoDecoder.

Definition at line 253 of file smush_decoder.cpp.

bool Grim::SmushDecoder::readHeader (  )  [protected]

Definition at line 136 of file smush_decoder.cpp.

bool Grim::SmushDecoder::rewind (  )  [override, virtual]

Rewind a video to its beginning.

If the video is playing, it will continue to play. The default implementation will rewind each track.

Returns:
true on success, false otherwise

Reimplemented from Video::VideoDecoder.

Definition at line 380 of file smush_decoder.cpp.

bool Grim::SmushDecoder::seekIntern ( const Audio::Timestamp time  )  [override, virtual]

The internal seek function that does the actual seeking.

See also:
seek()
Returns:
true on success, false otherwise

Reimplemented from Video::VideoDecoder.

Definition at line 384 of file smush_decoder.cpp.

void Grim::SmushDecoder::setLooping ( bool  l  ) 

Definition at line 280 of file smush_decoder.cpp.


Member Data Documentation

Definition at line 134 of file smush_decoder.h.

bool Grim::SmushDecoder::_demo = false [static, private]

Definition at line 149 of file smush_decoder.h.

Definition at line 148 of file smush_decoder.h.

Definition at line 139 of file smush_decoder.h.

Definition at line 142 of file smush_decoder.h.

Definition at line 141 of file smush_decoder.h.

Definition at line 135 of file smush_decoder.h.


The documentation for this class was generated from the following files:


Generated on Sat Sep 14 2019 05:04:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge