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

Decoder for Coktel videos. More...

#include <coktel_decoder.h>

Inheritance diagram for Video::CoktelDecoder:
Collaboration diagram for Video::CoktelDecoder:

List of all members.

Classes

struct  State

Public Member Functions

 CoktelDecoder (Audio::Mixer *mixer, Audio::Mixer::SoundType soundType=Audio::Mixer::kPlainSoundType)
virtual ~CoktelDecoder ()
virtual bool reloadStream (Common::SeekableReadStream *stream)=0
 Replace the current video stream with this identical one.
virtual bool seek (int32 frame, int whence=SEEK_SET, bool restart=false)=0
void setSurfaceMemory (void *mem, uint16 width, uint16 height, uint8 bpp)
 Draw directly onto the specified video memory.
void setSurfaceMemory ()
 Reset the video memory.
const Graphics::SurfacegetSurface () const
virtual void setXY (uint16 x, uint16 y)
 Draw the video starting at this position within the video memory.
void setXY ()
 Draw the video at the default position.
void setFrameRate (Common::Rational frameRate)
 Override the video's frame rate.
Common::Rational getFrameRate () const
 Get the video's frame rate.
uint16 getDefaultX () const
 Get the video's default X position.
uint16 getDefaultY () const
 Get the video's default Y position.
const Common::List
< Common::Rect > & 
getDirtyRects () const
 Return a list of rectangles that changed in the last frame.
bool hasPalette () const
virtual bool hasVideo () const
bool hasSound () const
bool isSoundEnabled () const
bool isSoundPlaying () const
void enableSound ()
void disableSound ()
void finishSound ()
virtual void colorModeChanged ()
virtual bool getFrameCoords (int16 frame, int16 &x, int16 &y, int16 &width, int16 &height)
 Return the coordinates of the specified frame.
virtual bool hasEmbeddedFiles () const
 Return whether that video has any embedded files.
virtual bool hasEmbeddedFile (const Common::String &fileName) const
 Return whether that embedded file exists.
virtual
Common::SeekableReadStream
getEmbeddedFile (const Common::String &fileName) const
 Return that embedded file.
virtual int32 getSubtitleIndex () const
 Return the current subtitle index.
virtual bool isPaletted () const
 Is the video paletted or true color?
int getCurFrame () const
 Get the current frame.
virtual const Graphics::SurfacedecodeNextFrame ()=0
 Decode the next frame.
virtual bool loadStream (Common::SeekableReadStream *stream)=0
 Load a video from a stream.
virtual bool isVideoLoaded () const =0
 Has a video been loaded?
bool endOfVideo () const
 Has the end of the video been reached?
void close ()
 Close the video.
Audio::Mixer::SoundType getSoundType () const
 Get the Mixer SoundType audio is being played with.
Audio::AudioStreamgetAudioStream () const
 Get the AudioStream for the audio.
uint16 getWidth () const
uint16 getHeight () const
virtual Graphics::PixelFormat getPixelFormat () const =0
uint32 getFrameCount () const
const bytegetPalette ()
bool hasDirtyPalette () const
uint32 getTimeToNextFrame () const
uint32 getStaticTimeToNextFrame () const
void pauseVideo (bool pause)

Protected Types

enum  SoundStage { kSoundNone = 0, kSoundLoaded = 1, kSoundPlaying = 2, kSoundFinished = 3 }
enum  Features {
  kFeaturesNone = 0x0000, kFeaturesPalette = 0x0008, kFeaturesDataSize = 0x0020, kFeaturesSound = 0x0040,
  kFeaturesFrameCoords = 0x0080, kFeaturesStdCoords = 0x0100, kFeaturesFramePos = 0x0200, kFeaturesVideo = 0x0400
}

Protected Member Functions

