00001 00002 00003 #ifndef __BMPVIDEOSOURCE_H 00004 #define __BMPVIDEOSOURCE_H 00005 00006 #include "videosource.h" 00007 00012 class BmpVideoSource : public VideoSource { 00013 public: 00014 00015 BmpVideoSource(char *genericFilename, int first, int last); 00016 virtual bool initialize(); 00017 virtual bool getFrame(IplImage *dst); 00018 void getSize(int &width, int &height); 00019 virtual ~BmpVideoSource(); 00020 virtual void start(); 00021 virtual void stop(); 00022 virtual bool isPlaying() { return playing; }; 00023 virtual const char *getStreamName() const { return genericFilename; } 00024 virtual const char *getStreamType() const { return "BmpVideoSource"; } 00025 virtual int getId(); 00026 00027 private: 00028 00029 char *genericFilename; 00030 int frameCnt; 00031 bool playing; 00032 int firstImageIndex; 00033 int lastImageIndex; 00034 int width,height; 00035 }; 00036 00037 class BmpFactory : public ParticularVSFactory { 00038 public: 00039 BmpFactory() { name="Bmp"; filename=0; }; 00040 virtual void registerParameters(ParamSection *sec); 00041 virtual VideoSource *construct(); 00042 private: 00043 char *filename; 00044 bool use; 00045 int first, last; 00046 }; 00047 #endif 00048