diff options
author | Matthew Hoops | 2012-12-04 21:15:44 -0500 |
---|---|---|
committer | Matthew Hoops | 2012-12-04 21:15:44 -0500 |
commit | 1f233be2e4ab288fb98480aecdd0d7f2d5d0dd99 (patch) | |
tree | 7836250f761573bce89662e0d7438bd7efe9cbbd /video/codecs/codec.h | |
parent | 285e1be1353dc098cff6c67d3e61535de2bbe41d (diff) | |
download | scummvm-rg350-1f233be2e4ab288fb98480aecdd0d7f2d5d0dd99.tar.gz scummvm-rg350-1f233be2e4ab288fb98480aecdd0d7f2d5d0dd99.tar.bz2 scummvm-rg350-1f233be2e4ab288fb98480aecdd0d7f2d5d0dd99.zip |
VIDEO: Add some documentation to Codec and its derivatives
Diffstat (limited to 'video/codecs/codec.h')
-rw-r--r-- | video/codecs/codec.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/video/codecs/codec.h b/video/codecs/codec.h index 8e4691ca3c..c1194e461b 100644 --- a/video/codecs/codec.h +++ b/video/codecs/codec.h @@ -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; } }; |