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 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 
00061 class QTGSTREAMERUI_EXPORT VideoWidget : public QWidget
00062 {
00063     Q_OBJECT
00064 public:
00065     VideoWidget(QWidget *parent = 0, Qt::WindowFlags f = 0);
00066     virtual ~VideoWidget();
00067 
00068 
00072     ElementPtr videoSink() const;
00073 
00081     void setVideoSink(const ElementPtr & sink);
00082 
00086     void releaseVideoSink();
00087 
00088 
00098     void watchPipeline(const PipelinePtr & pipeline);
00099 
00104     void stopPipelineWatch();
00105 
00106 protected:
00107     virtual void paintEvent(QPaintEvent *event);
00108 
00109 private:
00110     AbstractRenderer *d;
00111 };
00112 
00113 } //namespace Ui
00114 } //namespace QGst
00115 
00116 #endif // QGST_UI_VIDEOWIDGET_H
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator