Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

gstvideoview.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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         //void setCameraHandler(CameraHandler *cameraHandler);
00070 
00071         
00072         //void setFrameView(FrameView *frameView);
00073         //void setCameraButton(QPushButton *cameraButton);
00074         //void setCaptureButton(QPushButton *captureButton);
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 //signals:
00119 //      void cameraReady();
00120 };
00121 
00122 #endif

Generated on Thu May 19 01:51:20 2005 for stopmotion.kdevelop by  doxygen 1.4.2