00001 // /// // Mx clientSDK 00002 // ///// //// Mx Crossplatform Client Library 00003 // /// XXX XXX /// 00004 // /// XXX XXX /// $RCSfile: mxcpc_mxpeg_namespace.h,v $ 00005 // /// XXX /// $Revision: 1.2 $ 00006 // /// XXX XXX /// $Date: 2005/12/07 10:38:54 $ 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_MXPEG_NAMESPACE_H__ 00021 #define __MXCPC_MXPEG_NAMESPACE_H__ 00022 00023 00024 00025 #include <mxcpc_namespace.h> 00026 00027 00028 00029 //! Type stuff describing bits and pieces of the <tt>MxPEG</tt> interchange 00030 //! format. 00031 /*! 00032 * \ingroup mxcpc_core 00033 */ 00034 namespace mxcpc_mxpeg { 00035 00036 const mxcpc::u8 MarkerId_SOI = 0xd8; 00037 const mxcpc::u8 MarkerId_APP0 = 0xe0; 00038 const mxcpc::u8 MarkerId_DQT = 0xdb; 00039 const mxcpc::u8 MarkerId_SOF0 = 0xc0; 00040 const mxcpc::u8 MarkerId_DHT = 0xc4; 00041 const mxcpc::u8 MarkerId_SOS = 0xda; 00042 const mxcpc::u8 MarkerId_EOI = 0xd9; 00043 00044 //! Assimilated from MxPEG Viewer (Codec2.h) 00045 typedef struct { 00046 mxcpc::u8 ff; // Marker-leadin 00047 mxcpc::u8 app0_marker; // APP0-Marker 00048 mxcpc::u8 len_hi, len_lo; // Length of APP0 block (2 bytes) 00049 char id[5]; // Block ID (4 bytes - ASCII "JFIF" + \0) 00050 mxcpc::u8 major_vers, minor_vers; // Version Major, Minor (2 bytes - major first) 00051 mxcpc::u8 units; // Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) 00052 mxcpc::u8 xdpu_hi, xdpu_lo; // Xdpu (2 bytes - dots per unit horizontal) 00053 mxcpc::u8 ydpu_hi, ydpu_lo; // Ydpu (2 bytes - dots per unit vertical) 00054 mxcpc::u8 thumbnail_x; // Thumbnail X size (1 byte) 00055 mxcpc::u8 thumbnail_y; // Thumbnail Y size (1 byte) 00056 } __attribute__ ((packed)) 00057 APP0; 00058 00059 //! Assimilated from MxPEG Viewer (Codec2.h) 00060 typedef struct { 00061 mxcpc::u8 ff; 00062 mxcpc::u8 marker; 00063 mxcpc::u8 len_hi, len_lo; 00064 mxcpc::u8 data_precision; 00065 mxcpc::u8 y_sz_hi, y_sz_lo; 00066 mxcpc::u8 x_sz_hi, x_sz_lo; 00067 mxcpc::u8 num_components; 00068 struct { 00069 mxcpc::u8 component_id; 00070 mxcpc::u8 sampl_fact; 00071 mxcpc::u8 quant_tbl_no; 00072 } __attribute__ ((packed)) 00073 components[3]; 00074 } __attribute__ ((packed)) 00075 SOF0; 00076 00077 //! Assimilated from MxPEG Viewer (Codec2.h) 00078 typedef struct { 00079 mxcpc::u8 ff; 00080 mxcpc::u8 sos_marker; 00081 mxcpc::u8 sz_hi; 00082 mxcpc::u8 sz_lo; 00083 mxcpc::u8 comps_in_scan; 00084 struct { 00085 mxcpc::u8 comp_id; 00086 mxcpc::u8 td_ta; 00087 } __attribute__ ((packed)) 00088 components[3]; 00089 mxcpc::u8 Ss; 00090 mxcpc::u8 Se; 00091 mxcpc::u8 Ah_Al; 00092 } __attribute__ ((packed)) 00093 SOS; 00094 00095 }; 00096 00097 00098 00099 #endif // __MXCPC_MXPEG_NAMESPACE_H__ 00100