00001 // /// // Mx clientSDK 00002 // ///// //// Mx Crossplatform Client Library 00003 // /// XXX XXX /// 00004 // /// XXX XXX /// $RCSfile: mxcpcJPEGSequenceWriter.h,v $ 00005 // /// XXX /// $Revision: 1.2 $ 00006 // /// XXX XXX /// $Date: 2005/12/14 10:38:52 $ 00007 // //// XXX XXX //// $Author: cvs-kai $ 00008 // //// //// 00009 // //// M O B O T I X //////////////////////////////////////////////// 00010 // //// Security Vision Systems ////////////////////////////////////////////// 00011 // // 00012 // Copyright (C) 2005 - 2006, MOBOTIX AG, Germany // 00013 // This software is made available under the BSD licence. Please refer // 00014 // to the file LICENCE.TXT contained in this distribution for details. // 00015 // // 00016 // ///////////////////////////////////////////////////////////////////// 00017 00018 00019 00020 #ifndef __MXCPC_JPEGSEQUENCEWRITER_H__ 00021 #define __MXCPC_JPEGSEQUENCEWRITER_H__ 00022 00023 00024 00025 #include <mxcpcJPEGReceiver.h> 00026 00027 #include <cstdio> 00028 00029 00030 00031 //! Writes out a sequence of individual <tt>JPEG</tt>-files. 00032 /*! 00033 * \ingroup mxcpc_core 00034 * 00035 * The individual JPEG files generated by the writer will be named using the 00036 * filename prefix specified to the constructor and an appended sequence 00037 * number. 00038 */ 00039 class mxcpcJPEGSequenceWriter : public mxcpcJPEGReceiver { 00040 00041 private: 00042 char *FileNamePrefix; 00043 char *FileName; 00044 std::FILE *OutFile; 00045 int FrameNum; 00046 bool ErrorEncountered; 00047 00048 public: 00049 //! The filename prefix will be copied. 00050 mxcpcJPEGSequenceWriter(const char *filename_prefix); 00051 ~mxcpcJPEGSequenceWriter(); 00052 00053 public: 00054 //! (Re)implemented. 00055 void beginFrame(void); 00056 //! (Re)implemented. 00057 void endFrame(void); 00058 //! (Re)implemented. 00059 void receiveJPEGBytes(const mxcpc::u8 *buffer, int num); 00060 }; 00061 00062 00063 00064 #endif // __MXCPC_JPEGSEQUENCEWRITER_H__