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

#include <coktel_decoder.h>

Inheritance diagram for Video::VMDDecoder:
Collaboration diagram for Video::VMDDecoder:

List of all members.

Classes

struct  File
struct  Frame
struct  Part

Public Member Functions

 VMDDecoder (Audio::Mixer *mixer, Audio::Mixer::SoundType soundType=Audio::Mixer::kPlainSoundType)
 ~VMDDecoder ()
bool reloadStream (Common::SeekableReadStream *stream)
 Replace the current video stream with this identical one.
bool seek (int32 frame, int whence=SEEK_SET, bool restart=false)
void setXY (uint16 x, uint16 y)
 Draw the video starting at this position within the video memory.
void colorModeChanged ()
bool getFrameCoords (int16 frame, int16 &x, int16 &y, int16 &width, int16 &height)
 Return the coordinates of the specified frame.
bool hasEmbeddedFiles () const
 Return whether that video has any embedded files.
bool hasEmbeddedFile (const Common::String &fileName) const
 Return whether that embedded file exists.
Common::SeekableReadStreamgetEmbeddedFile (const Common::String &fileName) const
 Return that embedded file.
int32 getSubtitleIndex () const
 Return the current subtitle index.
bool hasVideo () const
bool isPaletted () const
 Is the video paletted or true color?
bool loadStream (Common::SeekableReadStream *stream)
 Load a video from a stream.
void close ()
 Close the video.
bool isVideoLoaded () const
 Has a video been loaded?
const Graphics::SurfacedecodeNextFrame ()
 Decode the next frame.
Graphics::PixelFormat getPixelFormat () const

Protected Member Functions

void setAutoStartSound (bool autoStartSound)

Private Types

enum  PartType {
  kPartTypeSeparator = 0, kPartTypeAudio = 1, kPartTypeVideo = 2, kPartTypeFile = 3,
  kPartType4 = 4, kPartTypeSubtitle = 5
}
enum  AudioFormat { kAudioFormat8bitRaw = 0, kAudioFormat16bitDPCM = 1, kAudioFormat16bitADPCM = 2 }

Private Member Functions

bool assessVideoProperties ()
bool assessAudioProperties ()
bool openExternalCodec ()
bool readFrameTable (int &numFiles)
bool readFiles ()
void processFrame ()
bool renderFrame (Common::Rect &rect)
bool getRenderRects (const Common::Rect &rect, Common::Rect &realRect, Common::Rect &fakeRect)
void blit16 (const Graphics::Surface &srcSurf, Common::Rect &rect)
void blit24 (const Graphics::Surface &srcSurf, Common::Rect &rect)
void emptySoundSlice (uint32 size)
void filledSoundSlice (uint32 size)
void filledSoundSlices (uint32 size, uint32 mask)
void createAudioStream ()
uint8 evaluateMask (uint32 mask, bool *fillInfo, uint8 &max)
Audio::AudioStreamcreate8bitRaw (Common::SeekableReadStream *stream)
Audio::AudioStreamcreate16bitDPCM (Common::SeekableReadStream *stream)
Audio::AudioStreamcreate16bitADPCM (Common::SeekableReadStream *stream)
bool getPartCoords (int16 frame, PartType type, int16 &x, int16 &y, int16 &width, int16 &height)

Private Attributes

Common::SeekableReadStream_stream
byte _version
uint32 _flags
uint32 _frameInfoOffset
uint16 _partsPerFrame
Frame_frames
Common::Array< File_files
uint16 _soundFlags
int16 _soundFreq
int16 _soundSliceSize
int16 _soundSlicesCount
byte _soundBytesPerSample
byte _soundStereo
uint32 _soundHeaderSize
uint32 _soundDataSize
uint32 _soundLastFilledFrame
AudioFormat _audioFormat
bool _autoStartSound
Common::MemoryReadWriteStream_oldStereoBuffer
 Old stereo format packs a DPCM stream into audio packets without ensuring that each packet contains an even amount of samples.
