mxmUndecodedMxPEGFrameDescriptor.h

00001 //           ///          //                                  C++ Cross Platform
00002 //          /////        ////
00003 //         /// XXX     XXX ///            ///////////   /////////     ///   ///
00004 //        ///    XXX XXX    ///         ///             ///    ///   ///  ///
00005 //       ///       XXX       ///         /////////     ///      //  //////
00006 //      ///      XXX XXX      ///               ///   ///    ///   ///  ///
00007 //     ////    XXX     XXX    ////    ////////////  //////////    ///   ///
00008 //    ////                     ////
00009 //   ////  M  O  B  O  T  I  X  ////////////////////////////////////////////////
00010 //  //// Security Vision Systems //////////////////////////////////////////////
00011 //
00012 //  $Author: khe_admin $
00013 //  $LastChangedBy: khe_admin $
00014 //  $LastChangedDate: 2007-06-29 15:34:53 +0200 (Fri, 29 Jun 2007) $
00015 //  $HeadURL: http://svn.mobotix.net/svn/mxsdk/src/mxm/trunk/include/mxm/core/mxmUndecodedMxPEGFrameDescriptor.h $
00016 //
00018      //
00019      //  MOBOTIX MxPEG SDK
00020      //
00021      //  This file belongs to the C++ library released as part of the MxPEG SDK.
00022      //
00023      //  This software is licenced under the BSD licence,
00024      //  http://www.opensource.org/licenses/bsd-license.php
00025      //
00026      //  Copyright (c) 2005 - 2007, MOBOTIX AG
00027      //  All rights reserved.
00028      //
00029      //  Redistribution and use in source and binary forms, with or without
00030      //  modification, are permitted provided that the following conditions are
00031      //  met:
00032      //
00033      //  - Redistributions of source code must retain the above copyright
00034      //    notice, this list of conditions and the following disclaimer.
00035      //
00036      //  - Redistributions in binary form must reproduce the above copyright
00037      //    notice, this list of conditions and the following disclaimer in the
00038      //    documentation and/or other materials provided with the distribution.
00039      //
00040      //  - Neither the name of MOBOTIX AG nor the names of its contributors may
00041      //    be used to endorse or promote products derived from this software
00042      //    without specific prior written permission.
00043      //
00044      //  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00045      //  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00046      //  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00047      //  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00048      //  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00049      //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00050      //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00051      //  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00052      //  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00053      //  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00054      //  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00055      //
00057 
00058 
00059 
00060 #ifndef __MXM_UNDECODEDFRAMEDESCRIPTOR_H__
00061 #define __MXM_UNDECODEDFRAMEDESCRIPTOR_H__
00062 
00063 
00064 
00065 #include <mxm/core/mxmObject.h>
00066 #include <mxm/core/mxm_types.h>
00067 #include <mxm/core/mxm_core_platform_macros.h>
00068 
00069 
00070 
00072 
00081 class MXM_CORE_API mxmUndecodedMxPEGFrameDescriptor : public mxmObject {
00082   
00083  private:
00084   static const int MaxComponents = 4;
00085   
00086  public:
00087   enum SamplingMode { Y22U11V11 = 0,   // MOBO
00088                       Y21U11V11 = 1    // Axis
00089                     };
00090   
00091  public:
00092   struct ComponentInfo {
00093     int HorizSamplingFactor,
00094         VertSamplingFactor;
00095     int QuantTable;
00096     int HuffmanDC,
00097         HuffmanAC;
00098   };
00099   
00100  public:
00101   int             Width,
00102                   Height;
00103   int             TileNumX,
00104                   TileNumY;
00105   unsigned char   *ScanBytes;
00106   int             ScanLength;
00107   unsigned char   *TileBits;
00108   unsigned char   *StartOfImage;
00109   int             ImageLength;
00110   mxm::frame_time TimeStamp;
00111   bool            TimeStampValid;
00112   mxm::u32        GenerationNumber;
00113   bool            GenerationNumberValid;
00114   int             ComponentNum;
00115   ComponentInfo   ComponentInfos[MaxComponents];
00116   SamplingMode    Sampling;
00117  private:
00118   void *StableABIDataExtension;
00119   
00120  public:
00121   mxmUndecodedMxPEGFrameDescriptor();
00122   void setResolution(int width, int height);
00123   void setTimeStamp(mxm::frame_time time_stamp);
00124   void setGenerationNumber(mxm::u32 gen_no);
00125   void setComponentNum(int component_num);
00126   void setComponentParameters(int component,
00127                               int horiz_sampling, int vert_sampling,
00128                               int quant_table);
00129   void setMoreComponentParameters(int component,
00130                                   int huffman_dc, int huffman_ac);
00131   void setSamplingMode(SamplingMode sampling);
00132   void init(int width, int height);
00134   void resetForNextFrame();
00135 };
00136 
00137 
00138 
00139 #endif   // __MXM_UNDECODEDFRAMEDESCRIPTOR_H__

Generated on Fri Jun 29 17:21:04 2007 for MxPEG SDK by  doxygen 1.4.6