00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00020 #ifndef CMotion2DVideo_Mpeg2_h
00021 #define CMotion2DVideo_Mpeg2_h
00022
00023 #if defined (WIN32)
00024 # if defined MOTION2D_DLL_EXPORTS
00025 # define MOTION2D_API __declspec( dllexport )
00026 # elif defined MOTION2D_DLL_IMPORTS
00027 # define MOTION2D_API __declspec( dllimport )
00028 # else
00029 # define MOTION2D_API
00030 # endif
00031 #else
00032 # define MOTION2D_API
00033 #endif
00034
00035 class MOTION2D_API CMotion2DVideo_Mpeg2
00036 {
00037 private:
00038 unsigned char * im;
00039 int width, height, channels;
00040 unsigned long frameNumber;
00041 bool firstframeisread;
00042
00043 public:
00044 CMotion2DVideo_Mpeg2();
00045 ~CMotion2DVideo_Mpeg2();
00046 int getWidth();
00047 int getHeight();
00048 int getChannels();
00049
00050 int openStream(const char *filename);
00051 int initStream(int i=0);
00052 int closeStream();
00053
00054 int getFrame(unsigned char **bitmap);
00055 unsigned long getFrameNumber();
00056 int skipFrame();
00057
00058 void free();
00059 };
00060
00061
00062
00063 #endif