VIDEO: Add some documentation to Codec and its derivatives

This commit is contained in:
Matthew Hoops 2012-12-04 21:15:44 -05:00
parent 285e1be135
commit 1f233be2e4
12 changed files with 100 additions and 4 deletions

View File

@ -38,6 +38,12 @@ struct CDToonsBlock {
byte *data;
};
/**
* Broderbund CDToons decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class CDToonsDecoder : public Codec {
public:
CDToonsDecoder(uint16 width, uint16 height);

View File

@ -59,6 +59,13 @@ struct CinepakFrame {
Graphics::Surface *surface;
};
/**
* Cinepak decoder.
*
* Used in video:
* - AVIDecoder
* - QuickTimeDecoder
*/
class CinepakDecoder : public Codec {
public:
CinepakDecoder(int bitsPerPixel = 24);

View File

@ -32,16 +32,48 @@ class SeekableReadStream;
namespace Video {
/**
* An abstract representation of a video codec used for decoding
* video frames.
*
* Used in video:
* - AVIDecoder
* - QuickTimeDecoder
* - VMDDecoder
*/
class Codec {
public:
Codec() {}
virtual ~Codec() {}
/**
* Decode the frame for the given data and return a pointer to a surface
* containing the decoded frame.
*
* @return a pointer to the decoded frame
* @note stream is not deleted
*/
virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
/**
* Get the format that the surface returned from decodeImage() will
* be in.
*/
virtual Graphics::PixelFormat getPixelFormat() const = 0;
/**
* Can this codec's frames contain a palette?
*/
virtual bool containsPalette() const { return false; }
/**
* Get the palette last decoded from decodeImage
*/
virtual const byte *getPalette() { return 0; }
/**
* Does the codec have a dirty palette?
*/
virtual bool hasDirtyPalette() const { return false; }
};

View File

@ -36,6 +36,13 @@
namespace Video {
/**
* Intel Indeo 3 decoder.
*
* Used in video:
* - AVIDecoder
* - VMDDecoder
*/
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height);

View File

@ -36,10 +36,12 @@ struct Surface;
namespace Video {
// Motion JPEG Decoder
// Basically a wrapper around JPEG which converts to RGB and also functions
// as a Codec.
/**
* Motion JPEG decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class JPEGDecoder : public Codec {
public:
JPEGDecoder();

View File

@ -27,6 +27,12 @@
namespace Video {
/**
* Microsoft Run-Length Encoding decoder.
*
* Used in video:
* - AVIDecoder
*/
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);

View File

@ -27,6 +27,12 @@
namespace Video {
/**
* Microsoft Video 1 decoder.
*
* Used in video:
* - AVIDecoder
*/
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);

View File

@ -28,6 +28,12 @@
namespace Video {
/**
* QuickTime Run-Length Encoding decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);

View File

@ -28,6 +28,12 @@
namespace Video {
/**
* Apple RPZA decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);

View File

@ -34,6 +34,12 @@ enum {
COLORS_PER_TABLE = 256
};
/**
* Apple SMC decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class SMCDecoder : public Codec {
public:
SMCDecoder(uint16 width, uint16 height);

View File

@ -33,6 +33,12 @@ struct Point;
namespace Video {
/**
* Sorenson Vector Quantizer 1 decoder.
*
* Used in video:
* - QuickTimeDecoder
*/
class SVQ1Decoder : public Codec {
public:
SVQ1Decoder(uint16 width, uint16 height);

View File

@ -32,6 +32,12 @@
namespace Video {
/**
* Duck TrueMotion 1 decoder.
*
* Used in video:
* - AVIDecoder
*/
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder(uint16 width, uint16 height);