bool _hasVideo
uint32 _videoCodec
byte _blitMode
byte _bytesPerPixel
uint32 _firstFramePos
 Position of the first frame's data within the stream.
uint32 _videoBufferSize
 Size of the video buffers.
byte_videoBuffer [3]
 Video buffers.
uint32 _videoBufferLen [3]
 Size of the video buffers filled.
Graphics::Surface _8bppSurface [3]
 Fake 8bpp surfaces over the video buffers.
bool _externalCodec
Image::Codec_codec
int32 _subtitle
bool _isPaletted

Friends

class AdvancedVMDDecoder

Detailed Description

Definition at line 396 of file coktel_decoder.h.


Member Enumeration Documentation

Enumerator:
kAudioFormat8bitRaw 
kAudioFormat16bitDPCM 
kAudioFormat16bitADPCM 

Definition at line 444 of file coktel_decoder.h.

Enumerator:
kPartTypeSeparator 
kPartTypeAudio 
kPartTypeVideo 
kPartTypeFile 
kPartType4 
kPartTypeSubtitle 

Definition at line 435 of file coktel_decoder.h.


Constructor & Destructor Documentation

Video::VMDDecoder::VMDDecoder ( Audio::Mixer mixer,
Audio::Mixer::SoundType  soundType = Audio::Mixer::kPlainSoundType 
)
Video::VMDDecoder::~VMDDecoder (  ) 

Member Function Documentation

bool Video::VMDDecoder::assessAudioProperties (  )  [private]
bool Video::VMDDecoder::assessVideoProperties (  )  [private]
void Video::VMDDecoder::blit16 ( const Graphics::Surface srcSurf,
Common::Rect rect 
) [private]
void Video::VMDDecoder::blit24 ( const Graphics::Surface srcSurf,
Common::Rect rect 
) [private]
void Video::VMDDecoder::close (  ) 

Close the video.

Reimplemented from Video::CoktelDecoder.

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

Reimplemented from Video::CoktelDecoder.

Audio::AudioStream* Video::VMDDecoder::create16bitADPCM ( Common::SeekableReadStream stream  )  [private]
Audio::AudioStream* Video::VMDDecoder::create16bitDPCM ( Common::SeekableReadStream stream  )  [private]
Audio::AudioStream* Video::VMDDecoder::create8bitRaw ( Common::SeekableReadStream stream  )  [private]
void Video::VMDDecoder::createAudioStream (  )  [private]
const Graphics::Surface* Video::VMDDecoder::decodeNextFrame (  )  [virtual]

Decode the next frame.

See also:
VideoDecoder::decodeNextFrame()

Implements Video::CoktelDecoder.

void Video::VMDDecoder::emptySoundSlice ( uint32  size  )  [private]
uint8 Video::VMDDecoder::evaluateMask ( uint32  mask,
bool *  fillInfo,
uint8 max 
) [private]
void Video::VMDDecoder::filledSoundSlice ( uint32  size  )  [private]
void Video::VMDDecoder::filledSoundSlices ( uint32  size,
uint32  mask 
) [private]
Common::SeekableReadStream* Video::VMDDecoder::getEmbeddedFile ( const Common::String fileName  )  const [virtual]

Return that embedded file.

Reimplemented from Video::CoktelDecoder.

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

Return the coordinates of the specified frame.

Reimplemented from Video::CoktelDecoder.

bool Video::VMDDecoder::getPartCoords ( int16  frame,
PartType  type,
int16 x,
int16 y,
int16 width,
int16 height 
) [private]
Graphics::PixelFormat Video::VMDDecoder::getPixelFormat (  )  const [virtual]

Implements Video::CoktelDecoder.

bool Video::VMDDecoder::getRenderRects ( const Common::Rect rect,
Common::Rect realRect,
Common::Rect fakeRect 
) [private]
int32 Video::VMDDecoder::getSubtitleIndex (  )  const [virtual]

Return the current subtitle index.

