diff -Naur qt-gstreamer-orig/src/qml/CMakeLists.txt qt-gstreamer/src/qml/CMakeLists.txt
--- qt-gstreamer-orig/src/qml/CMakeLists.txt	2013-06-28 11:29:15.760974868 +0200
+++ qt-gstreamer/src/qml/CMakeLists.txt	2013-06-28 16:48:06.621647582 +0200
@@ -1,27 +1,7 @@
-set(QtGStreamerQuick1_SRCS
-    plugin.cpp
-    videoitem.cpp
-)
+add_subdirectory(quick1)
 
-add_library(QtGStreamerQuick1 MODULE ${QtGStreamerQuick1_SRCS})
-target_link_libraries(QtGStreamerQuick1 ${QTGSTREAMER_UI_LIBRARIES})
-qt4or5_use_modules(QtGStreamerQuick1 Quick1)
-
-if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
-  # On windows with gcc, cmake calls the binary libFOO.dll, but the Qt plugin loader
-  # does not remove the lib prefix when searching for .dlls, unlike what happens on unix
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin libQtGStreamerQuick1")
-else()
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin QtGStreamerQuick1")
+if (USE_QT5)
+    add_subdirectory(quick2)
 endif()
 
-install(TARGETS QtGStreamerQuick1 DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer)
 