bool evaluateSeekFrame (int32 &frame, int whence) const
bool hasSurface ()
void createSurface ()
void freeSurface ()
uint32 deLZ77 (byte *dest, const byte *src, uint32 srcSize, uint32 destSize)
void deRLE (byte *&destPtr, const byte *&srcPtr, int16 destLen, int16 srcLen)
void renderBlockWhole (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void renderBlockWhole4X (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void renderBlockWhole2Y (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void renderBlockSparse (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void renderBlockSparse2Y (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void renderBlockRLE (Graphics::Surface &dstSurf, const byte *src, Common::Rect &rect)
void unsignedToSigned (byte *buffer, int length)

Protected Attributes

Audio::Mixer_mixer
Audio::Mixer::SoundType _soundType
uint16 _width
uint16 _height
uint16 _x
uint16 _y
uint16 _defaultX
uint16 _defaultY
uint32 _features
int32 _curFrame
uint32 _frameCount
uint32 _startTime
byte _palette [768]
bool _paletteDirty
bool _ownSurface
Graphics::Surface _surface
Common::List< Common::Rect_dirtyRects
Common::Rational _frameRate
bool _hasSound
bool _soundEnabled
SoundStage _soundStage
Audio::QueuingAudioStream_audioStream
Audio::SoundHandle _audioHandle

Private Attributes

uint32 _pauseStartTime
bool _isPaused

Detailed Description

Decoder for Coktel videos.

Video decoder used in engines:

  • gob
  • sci

Definition at line 70 of file coktel_decoder.h.


Member Enumeration Documentation

Enumerator:
kFeaturesNone 
kFeaturesPalette 

Has an own palette.

kFeaturesDataSize 

Suggests a data size.

kFeaturesSound 

Has sound.

kFeaturesFrameCoords 

Has specific frame coordinates.

kFeaturesStdCoords 

Has general standard coordinates.

kFeaturesFramePos 

Has a frame positions table.

kFeaturesVideo 

Has video.

Definition at line 200 of file coktel_decoder.h.

Enumerator:
kSoundNone 

No sound.

kSoundLoaded 

Sound loaded.

kSoundPlaying 

Sound is playing.

kSoundFinished 

No more new sound data.

Definition at line 193 of file coktel_decoder.h.


Constructor & Destructor Documentation

Video::CoktelDecoder::CoktelDecoder ( Audio::Mixer mixer,
Audio::Mixer::SoundType  soundType = Audio::Mixer::kPlainSoundType 
)
virtual Video::CoktelDecoder::~CoktelDecoder (  )  [virtual]

Member Function Documentation

void Video::CoktelDecoder::close (  ) 

Close the video.

Reimplemented in Video::PreIMDDecoder, Video::IMDDecoder, and Video::VMDDecoder.

virtual void Video::CoktelDecoder::colorModeChanged (  )  [virtual]

Reimplemented in Video::VMDDecoder.

void Video::CoktelDecoder::createSurface (  )  [protected]
virtual const Graphics::Surface* Video::CoktelDecoder::decodeNextFrame (  )  [pure virtual]

Decode the next frame.

See also:
VideoDecoder::decodeNextFrame()

Implemented in Video::PreIMDDecoder, Video::IMDDecoder, and Video::VMDDecoder.

uint32 Video::CoktelDecoder::deLZ77 ( byte dest,
const byte src,
uint32  srcSize,
uint32  destSize 
) [protected]
void Video::CoktelDecoder::deRLE ( byte *&  destPtr,
const byte *&  srcPtr,
int16  destLen,
int16  srcLen 
) [protected]
void Video::CoktelDecoder::disableSound (  ) 
void Video::CoktelDecoder::enableSound (  ) 
bool Video::CoktelDecoder::endOfVideo (  )  const

Has the end of the video been reached?

bool Video::CoktelDecoder::evaluateSeekFrame ( int32 frame,
int  whence 
) const [protected]
void Video::CoktelDecoder::finishSound (  ) 
void Video::CoktelDecoder::freeSurface (  )  [protected]
Audio::AudioStream* Video::CoktelDecoder::getAudioStream (  )  const

Get the AudioStream for the audio.

int Video::CoktelDecoder::getCurFrame (  )  const

Get the current frame.

See also:
VideoDecoder::getCurFrame()
uint16 Video::CoktelDecoder::getDefaultX (  )  const

Get the video's default X position.

uint16 Video::CoktelDecoder::getDefaultY (  )  const

Get the video's default Y position.

const Common::List<Common::Rect>& Video::CoktelDecoder::getDirtyRects (  )  const

Return a list of rectangles that changed in the last frame.

virtual Common::SeekableReadStream* Video::CoktelDecoder::getEmbeddedFile ( const Common::String fileName  )  const [virtual]

Return that embedded file.

Reimplemented in Video::VMDDecoder.

virtual bool Video::CoktelDecoder::getFrameCoords ( int16  frame,
int16 x,
int16 y,
int16 width,
int16 height 
) [virtual]

Return the coordinates of the specified frame.

Reimplemented in Video::VMDDecoder.

uint32 Video::CoktelDecoder::getFrameCount (  )  const
Common::Rational Video::CoktelDecoder::getFrameRate (  )  const

Get the video's frame rate.

uint16 Video::CoktelDecoder::getHeight (  )  const
const byte* Video::CoktelDecoder::getPalette (  ) 
virtual Graphics::PixelFormat Video::CoktelDecoder::getPixelFormat (  )  const [pure virtual]
Audio::Mixer::SoundType Video::CoktelDecoder::getSoundType (  )  const

Get the Mixer SoundType audio is being played with.

uint32 Video::CoktelDecoder::getStaticTimeToNextFrame (  )  const
virtual int32 Video::CoktelDecoder::getSubtitleIndex (  )  const [virtual]

Return the current subtitle index.

Reimplemented in Video::VMDDecoder.

const Graphics::Surface* Video::CoktelDecoder::getSurface (  )  const
uint32 Video::CoktelDecoder::getTimeToNextFrame (  )  const
uint16 Video::CoktelDecoder::getWidth (  )  const
bool Video::CoktelDecoder::hasDirtyPalette (  )  const
virtual bool Video::CoktelDecoder::hasEmbeddedFile ( const Common::String fileName  )  const [virtual]

Return whether that embedded file exists.

Reimplemented in Video::VMDDecoder.

virtual bool Video::CoktelDecoder::hasEmbeddedFiles (  )  const [virtual]

Return whether that video has any embedded files.

Reimplemented in Video::VMDDecoder.

bool Video::CoktelDecoder::hasPalette (  )  const
bool Video::CoktelDecoder::hasSound (  )  const
bool Video::CoktelDecoder::hasSurface (  )  [protected]
virtual bool Video::CoktelDecoder::hasVideo (  )  const [virtual]

Reimplemented in Video::VMDDecoder.

virtual bool Video::CoktelDecoder::isPaletted (  )  const [virtual]

Is the video paletted or true color?

Reimplemented in Video::VMDDecoder.

bool Video::CoktelDecoder::isSoundEnabled (  )  const
bool Video::CoktelDecoder::isSoundPlaying (  )  const
virtual bool Video::CoktelDecoder::isVideoLoaded (  )  const [pure virtual]

Has a video been loaded?

Implemented in Video::PreIMDDecoder, Video::IMDDecoder, and Video::VMDDecoder.

virtual bool Video::CoktelDecoder::loadStream ( Common::SeekableReadStream stream  )  [pure virtual]

Load a video from a stream.

See also:
VideoDecoder::loadStream()

Implemented in Video::PreIMDDecoder, Video::IMDDecoder, and Video::VMDDecoder.

void Video::CoktelDecoder::pauseVideo ( bool  pause  ) 
virtual bool Video::CoktelDecoder::reloadStream ( Common::SeekableReadStream stream  )  [pure virtual]

Replace the current video stream with this identical one.

Implemented in Video::PreIMDDecoder, Video::IMDDecoder, and Video::VMDDecoder.

void Video::CoktelDecoder::renderBlockRLE ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
void Video::CoktelDecoder::renderBlockSparse ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
void Video::CoktelDecoder::renderBlockSparse2Y ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
void Video::CoktelDecoder::renderBlockWhole ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
void Video::CoktelDecoder::renderBlockWhole2Y ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
void Video::CoktelDecoder::renderBlockWhole4X ( Graphics::Surface dstSurf,
const byte src,
Common::Rect rect 
) [protected]
virtual bool Video::CoktelDecoder::seek ( int32  frame,
int  whence = SEEK_SET,
bool  restart = false 
) [pure virtual]
void Video::CoktelDecoder::setFrameRate ( Common::Rational  frameRate  ) 

Override the video's frame rate.

void Video::CoktelDecoder::setSurfaceMemory ( void *  mem,
uint16  width,
uint16  height,
uint8  bpp 
)

Draw directly onto the specified video memory.

void Video::CoktelDecoder::setSurfaceMemory (  ) 

Reset the video memory.

virtual void Video::CoktelDecoder::setXY ( uint16  x,
uint16  y 
) [virtual]

Draw the video starting at this position within the video memory.

Reimplemented in Video::IMDDecoder, and Video::VMDDecoder.

void Video::CoktelDecoder::setXY (  ) 

Draw the video at the default position.

void Video::CoktelDecoder::unsignedToSigned ( byte buffer,
int  length 
) [inline, protected]

Member Data Documentation

Definition at line 225 of file coktel_decoder.h.

Definition at line 220 of file coktel_decoder.h.

Definition at line 221 of file coktel_decoder.h.

Definition at line 223 of file coktel_decoder.h.

Definition at line 226 of file coktel_decoder.h.

Definition at line 238 of file coktel_decoder.h.

Definition at line 241 of file coktel_decoder.h.

Definition at line 215 of file coktel_decoder.h.

Definition at line 272 of file coktel_decoder.h.

Definition at line 211 of file coktel_decoder.h.

Definition at line 233 of file coktel_decoder.h.

Definition at line 230 of file coktel_decoder.h.

Definition at line 231 of file coktel_decoder.h.

Definition at line 271 of file coktel_decoder.h.

Definition at line 242 of file coktel_decoder.h.

Definition at line 243 of file coktel_decoder.h.

Definition at line 228 of file coktel_decoder.h.

Definition at line 234 of file coktel_decoder.h.

Definition at line 214 of file coktel_decoder.h.

Definition at line 217 of file coktel_decoder.h.

Definition at line 218 of file coktel_decoder.h.


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


Generated on Sat Nov 9 2019 05:02:32 for ResidualVM by doxygen 1.7.1
curved edge   curved edge