QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
videowidget.h
00001 /*
00002     Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
00003     Copyright (C) 2011 Collabora Ltd.
00004       @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
00005 
00006     This library is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU Lesser General Public License as published
00008     by the Free Software Foundation; either version 2.1 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public License
00017     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 #ifndef QGST_UI_VIDEOWIDGET_H
00020 #define QGST_UI_VIDEOWIDGET_H
00021 
00022 #include "global.h"
00023 #include "../element.h"
00024 #include <QtGui/QWidget>
00025 
00026 namespace QGst {
00027 namespace Ui {
00028 
00029 class AbstractRenderer;
00030 
00062 class QTGSTREAMERUI_EXPORT VideoWidget : public QWidget
00063 {
00064     Q_OBJECT
00065     Q_DISABLE_COPY(VideoWidget)
00066 public:
00067     explicit VideoWidget(QWidget *parent = 0, Qt::WindowFlags f = 0);
00068     virtual ~VideoWidget();
00069 
00070 
00074     ElementPtr videoSink() const;
00075 
00084     void setVideoSink(const ElementPtr & sink);
00085 
00089     void releaseVideoSink();
00090 
00091 
00101     void watchPipeline(const PipelinePtr & pipeline);
00102 
00107     void stopPipelineWatch();
00108 
00109 protected:
00110     virtual void paintEvent(QPaintEvent *event);
00111 
00112 private:
00113     AbstractRenderer *d;
00114 };
00115 
00116 } //namespace Ui
00117 } //namespace QGst
00118 
00119 #endif // QGST_UI_VIDEOWIDGET_H