00001 /************************************************************************ 00002 frameServer.h 00003 00004 **************************************************************************/ 00005 00006 00007 #ifndef FRAMESERVER_H 00008 #define FRAMESERVER_H 00009 00010 #include <string> 00011 #include <QObject> 00012 #include <QImage> 00013 #include "qtffplay.h" 00014 00015 00026 class frameServer : public QObject 00027 { 00028 Q_OBJECT 00029 public: 00030 00034 frameServer(); 00038 virtual ~frameServer ( ); 00043 QImage* getFrame( ); 00050 void restart ( ); 00057 void setCaptureRate(int ms); 00063 void startCapture(); 00068 void stopCapture(); 00074 int attachSource(QString *sourceName); 00078 void togglePause(); 00079 00080 00081 protected: 00082 00083 signals: 00090 void frameReady(QImage *frame); 00091 00092 private slots: 00097 void obtain_frame(); 00098 00099 private: 00100 00101 QImage *currentFrame; 00102 QImage *lastFrame; 00106 QtFFPlay qtfp; 00107 QTimer m_timer; 00108 int timeInt; 00109 int capStatus; 00110 }; 00111 00112 #endif // FRAMESERVER_H
1.4.7