-# create a layout similar to the one in ${QTGSTREAMER_QTQUICK1_INSTALL_DIR} for testing
-add_custom_command(TARGET QtGStreamerQuick1 POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer
-    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:QtGStreamerQuick1> ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
diff -Naur qt-gstreamer-orig/src/qml/plugin.cpp qt-gstreamer/src/qml/plugin.cpp
--- qt-gstreamer-orig/src/qml/plugin.cpp	2013-06-28 11:29:15.752974780 +0200
+++ qt-gstreamer/src/qml/plugin.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-/*
-    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
-      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
-
-    This library is free software; you can redistribute it and/or modify
-    it under the terms of the GNU Lesser General Public License as published
-    by the Free Software Foundation; either version 2.1 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "videoitem.h"
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-
-#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
-# define Q_PLUGIN_METADATA(x)
-#endif
-
-class QtGStreamerPlugin : public QDeclarativeExtensionPlugin
-{
-    Q_OBJECT
-    Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerQuick1-0.10")
-public:
-    void registerTypes(const char *uri);
-};
-
-void QtGStreamerPlugin::registerTypes(const char *uri)
-{
-    qmlRegisterType<VideoItem>(uri, 0, 10, "VideoItem");
-    qmlRegisterUncreatableType<QGst::Ui::GraphicsVideoSurface>(uri, 0, 10, "GraphicsVideoSurface",
-        QLatin1String("Creating a QGst::Ui::GraphicsVideoSurface from QML is not supported"));
-}
-
-#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
-Q_EXPORT_PLUGIN2(qtgstPlugin, QtGStreamerPlugin)
-#endif
-
-#include "plugin.moc"
diff -Naur qt-gstreamer-orig/src/qml/quick1/CMakeLists.txt qt-gstreamer/src/qml/quick1/CMakeLists.txt
--- qt-gstreamer-orig/src/qml/quick1/CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick1/CMakeLists.txt	2013-06-28 17:13:50.891073004 +0200
@@ -0,0 +1,27 @@
+set(QtGStreamerQuick1_SRCS
+    plugin.cpp
+    videoitem.cpp
+)
+
+add_library(QtGStreamerQuick1 MODULE ${QtGStreamerQuick1_SRCS})
+target_link_libraries(QtGStreamerQuick1 ${QTGSTREAMER_UI_LIBRARIES})
+qt4or5_use_modules(QtGStreamerQuick1 Quick1)
+
+if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
+  # On windows with gcc, cmake calls the binary libFOO.dll, but the Qt plugin loader
+  # does not remove the lib prefix when searching for .dlls, unlike what happens on unix
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin libQtGStreamerQuick1")
+else()
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin QtGStreamerQuick1")
+endif()
+
+install(TARGETS QtGStreamerQuick1 DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer/QtQuick1)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir DESTINATION ${QTGSTREAMER_QTQUICK1_INSTALL_DIR}/QtGStreamer/QtQuick1)
+
+# create a layout similar to the one in ${QTGSTREAMER_QTQUICK1_INSTALL_DIR} for testing
+add_custom_command(TARGET QtGStreamerQuick1 POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick1
+    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:QtGStreamerQuick1> ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick1/
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick1/
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
diff -Naur qt-gstreamer-orig/src/qml/quick1/plugin.cpp qt-gstreamer/src/qml/quick1/plugin.cpp
--- qt-gstreamer-orig/src/qml/quick1/plugin.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick1/plugin.cpp	2013-06-17 17:20:32.548253585 +0200
@@ -0,0 +1,44 @@
+/*
+    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
+      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include "videoitem.h"
+#include <QtDeclarative/QDeclarativeExtensionPlugin>
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+# define Q_PLUGIN_METADATA(x)
+#endif
+
+class QtGStreamerPlugin : public QDeclarativeExtensionPlugin
+{
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerQuick1-0.10")
+public:
+    void registerTypes(const char *uri);
+};
+
+void QtGStreamerPlugin::registerTypes(const char *uri)
+{
+    qmlRegisterType<VideoItem>(uri, 0, 10, "VideoItem");
+    qmlRegisterUncreatableType<QGst::Ui::GraphicsVideoSurface>(uri, 0, 10, "GraphicsVideoSurface",
+        QLatin1String("Creating a QGst::Ui::GraphicsVideoSurface from QML is not supported"));
+}
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+Q_EXPORT_PLUGIN2(qtgstPlugin, QtGStreamerPlugin)
+#endif
+
+#include "plugin.moc"
diff -Naur qt-gstreamer-orig/src/qml/quick1/videoitem.cpp qt-gstreamer/src/qml/quick1/videoitem.cpp
--- qt-gstreamer-orig/src/qml/quick1/videoitem.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick1/videoitem.cpp	2013-06-28 17:48:21.378531413 +0200
@@ -0,0 +1,45 @@
+/*
+    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
+      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include "videoitem.h"
+#include "../../QGst/Ui/graphicsvideowidget.h"
+
+VideoItem::VideoItem(QDeclarativeItem *parent)
+    : QDeclarativeItem(parent)
+{
+    m_widget = new QGst::Ui::GraphicsVideoWidget(this);
+}
+
+VideoItem::~VideoItem()
+{
+}
+
+QGst::Ui::GraphicsVideoSurface *VideoItem::surface() const
+{
+    return m_widget->surface();
+}
+
+void VideoItem::setSurface(QGst::Ui::GraphicsVideoSurface *surface)
+{
+    m_widget->setSurface(surface);
+}
+
+void VideoItem::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry)
+{
+    m_widget->setGeometry(newGeometry);
+    QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+}
diff -Naur qt-gstreamer-orig/src/qml/quick1/videoitem.h qt-gstreamer/src/qml/quick1/videoitem.h
--- qt-gstreamer-orig/src/qml/quick1/videoitem.h	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick1/videoitem.h	2013-06-28 17:48:08.690387569 +0200
@@ -0,0 +1,42 @@
+/*
+    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
+      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef VIDEOITEM_H
+#define VIDEOITEM_H
+
+#include "../../QGst/Ui/graphicsvideosurface.h"
+#include <QtDeclarative/QDeclarativeItem>
+
+class VideoItem : public QDeclarativeItem
+{
+    Q_OBJECT
+    Q_PROPERTY(QGst::Ui::GraphicsVideoSurface* surface READ surface WRITE setSurface)
+public:
+    explicit VideoItem(QDeclarativeItem *parent = 0);
+    virtual ~VideoItem();
+
+    QGst::Ui::GraphicsVideoSurface *surface() const;
+    void setSurface(QGst::Ui::GraphicsVideoSurface *surface);
+
+protected:
+    virtual void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry);
+
+private:
+    QGst::Ui::GraphicsVideoWidget *m_widget;
+};
+
+#endif // VIDEOITEM_H
diff -Naur qt-gstreamer-orig/src/qml/quick2/basicmediaplayer.cpp qt-gstreamer/src/qml/quick2/basicmediaplayer.cpp
--- qt-gstreamer-orig/src/qml/quick2/basicmediaplayer.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/basicmediaplayer.cpp	2013-07-02 12:10:34.966097515 +0200
@@ -0,0 +1,126 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "basicmediaplayer.h"
+#include "basicmediaplayergstinterface.h"
+
+#include <QGst/ElementFactory>
+#include <QDebug>
+
+BasicMediaPlayer::BasicMediaPlayer(QObject *parent) :
+    AbstractMediaPlayer(parent)
+{
+    m_videoSurface = 0;
+    m_autoPlayEnabled = false;
+    m_gstInterface = new BasicMediaPlayerGstInterface();
+
+    QObject::connect(this, SIGNAL(mediaSourceChanged()),
+            this, SLOT(mediaPreLoading()));
+}
+
+BasicMediaPlayer::~BasicMediaPlayer()
+{
+}
+
+void BasicMediaPlayer::setVideoSink(const QGst::ElementPtr & sink)
+{
+    m_gstInterface->setVideoSink(sink);
+}
+
+QGst::Ui::AbstractVideoSurface* BasicMediaPlayer::videoSurface()
+{
+    return m_videoSurface;
+}
+
+void BasicMediaPlayer::setVideoSurface(QGst::Ui::AbstractVideoSurface *videoSurface)
+{
+    m_videoSurface = videoSurface;
+
+    QGst::ElementPtr videoSink = m_videoSurface->videoSink();
+    m_gstInterface->setVideoSink(videoSink);
+
+    Q_EMIT videoSurfaceChanged();
+}
+
+QUrl BasicMediaPlayer::mediaSource()
+{
+    return m_mediaSource;
+}
+
+void BasicMediaPlayer::setMediaSource(QUrl url)
+{
+    if (url == m_mediaSource)
+        return;
+
+    m_mediaSource = url;
+
+    m_gstInterface->setUri(m_mediaSource.toString());
+
+    Q_EMIT mediaSourceChanged();
+}
+
+bool BasicMediaPlayer::autoplay()
+{
+    return m_autoPlayEnabled;
+}
+
+void BasicMediaPlayer::setAutoPlay(bool autoplayEnabled)
+{
+    if (autoplayEnabled == m_autoPlayEnabled)
+        return;
+
+    m_autoPlayEnabled = autoplayEnabled;
+
+    m_gstInterface->setAutoPlay(m_autoPlayEnabled);
+
+    Q_EMIT autoplayChanged();
+}
+
+void BasicMediaPlayer::play()
+{
+    qDebug() << "Play";
+    m_gstInterface->play();
+
+    Q_EMIT mediaStarted();
+}
+
+void BasicMediaPlayer::pause()
+{
+    qDebug() << "Pause";
+    m_gstInterface->pause();
+
+    Q_EMIT mediaPaused();
+}
+
+
+void BasicMediaPlayer::stop()
+{
+    qDebug() << "Stop";
+    m_gstInterface->stop();
+
+    Q_EMIT mediaStopped();
+}
+
+void BasicMediaPlayer::mediaPreLoading()
+{
+    m_gstInterface->stop();
+    m_gstInterface->play();
+
+    if (!m_autoPlayEnabled)
+        m_gstInterface->pause();
+}
diff -Naur qt-gstreamer-orig/src/qml/quick2/basicmediaplayergstinterface.cpp qt-gstreamer/src/qml/quick2/basicmediaplayergstinterface.cpp
--- qt-gstreamer-orig/src/qml/quick2/basicmediaplayergstinterface.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/basicmediaplayergstinterface.cpp	2013-07-02 12:10:52.258291047 +0200
@@ -0,0 +1,154 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "basicmediaplayergstinterface.h"
+
+#include <QGlib/Connect>
+#include <QGlib/Error>
+#include <QGst/Init>
+#include <QGst/ElementFactory>
+#include <QGst/Bus>
+#include <QGst/Query>
+#include <QGst/ClockTime>
+#include <QGst/Event>
+#include <QGst/StreamVolume>
+
+#include <QtCore/QDebug>
+
+BasicMediaPlayerGstInterface::BasicMediaPlayerGstInterface(QObject *parent) :
+    QObject(parent)
+{
+    QGst::init();
+    m_autoPlayEnabled = false;
+
+    m_pipeline = QGst::ElementFactory::make("playbin2").dynamicCast<QGst::Pipeline>();
+}
+
+BasicMediaPlayerGstInterface::~BasicMediaPlayerGstInterface()
+{
+    if (m_pipeline) {
+        m_pipeline->setState(QGst::StateNull);
+         QGst::BusPtr bus = m_pipeline->bus();
+         bus->removeSignalWatch();
+    }
+}
+
+void BasicMediaPlayerGstInterface::setVideoSink(const QGst::ElementPtr & sink)
+{
+    m_videoSink = sink;
+
+    if (m_pipeline) {
+        m_pipeline->setProperty("video-sink", m_videoSink);
+
+        //watch the bus for messages
+        QGst::BusPtr bus = m_pipeline->bus();
+        bus->addSignalWatch();
+        QGlib::connect(bus, "message", this, &BasicMediaPlayerGstInterface::onBusMessage);
+    } else {
+        qCritical() << "Failed to create the pipeline";
+    }
+
+
+    setUri(m_uri);
+}
+
+
+void BasicMediaPlayerGstInterface::setUri(const QString &url)
+{
+    if (url != m_uri)
+        m_uri = url;
+
+
+    if (m_pipeline && url == m_uri && !url.isEmpty()) {
+        stop();
+        m_pipeline->setProperty("uri", m_uri);
+        if (m_autoPlayEnabled)
+            play();
+    }
+}
+
+QString BasicMediaPlayerGstInterface::getUri()
+{
+    return m_uri;
+}
+
+void BasicMediaPlayerGstInterface::setAutoPlay(bool enableAutoplay)
+{
+    m_autoPlayEnabled = enableAutoplay;
+}
+
+void BasicMediaPlayerGstInterface::play()
+{
+    if (m_pipeline) {
+        m_pipeline->setState(QGst::StatePlaying);
+    }
+}
+
+
+void BasicMediaPlayerGstInterface::pause()
+{
+    if (m_pipeline) {
+        m_pipeline->setState(QGst::StatePaused);
+    }
+}
+
+void BasicMediaPlayerGstInterface::stop()
+{
+    if (m_pipeline) {
+        m_pipeline->setState(QGst::StateNull);
+    }
+}
+
+void BasicMediaPlayerGstInterface::onBusMessage(const QGst::MessagePtr & message)
+{
+    switch (message->type()) {
+    case QGst::MessageEos: //End of stream. We reached the end of the file.
+        stop();
+        break;
+    case QGst::MessageError: //Some error occurred.
+        qCritical() << message.staticCast<QGst::ErrorMessage>()->error();
+        stop();
+        break;
+    case QGst::MessageStateChanged: //The element in message->source() has changed state
+        if (message->source() == m_pipeline) {
+            handlePipelineStateChange(message.staticCast<QGst::StateChangedMessage>());
+        }
+    default:
+        break;
+    }
+}
+
+void BasicMediaPlayerGstInterface::handlePipelineStateChange(const QGst::StateChangedMessagePtr & scm)
+{
+    switch (scm->newState()) {
+    case QGst::StatePlaying:
+        //start the timer when the pipeline starts playing
+//        m_positionTimer.start(100);
+        break;
+    case QGst::StatePaused:
+        //stop the timer when the pipeline pauses
+//        if(scm->oldState() == QGst::StatePlaying) {
+//            m_positionTimer.stop();
+//        }
+        break;
+    default:
+        break;
+    }
+
+    Q_EMIT playbackStateChanged((int)scm->oldState(), (int)scm->newState());
+}
diff -Naur qt-gstreamer-orig/src/qml/quick2/basicmediaplayergstinterface.h qt-gstreamer/src/qml/quick2/basicmediaplayergstinterface.h
--- qt-gstreamer-orig/src/qml/quick2/basicmediaplayergstinterface.h	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/basicmediaplayergstinterface.h	2013-07-02 12:11:05.642440800 +0200
@@ -0,0 +1,60 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef BASICMEDIAPLAYERGSTINTERFACE_H
+#define BASICMEDIAPLAYERGSTINTERFACE_H
+
+#include <QtCore/QObject>
+#include <QGst/Pipeline>
+#include <QGst/Message>
+
+class BasicMediaPlayerGstInterface : public QObject
+{
+    Q_OBJECT
+public:
+    BasicMediaPlayerGstInterface(QObject *parent = 0);
+    ~BasicMediaPlayerGstInterface();
+
+    void setVideoSink(const QGst::ElementPtr & sink);
+
+    void setUri(const QString &url);
+    QString getUri();
+
+    void setAutoPlay(bool enableAutoplay);
+
+    void play();
+    void pause();
+    void stop();
+    
+Q_SIGNALS:
+    void playbackStateChanged(int oldState, int newState);
+    
+public Q_SLOTS:
+
+private:
+    void onBusMessage(const QGst::MessagePtr & message);
+    void handlePipelineStateChange(const QGst::StateChangedMessagePtr & scm);
+    
+    QGst::PipelinePtr m_pipeline;
+    QGst::ElementPtr m_videoSink;
+
+    QString m_uri;
+    bool m_autoPlayEnabled;
+};
+
+#endif // BASICMEDIAPLAYERGSTINTERFACE_H
diff -Naur qt-gstreamer-orig/src/qml/quick2/basicmediaplayer.h qt-gstreamer/src/qml/quick2/basicmediaplayer.h
--- qt-gstreamer-orig/src/qml/quick2/basicmediaplayer.h	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/basicmediaplayer.h	2013-07-02 12:10:41.166166912 +0200
@@ -0,0 +1,78 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef BASICMEDIAPLAYER_H
+#define BASICMEDIAPLAYER_H
+
+#include <QtCore/QUrl>
+#include <QGst/Pipeline>
+#include <QGst/Message>
+
+#include <QGst/Ui/AbstractMediaPlayer>
+
+class BasicMediaPlayerGstInterface;
+
+class BasicMediaPlayer : public QGst::Ui::AbstractMediaPlayer
+{
+    Q_OBJECT
+    Q_PROPERTY(QUrl source READ mediaSource WRITE setMediaSource NOTIFY mediaSourceChanged)
+    Q_PROPERTY(bool autoplay READ autoplay WRITE setAutoPlay NOTIFY autoplayChanged)
+public:
+    explicit BasicMediaPlayer(QObject *parent = 0);
+    virtual ~BasicMediaPlayer();
+
+    /* Reimplemented from QGst::Ui::AbstractMediaPlayer */
+    virtual void setVideoSink(const QGst::ElementPtr & sink);
+    QGst::Ui::AbstractVideoSurface* videoSurface();
+    virtual void setVideoSurface(QGst::Ui::AbstractVideoSurface *videoSurface);
+
+    /* Getter / Setter */
+
+    QUrl mediaSource();
+    void setMediaSource(QUrl url);
+
+    bool autoplay();
+    void setAutoPlay(bool autoplayEnabled);
+
+    /* Functions */
+
+    Q_INVOKABLE void setUri(const QString &url);
+    Q_INVOKABLE void play();
+    Q_INVOKABLE void pause();
+    Q_INVOKABLE void stop();
+
+Q_SIGNALS:
+    void videoSurfaceChanged();
+    void mediaStarted();
+    void mediaPaused();
+    void mediaStopped();
+    void mediaSourceChanged();
+    void autoplayChanged();
+
+private Q_SLOTS:
+    void mediaPreLoading();
+
+private:
+    QUrl m_mediaSource;
+    bool m_autoPlayEnabled;
+
+    BasicMediaPlayerGstInterface *m_gstInterface;
+};
+
+
+#endif // BASICMEDIAPLAYER_H
diff -Naur qt-gstreamer-orig/src/qml/quick2/CMakeLists.txt qt-gstreamer/src/qml/quick2/CMakeLists.txt
--- qt-gstreamer-orig/src/qml/quick2/CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/CMakeLists.txt	2013-06-28 17:59:25.130048222 +0200
@@ -0,0 +1,29 @@
+set(QtGStreamerQuick2_SRCS
+    plugin.cpp
+    videoitem.cpp
+    basicmediaplayer.cpp
+    basicmediaplayergstinterface.cpp
+)
+
+add_library(QtGStreamerQuick2 MODULE ${QtGStreamerQuick2_SRCS})
+target_link_libraries(QtGStreamerQuick2 ${QTGSTREAMER_UI_LIBRARIES})
+qt4or5_use_modules(QtGStreamerQuick2 Quick2)
+
+if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
+  # On windows with gcc, cmake calls the binary libFOO.dll, but the Qt plugin loader
+  # does not remove the lib prefix when searching for .dlls, unlike what happens on unix
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin libQtGStreamerQuick2")
+else()
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qmldir "plugin QtGStreamerQuick2")
+endif()
+
+install(TARGETS QtGStreamerQuick2 DESTINATION ${QTGSTREAMER_QTQUICK2_INSTALL_DIR}/QtGStreamer/QtQuick2)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir DESTINATION ${QTGSTREAMER_QTQUICK2_INSTALL_DIR}/QtGStreamer/QtQuick2)
+
+# create a layout similar to the one in ${QTGSTREAMER_QTQUICK2_INSTALL_DIR} for testing
+add_custom_command(TARGET QtGStreamerQuick2 POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick2
+    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:QtGStreamerQuick2> ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick2/
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/QtGStreamer/QtQuick2/
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
diff -Naur qt-gstreamer-orig/src/qml/quick2/plugin.cpp qt-gstreamer/src/qml/quick2/plugin.cpp
--- qt-gstreamer-orig/src/qml/quick2/plugin.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/plugin.cpp	2013-07-02 12:11:15.914555709 +0200
@@ -0,0 +1,30 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "plugin.h"
+#include "videoitem.h"
+#include "basicmediaplayer.h"
+
+void QtGStreamerPlugin::registerTypes(const char *uri)
+{
+    // @uri org.freedesktop.gstreamer.Qt5GStreamerQuick2-0.10
+    qmlRegisterType<VideoItem>(uri, 0, 10, "VideoItem");
+    qmlRegisterType<BasicMediaPlayer>(uri, 0, 10, "BasicMediaPlayer");
+    qmlRegisterUncreatableType<QGst::Ui::QuickViewVideoSurface>(uri, 0, 10, "QuickViewVideoSurface",
+                                                                QLatin1String("Creating a QGst::Ui::QuickViewVideoSurface from QML is not supported"));
+}
diff -Naur qt-gstreamer-orig/src/qml/quick2/plugin.h qt-gstreamer/src/qml/quick2/plugin.h
--- qt-gstreamer-orig/src/qml/quick2/plugin.h	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/plugin.h	2013-07-02 12:11:22.962634540 +0200
@@ -0,0 +1,32 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PLUGIN_H
+#define PLUGIN_H
+
+#include <QtQml/QQmlExtensionPlugin>
+
+class QtGStreamerPlugin : public QQmlExtensionPlugin
+{
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.freedesktop.gstreamer.Qt5GStreamerQuick2-0.10" FILE "QtGStreamerQuick2.json")
+public:
+    void registerTypes(const char *uri);
+};
+
+#endif // PLUGIN_H
diff -Naur qt-gstreamer-orig/src/qml/quick2/QtGStreamerQuick2.json qt-gstreamer/src/qml/quick2/QtGStreamerQuick2.json
--- qt-gstreamer-orig/src/qml/quick2/QtGStreamerQuick2.json	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/QtGStreamerQuick2.json	2013-06-13 18:28:48.000000000 +0200
@@ -0,0 +1,2 @@
+{}
+
diff -Naur qt-gstreamer-orig/src/qml/quick2/videoitem.cpp qt-gstreamer/src/qml/quick2/videoitem.cpp
--- qt-gstreamer-orig/src/qml/quick2/videoitem.cpp	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/videoitem.cpp	2013-07-02 12:11:37.922801834 +0200
@@ -0,0 +1,210 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "videoitem.h"
+
+#include <QtCore/QDebug>
+#include <QtGui/QOpenGLContext>
+
+VideoItem::VideoItem(QQuickItem *parent) :
+    QQuickItem(parent),
+    m_surface(0),
+    m_player(0),
+    m_fillMode(PreserveAspectFit),
+    m_geometryDirty(true),
+    m_orientation(0)
+{
+    setFlag(ItemHasContents, true);
+
+    m_surface = new QGst::Ui::QuickViewVideoSurface(this, window());
+
+    m_surface->setRepaintItem(this);
+
+    QObject::connect(m_surface, SIGNAL(nativeSizeChanged()),
+            this, SLOT(_updateNativeSize()), Qt::QueuedConnection);
+}
+
+VideoItem::~VideoItem()
+{
+}
+
+QGst::Ui::QuickViewVideoSurface* VideoItem::surface() const
+{
+    return m_surface;
+}
+
+QObject *VideoItem::player()
+{
+    return m_player.data();
+}
+
+void VideoItem::setPlayer(QObject *player)
+{
+    if (player == m_player.data())
+        return;
+
+    m_player = player;
+
+    if (m_player) {
+
+        const QMetaObject *metaObject = m_player.data()->metaObject();
+
+        int videoSurfacePropertyIndex = metaObject->indexOfProperty("videoSurface");
+        if (videoSurfacePropertyIndex != -1) {
+
+            m_player.data()->setProperty("videoSurface",
+                                         QVariant::fromValue<QGst::Ui::AbstractVideoSurface*>(m_surface));
+        }
+    }
+}
+
+VideoItem::FillMode VideoItem::fillMode() const
+{
+    return m_fillMode;
+}
+
+void VideoItem::setFillMode(FillMode mode)
+{
+    if (mode == m_fillMode)
+        return;
+
+    m_fillMode = mode;
+    m_geometryDirty = true;
+    update();
+
+    Q_EMIT fillModeChanged(mode);
+}
+
+int VideoItem::orientation() const
+{
+    return m_orientation;
+}
+
+void VideoItem::setOrientation(int orientation)
+{
+    // Make sure it's a multiple of 90.
+    if (orientation % 90)
+        return;
+
+    // If there's no actual change, return
+    if (m_orientation == orientation)
+        return;
+
+    // If the new orientation is the same effect
+    // as the old one, don't update the video node stuff
+    if ((m_orientation % 360) == (orientation % 360)) {
+        m_orientation = orientation;
+        Q_EMIT orientationChanged();
+        return;
+    }
+
+    m_geometryDirty = true;
+
+    // Otherwise, a new orientation
+    // See if we need to change aspect ratio orientation too
+    bool oldAspect = qIsDefaultAspect(m_orientation);
+    bool newAspect = qIsDefaultAspect(orientation);
+
+    m_orientation = orientation;
+
+    if (oldAspect != newAspect) {
+        m_nativeSize.transpose();
+
+        setImplicitWidth(m_nativeSize.width());
+        setImplicitHeight(m_nativeSize.height());
+
+        // Source rectangle does not change for orientation
+    }
+
+    update();
+    Q_EMIT orientationChanged();
+}
+
+void VideoItem::_updateNativeSize()
+{
+    if (!m_surface)
+        return;
+
+    QSize size = m_surface->nativeSize();
+    if (!qIsDefaultAspect(m_orientation)) {
+        size.transpose();
+    }
+
+    if (m_nativeSize != size) {
+        m_nativeSize = size;
+
+        m_geometryDirty = true;
+
+        setImplicitWidth(size.width());
+        setImplicitHeight(size.height());
+
+//        emit sourceRectChanged();
+    }
+}
+
+/* Based on fill mode and our size, figure out the source/dest rects */
+void VideoItem::_updateGeometry()
+{
+    const QRectF rect(0, 0, width(), height());
+    const QRectF absoluteRect(x(), y(), width(), height());
+
+    if (!m_geometryDirty && m_lastRect == absoluteRect)
+        return;
+
+//    QRectF oldContentRect(m_contentRect);
+
+    m_geometryDirty = false;
+    m_lastRect = absoluteRect;
+
+    if (m_nativeSize.isEmpty()) {
+        //this is necessary for item to receive the
+        //first paint event and configure video surface.
+        m_contentRect = rect;
+    } else if (m_fillMode == Stretch) {
+        m_contentRect = rect;
+    } else if (m_fillMode == PreserveAspectFit || m_fillMode == PreserveAspectCrop) {
+        QSizeF scaled = m_nativeSize;
+        scaled.scale(rect.size(), m_fillMode == PreserveAspectFit ?
+                         Qt::KeepAspectRatio : Qt::KeepAspectRatioByExpanding);
+
+        m_contentRect = QRectF(QPointF(), scaled);
+        m_contentRect.moveCenter(rect.center());
+    }
+
+    if (m_surface)
+        m_surface->updateGeometry(width(), height(), m_orientation, m_contentRect, (Qt::AspectRatioMode)m_fillMode);
+
+//    if (m_contentRect != oldContentRect)
+//        emit contentRectChanged();
+}
+
+QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
+{
+    Q_UNUSED(updatePaintNodeData)
+
+    // Note:
+    // VideoItem::updatePaintNode() is running in a different thread (rendering thread).
+    // In this function the OpenGL context can be accessed with QOpenGLContext::currentContext().
+
+    _updateGeometry();
+
+    if (!m_surface || !m_player)
+        return 0;
+
+    return m_surface->updatePaintNode(oldNode, boundingRect());
+}
diff -Naur qt-gstreamer-orig/src/qml/quick2/videoitem.h qt-gstreamer/src/qml/quick2/videoitem.h
--- qt-gstreamer-orig/src/qml/quick2/videoitem.h	1970-01-01 01:00:00.000000000 +0100
+++ qt-gstreamer/src/qml/quick2/videoitem.h	2013-07-02 12:11:49.850935190 +0200
@@ -0,0 +1,84 @@
+/*
+    Copyright (C) 2013 basysKom GmbH <info@basyskom.com>
+      @author Benjamin Federau <benjamin.federau@basyskom.com>
+
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as published
+    by the Free Software Foundation; either version 2.1 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef VIDEOITEM_H
+#define VIDEOITEM_H
+
+#include <QtQuick/QQuickItem>
+#include <QtCore/QPointer>
+#include <QGst/Ui/QuickViewVideoSurface>
+
+class VideoItem : public QQuickItem
+{
+    Q_OBJECT
+    Q_ENUMS(FillMode)
+    Q_PROPERTY(QObject* player READ player WRITE setPlayer)
+    Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
+    Q_PROPERTY(int orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
+
+public:
+    VideoItem(QQuickItem *parent = 0);
+    ~VideoItem();
+
+    enum FillMode
+    {
+        Stretch            = Qt::IgnoreAspectRatio,
+        PreserveAspectFit  = Qt::KeepAspectRatio,
+        PreserveAspectCrop = Qt::KeepAspectRatioByExpanding
+    };
+
+    QGst::Ui::QuickViewVideoSurface* surface() const;
+
+    QObject* player();
+    void setPlayer(QObject *player);
+
+    FillMode fillMode() const;
+    void setFillMode(FillMode mode);
+
+    int orientation() const;
+    void setOrientation(int);
+
+    QSGNode* updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData);
+
+Q_SIGNALS:
+    void fillModeChanged(VideoItem::FillMode);
+    void orientationChanged();
+
+private Q_SLOTS:
+    void _updateNativeSize();
+    void _updateGeometry();
+
+private:
+    inline bool qIsDefaultAspect(int o) {
+        return (o % 180) == 0;
+    }
+
+    QGst::Ui::QuickViewVideoSurface *m_surface;
+    QPointer<QObject> m_player;
+    FillMode m_fillMode;
+    bool m_geometryDirty;
+    int m_orientation;
+
+    QRectF m_lastRect;      // Cache of last rect to avoid recalculating geometry
+    QRectF m_contentRect;   // Destination pixel coordinates, unclipped
+
+    QSize m_nativeSize;
+
+};
+
+#endif // VIDEOITEM_H
diff -Naur qt-gstreamer-orig/src/qml/videoitem.cpp qt-gstreamer/src/qml/videoitem.cpp
--- qt-gstreamer-orig/src/qml/videoitem.cpp	2013-06-28 11:29:15.760974868 +0200
+++ qt-gstreamer/src/qml/videoitem.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-/*
-    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
-      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
-
-    This library is free software; you can redistribute it and/or modify
-    it under the terms of the GNU Lesser General Public License as published
-    by the Free Software Foundation; either version 2.1 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "videoitem.h"
-#include "../QGst/Ui/graphicsvideowidget.h"
-
-VideoItem::VideoItem(QDeclarativeItem *parent)
-    : QDeclarativeItem(parent)
-{
-    m_widget = new QGst::Ui::GraphicsVideoWidget(this);
-}
-
-VideoItem::~VideoItem()
-{
-}
-
-QGst::Ui::GraphicsVideoSurface *VideoItem::surface() const
-{
-    return m_widget->surface();
-}
-
-void VideoItem::setSurface(QGst::Ui::GraphicsVideoSurface *surface)
-{
-    m_widget->setSurface(surface);
-}
-
-void VideoItem::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry)
-{
-    m_widget->setGeometry(newGeometry);
-    QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
-}
diff -Naur qt-gstreamer-orig/src/qml/videoitem.h qt-gstreamer/src/qml/videoitem.h
--- qt-gstreamer-orig/src/qml/videoitem.h	2013-06-28 11:29:15.764974911 +0200
+++ qt-gstreamer/src/qml/videoitem.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/*
-    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
-      @author George Kiagiadakis <george.kiagiadakis@collabora.com>
-
-    This library is free software; you can redistribute it and/or modify
-    it under the terms of the GNU Lesser General Public License as published
-    by the Free Software Foundation; either version 2.1 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef VIDEOITEM_H
-#define VIDEOITEM_H
-
-#include "../QGst/Ui/graphicsvideosurface.h"
-#include <QtDeclarative/QDeclarativeItem>
-
-class VideoItem : public QDeclarativeItem
-{
-    Q_OBJECT
-    Q_PROPERTY(QGst::Ui::GraphicsVideoSurface* surface READ surface WRITE setSurface)
-public:
-    explicit VideoItem(QDeclarativeItem *parent = 0);
-    virtual ~VideoItem();
-
-    QGst::Ui::GraphicsVideoSurface *surface() const;
-    void setSurface(QGst::Ui::GraphicsVideoSurface *surface);
-
-protected:
-    virtual void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry);
-
-private:
-    QGst::Ui::GraphicsVideoWidget *m_widget;
-};
-
-#endif // VIDEOITEM_H
