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

Decoder for PSX stream videos. More...

#include <psx_decoder.h>

Inheritance diagram for Video::PSXStreamDecoder:
Collaboration diagram for Video::PSXStreamDecoder:

List of all members.

Classes

class  PSXAudioTrack
class  PSXVideoTrack

Public Types

enum  CDSpeed { kCD1x = 75, kCD2x = 150 }

Public Member Functions

 PSXStreamDecoder (CDSpeed speed, uint32 frameCount=0)
virtual ~PSXStreamDecoder ()
bool loadStream (Common::SeekableReadStream *stream)
 Load a video from a generic read stream.
void close ()
 Close the active video stream and free any associated resources.

Protected Member Functions

void readNextPacket ()
 Decode enough data for the next frame and enough audio to last that long.
bool useAudioSync () const
 Whether or not getTime() will sync with a playing audio track.

Private Member Functions

Common::SeekableReadStreamreadSector ()

Private Attributes

CDSpeed _speed
uint32 _frameCount
Common::SeekableReadStream_stream
PSXVideoTrack_videoTrack
PSXAudioTrack_audioTrack

Detailed Description

Decoder for PSX stream videos.

This currently implements the most basic PSX stream format that is used by most games on the system. Special variants are not supported at this time.

Video decoder used in engines:

  • sword1 (psx)
  • sword2 (psx)

Definition at line 59 of file psx_decoder.h.


Member Enumeration Documentation

Enumerator:
kCD1x 
kCD2x 

Definition at line 63 of file psx_decoder.h.


Constructor & Destructor Documentation

Video::PSXStreamDecoder::PSXStreamDecoder ( CDSpeed  speed,
uint32  frameCount = 0 
)

Definition at line 150 of file psx_decoder.cpp.

Video::PSXStreamDecoder::~PSXStreamDecoder (  )  [virtual]

Definition at line 156 of file psx_decoder.cpp.


Member Function Documentation

void Video::PSXStreamDecoder::close (  )  [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 176 of file psx_decoder.cpp.

bool Video::PSXStreamDecoder::loadStream ( Common::SeekableReadStream stream  )  [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 167 of file psx_decoder.cpp.

void Video::PSXStreamDecoder::readNextPacket (  )  [protected, virtual]

Decode enough data for the next frame and enough audio to last that long.

This function is used by this class' decodeNextFrame() function. A subclass of a Track may decide to just have its decodeNextFrame() function read and decode the frame, but only if it is the only track in the video.

Reimplemented from Video::VideoDecoder.

Definition at line 189 of file psx_decoder.cpp.

Common::SeekableReadStream * Video::PSXStreamDecoder::readSector (  )  [private]

Definition at line 285 of file psx_decoder.cpp.

bool Video::PSXStreamDecoder::useAudioSync (  )  const [protected, virtual]

Whether or not getTime() will sync with a playing audio track.

A subclass can override this to disable this feature.

Reimplemented from Video::VideoDecoder.

Definition at line 277 of file psx_decoder.cpp.


Member Data Documentation

Definition at line 154 of file psx_decoder.h.

Definition at line 151 of file psx_decoder.h.

Definition at line 150 of file psx_decoder.h.

Definition at line 153 of file psx_decoder.h.


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


Generated on Sat May 18 2019 05:07:41 for ResidualVM by doxygen 1.7.1
curved edge   curved edge