QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
videoitem.h
00001 /*
00002     Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
00003       @author George Kiagiadakis <george.kiagiadakis@collabora.com>
00004 
00005     This library is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU Lesser General Public License as published
00007     by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 #ifndef VIDEOITEM_H
00019 #define VIDEOITEM_H
00020 
00021 #include "../QGst/Ui/graphicsvideosurface.h"
00022 #include <QtDeclarative/QDeclarativeItem>
00023 
00024 class VideoItem : public QDeclarativeItem
00025 {
00026     Q_OBJECT
00027     Q_PROPERTY(QGst::Ui::GraphicsVideoSurface* surface READ surface WRITE setSurface)
00028 public:
00029     explicit VideoItem(QDeclarativeItem *parent = 0);
00030     virtual ~VideoItem();
00031 
00032     QGst::Ui::GraphicsVideoSurface *surface() const;
00033     void setSurface(QGst::Ui::GraphicsVideoSurface *surface);
00034 
00035 protected:
00036     virtual void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry);
00037 
00038 private:
00039     QGst::Ui::GraphicsVideoWidget *m_widget;
00040 };
00041 
00042 #endif // VIDEOITEM_H