Reimplemented from Video::CoktelDecoder.

bool Video::VMDDecoder::hasEmbeddedFile ( const Common::String fileName  )  const [virtual]

Return whether that embedded file exists.

Reimplemented from Video::CoktelDecoder.

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

Return whether that video has any embedded files.

Reimplemented from Video::CoktelDecoder.

bool Video::VMDDecoder::hasVideo (  )  const [virtual]

Reimplemented from Video::CoktelDecoder.

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

Is the video paletted or true color?

Reimplemented from Video::CoktelDecoder.

bool Video::VMDDecoder::isVideoLoaded (  )  const [virtual]

Has a video been loaded?

Implements Video::CoktelDecoder.

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

Load a video from a stream.

See also:
VideoDecoder::loadStream()

Implements Video::CoktelDecoder.

bool Video::VMDDecoder::openExternalCodec (  )  [private]
void Video::VMDDecoder::processFrame (  )  [private]
bool Video::VMDDecoder::readFiles (  )  [private]
bool Video::VMDDecoder::readFrameTable ( int &  numFiles  )  [private]
bool Video::VMDDecoder::reloadStream ( Common::SeekableReadStream stream  )  [virtual]

Replace the current video stream with this identical one.

Implements Video::CoktelDecoder.

bool Video::VMDDecoder::renderFrame ( Common::Rect rect  )  [private]
bool Video::VMDDecoder::seek ( int32  frame,
int  whence = SEEK_SET,
bool  restart = false 
) [virtual]

Implements Video::CoktelDecoder.

void Video::VMDDecoder::setAutoStartSound ( bool  autoStartSound  )  [protected]
void Video::VMDDecoder::setXY ( uint16  x,
uint16  y 
) [virtual]

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

Reimplemented from Video::CoktelDecoder.


Friends And Related Function Documentation

friend class AdvancedVMDDecoder [friend]

Definition at line 397 of file coktel_decoder.h.


Member Data Documentation

Fake 8bpp surfaces over the video buffers.

Definition at line 530 of file coktel_decoder.h.

Definition at line 504 of file coktel_decoder.h.

Definition at line 505 of file coktel_decoder.h.

Definition at line 521 of file coktel_decoder.h.

Definition at line 522 of file coktel_decoder.h.

Definition at line 533 of file coktel_decoder.h.

Definition at line 532 of file coktel_decoder.h.

Definition at line 492 of file coktel_decoder.h.

Position of the first frame's data within the stream.

Definition at line 524 of file coktel_decoder.h.

Definition at line 486 of file coktel_decoder.h.

Definition at line 488 of file coktel_decoder.h.

Definition at line 490 of file coktel_decoder.h.

Definition at line 519 of file coktel_decoder.h.

Definition at line 537 of file coktel_decoder.h.

Old stereo format packs a DPCM stream into audio packets without ensuring that each packet contains an even amount of samples.

In order for the stream to play back correctly, all audio data needs to be pushed into a single data buffer and read from there.

This buffer is owned by _audioStream and will be disposed when _audioStream is disposed.

Definition at line 516 of file coktel_decoder.h.

Definition at line 489 of file coktel_decoder.h.

Definition at line 499 of file coktel_decoder.h.

Definition at line 502 of file coktel_decoder.h.

Definition at line 495 of file coktel_decoder.h.

Definition at line 496 of file coktel_decoder.h.

Definition at line 501 of file coktel_decoder.h.

Definition at line 498 of file coktel_decoder.h.

Definition at line 497 of file coktel_decoder.h.

Definition at line 500 of file coktel_decoder.h.

Definition at line 535 of file coktel_decoder.h.

Definition at line 485 of file coktel_decoder.h.

Video buffers.

Definition at line 527 of file coktel_decoder.h.

Size of the video buffers filled.

Definition at line 528 of file coktel_decoder.h.

Size of the video buffers.

Definition at line 526 of file coktel_decoder.h.

Definition at line 520 of file coktel_decoder.h.


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


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