gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/libbase embedVideoDecoder.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash/libbase embedVideoDecoder.h
Date: Wed, 06 Jun 2007 16:28:29 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/06 16:28:29

Modified files:
        libbase        : embedVideoDecoder.h 

Log message:
        Cleanups in documentation, a few questions and a TODO item

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/embedVideoDecoder.h?cvsroot=gnash&r1=1.7&r2=1.8

Patches:
Index: embedVideoDecoder.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/embedVideoDecoder.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- embedVideoDecoder.h 6 Jun 2007 15:41:12 -0000       1.7
+++ embedVideoDecoder.h 6 Jun 2007 16:28:29 -0000       1.8
@@ -19,7 +19,7 @@
 //
 //
 
-//  $Id: embedVideoDecoder.h,v 1.7 2007/06/06 15:41:12 tgc Exp $
+//  $Id: embedVideoDecoder.h,v 1.8 2007/06/06 16:28:29 strk Exp $
 
 #ifndef __EMBEDVIDEODECODER_H__
 #define __EMBEDVIDEODECODER_H__
@@ -38,7 +38,6 @@
 /// The embedVideoDecoder is used to decodes a video frame which has been
 /// embedded in a SWF.
 ///
-
 class embedVideoDecoder
 {
 public:
@@ -61,7 +60,6 @@
                CODEC_SCREENVIDEO2 = 6  // Screenvideo2 codec
        };
 
-       ///
        /// Sets up the decoder.
        //
        /// @param width
@@ -82,26 +80,38 @@
        /// @param outputFormat
        /// The outputFormat of the video, see videoOutputFormat
        ///
+       /// The default implementation is a no-op
+       ///
+       /// TODO: shouldn't this initialization be done by the constructor ?
+       ///
        virtual void createDecoder(int /*width*/,
                int /*height*/,
                int /*deblocking*/,
                bool /*smoothing*/,
-               int /*format*/,
-               int /*outputFormat*/){}
+               int /*format*/, // should this argument be of codecType type ?
+               int /*outputFormat*/) // should this argument be of 
VideoOutputFormat type ?
+       {}
 
-       ///
        /// gnash calls this when it wants to decode the given videoframe.
        //
        /// @param data
        /// The video frame that is to be decoded.
+       ///     Data is expected to be in the format specified with the 
+       ///     "format" parameter in the createDecoder call.
        ///
        /// @param size
        /// The sizes of the undecoded videoframe in bytes.
        ///
-       /// @return a auto_ptr containing the image which is a result of the 
decoding.
-       /// The caller owns the returned image.
+       /// @return
+       ///     An auto_ptr containing the image which is a result of the 
decoding.
+       ///     A NULL one on error.
+       ///
+       /// The default implementation always returns a NULL auto pointer.
        ///
-       virtual std::auto_ptr<image::image_base> decodeFrame(uint8_t* /*data*/, 
int /*size*/) { std::auto_ptr<image::image_base> i (NULL); return i; }
+       virtual std::auto_ptr<image::image_base> decodeFrame(uint8_t* /*data*/, 
int /*size*/)
+       {
+               return std::auto_ptr<image::image_base>(NULL); 
+       }
 
        virtual ~embedVideoDecoder() {};
 };




reply via email to

[Prev in Thread] Current Thread [Next in Thread]