00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GSTVIDEOVIEW_H
00021 #define GSTVIDEOVIEW_H
00022
00023 #include "src/config.h"
00024
00025 #include "videoview.h"
00026 #include "camerainitthread.h"
00027
00028 #include <qwidget.h>
00029 #include <vector>
00030 #include <gst/gst.h>
00031
00032 using namespace std;
00033
00034 class CameraInitThread;
00035
00046 class GstVideoView : public VideoView
00047 {
00048 Q_OBJECT
00049 public:
00050
00058 GstVideoView(QWidget *parent=0, const char *name=0);
00059
00063 ~GstVideoView();
00064
00065 void on(const char* device);
00066 void off();
00067 void capture();
00068
00069
00070
00071
00072
00073
00074
00075
00076 protected:
00081 void resizeEvent(QResizeEvent *);
00082
00083
00090 void paintEvent(QPaintEvent *);
00091
00092 void initCamera();
00093
00094
00095
00096 private:
00097 int widthConst, heightConst;
00098 WId video_window;
00099
00100 CameraInitThread *initThread;
00101
00102 GstElement *pipeline;
00103
00104 GstElement *imageSource;
00105
00106 GstElement *videoThread;
00107 GstElement *webCamSource;
00108 GstElement *videoSplitter;
00109 GstElement *videoQueue;
00110 GstElement *videoSink;
00111
00112 GstElement *imageCaptureBin;
00113 GstElement *videoCaptureQueue;
00114 GstElement *colorConverter1;
00115 GstElement *pngEncoder;
00116 GstElement *imageSink;
00117
00118
00119
00120 };
00121
00122 #endif