diff -Naur qt-gstreamer-patched/CMakeLists.txt qt-gstreamer/CMakeLists.txt
--- qt-gstreamer-patched/CMakeLists.txt	2013-08-16 10:58:52.872947980 +0200
+++ qt-gstreamer/CMakeLists.txt	2013-08-16 10:58:52.860947844 +0200
@@ -157,7 +157,7 @@
     set(QTGSTREAMER_QTQUICK2_INSTALL_DIR ${QTGSTREAMER_QTQUICK1_INSTALL_DIR})
 else()
     if (USE_QT5)
-        set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/qt5/imports)
+        set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/qt5/qml)
         set(QTGSTREAMER_QTQUICK2_INSTALL_DIR ${QTGSTREAMER_QTQUICK1_INSTALL_DIR})
     else()
         set(QTGSTREAMER_QTQUICK1_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/qt4/imports)
diff -Naur qt-gstreamer-patched/elements/gstqtvideosink/qtvideosinkdelegate.cpp qt-gstreamer/elements/gstqtvideosink/qtvideosinkdelegate.cpp
--- qt-gstreamer-patched/elements/gstqtvideosink/qtvideosinkdelegate.cpp	2013-08-16 10:58:52.872947980 +0200
+++ qt-gstreamer/elements/gstqtvideosink/qtvideosinkdelegate.cpp	2013-08-16 10:58:52.860947844 +0200
@@ -269,6 +269,8 @@
 
     GST_TRACE_OBJECT(m_sink, "updatePaintNode called");
 
+    QMutexLocker bufferLocker(&m_bufferMutex);
+
     if (!m_buffer) {
         // TODO:
         // Show black screen when buffer is empty.
@@ -409,6 +411,8 @@
 
         GST_TRACE_OBJECT(m_sink, "Received buffer %"GST_PTR_FORMAT, bufEvent->buffer);
 
+        QMutexLocker bufferLocker(&m_bufferMutex);
+
         if (m_buffer) {
             //free the previous buffer
             gst_buffer_unref(m_buffer);
diff -Naur qt-gstreamer-patched/elements/gstqtvideosink/qtvideosinkdelegate.h qt-gstreamer/elements/gstqtvideosink/qtvideosinkdelegate.h
--- qt-gstreamer-patched/elements/gstqtvideosink/qtvideosinkdelegate.h	2013-08-16 10:58:52.872947980 +0200
+++ qt-gstreamer/elements/gstqtvideosink/qtvideosinkdelegate.h	2013-08-16 10:58:52.860947844 +0200
@@ -27,6 +27,7 @@
 #include <QEvent>
 #include <QSet>
 #include <QReadWriteLock>
+#include <QMutex>
 
 class QGLContext;
 
@@ -179,6 +180,8 @@
     VideoNode *m_currentVideoNode;
 #endif
 
+    QMutex m_bufferMutex;
+
 protected:
     GstQtVideoSinkBase * const m_sink;
 };
diff -Naur qt-gstreamer-patched/src/CMakeLists.txt qt-gstreamer/src/CMakeLists.txt
--- qt-gstreamer-patched/src/CMakeLists.txt	2013-08-16 10:58:52.868947935 +0200
+++ qt-gstreamer/src/CMakeLists.txt	2013-08-16 10:58:52.856947799 +0200
@@ -56,10 +56,9 @@
 add_subdirectory(QGlib)
 add_subdirectory(QGst)
 
-# Build the QtQuick1 plugin
-if (Qt4or5_Quick1_FOUND)
-    add_subdirectory(qml)
-endif()
+# Build the QtQuick1 and QtQuick2 plugin
+add_subdirectory(qml)
+
 
 # Install the cmake scripts that are used to find the installed library from external projects
 include(CMakePackageConfigHelpers)
diff -Naur qt-gstreamer-patched/src/QGst/Ui/videonode.h qt-gstreamer/src/QGst/Ui/videonode.h
--- qt-gstreamer-patched/src/QGst/Ui/videonode.h	2013-08-16 10:58:52.868947935 +0200
+++ qt-gstreamer/src/QGst/Ui/videonode.h	2013-08-16 10:58:52.856947799 +0200
@@ -29,6 +29,7 @@
 {
 public:
     VideoNode();
+    virtual ~VideoNode() {}
 
     virtual void setCurrentFrame(quint8 *data) = 0;
     virtual void setBufferFormat(const BufferFormat &format) = 0;
diff -Naur qt-gstreamer-patched/src/QGst/Ui/videonode_i420.cpp qt-gstreamer/src/QGst/Ui/videonode_i420.cpp
--- qt-gstreamer-patched/src/QGst/Ui/videonode_i420.cpp	2013-08-16 10:58:52.868947935 +0200
+++ qt-gstreamer/src/QGst/Ui/videonode_i420.cpp	2013-08-16 10:58:52.856947799 +0200
@@ -167,8 +167,27 @@
     }
 
     void setCurrentFrame(quint8 *data) {
-        QMutexLocker lock(&m_frameMutex);
-        m_frame = data;
+
+        QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
+
+        if (m_textureSizeChanged) {
+            if (!m_textureSize.isEmpty())
+                glDeleteTextures(Num_Texture_IDs, m_textureIds);
+            glGenTextures(Num_Texture_IDs, m_textureIds);
+            m_textureSizeChanged = false;
+        }
+
+        if (m_format == GST_VIDEO_FORMAT_YV12)
+            qSwap(m_textureOffsets[1], m_textureOffsets[2]);
+
+
+        functions->glActiveTexture(GL_TEXTURE1);
+        bindTexture(m_textureIds[1], m_textureWidths[1], m_textureHeights[1], data + m_textureOffsets[1]);
+        functions->glActiveTexture(GL_TEXTURE2);
+        bindTexture(m_textureIds[2], m_textureWidths[2], m_textureHeights[2], data + m_textureOffsets[2]);
+        functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
+        bindTexture(m_textureIds[0], m_textureWidths[0], m_textureHeights[0], data + m_textureOffsets[0]);
+
     }
 
     void setTextureSize(QSize size) {
@@ -280,8 +299,6 @@
     QMatrix4x4 m_colorMatrix;
 
     //QVideoFrame m_frame;
-    quint8 *m_frame;
-    QMutex m_frameMutex;
 
     // from TextureProvider class
     GLenum m_textureFormat;
@@ -296,13 +313,10 @@
 VideoMaterial_YUV420::VideoMaterial_YUV420() :
     m_opacity(1.0)
 {
-    qDebug() << "VideoMaterial";
     memset(m_textureIds, 0, sizeof(m_textureIds));
 
     m_textureSizeChanged = true;
 
-    m_frame = 0;
-
     setFlag(Blending, false);
 }
 
@@ -314,8 +328,6 @@
 
     m_textureSizeChanged = true;
 
-    m_frame = 0;
-
     switch (format) {
 #if 0
     //I have no idea what this is - it's not needed currently in this code
@@ -356,39 +368,12 @@
 {
     QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
 
-    QMutexLocker lock(&m_frameMutex);
-
-    if (m_frame) {
-
-        if (m_textureSizeChanged) {
-            if (!m_textureSize.isEmpty())
-                glDeleteTextures(Num_Texture_IDs, m_textureIds);
-            glGenTextures(Num_Texture_IDs, m_textureIds);
-            m_textureSizeChanged = false;
-        }
-
-        if (m_format == GST_VIDEO_FORMAT_YV12)
-            qSwap(m_textureOffsets[1], m_textureOffsets[2]);
-
-
-        functions->glActiveTexture(GL_TEXTURE1);
-        bindTexture(m_textureIds[1], m_textureWidths[1], m_textureHeights[1], m_frame + m_textureOffsets[1]);
-        functions->glActiveTexture(GL_TEXTURE2);
-        bindTexture(m_textureIds[2], m_textureWidths[2], m_textureHeights[2], m_frame + m_textureOffsets[2]);
-        functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
-        bindTexture(m_textureIds[0], m_textureWidths[0], m_textureHeights[0], m_frame + m_textureOffsets[0]);
-
-        m_frame = 0;
-
-    } else {
-        functions->glActiveTexture(GL_TEXTURE1);
-        glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
-        functions->glActiveTexture(GL_TEXTURE2);
-        glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
-        functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
-        glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
-    }
-
+    functions->glActiveTexture(GL_TEXTURE1);
+    glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
+    functions->glActiveTexture(GL_TEXTURE2);
+    glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
+    functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
+    glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
 
 
 
diff -Naur qt-gstreamer-patched/src/QGst/Ui/videonode_rgb.cpp qt-gstreamer/src/QGst/Ui/videonode_rgb.cpp
--- qt-gstreamer-patched/src/QGst/Ui/videonode_rgb.cpp	2013-08-16 10:58:52.868947935 +0200
+++ qt-gstreamer/src/QGst/Ui/videonode_rgb.cpp	2013-08-16 10:58:52.856947799 +0200
@@ -159,8 +159,6 @@
     {
         m_textureSizeChanged = true;
 
-        m_frame = 0;
-
         setFlag(Blending, false);
     }
 
@@ -196,8 +194,36 @@
     }
 
     void setCurrentFrame(quint8 *data) {
-        QMutexLocker lock(&m_frameMutex);
-        m_frame = data;
+        QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
+
+        // create GL Texture
+        if (m_textureSizeChanged) {
+
+            if (!m_textureSize.isEmpty())
+                glDeleteTextures(1, &m_textureId);
+            glGenTextures(1, &m_textureId);
+            m_textureSizeChanged = false;
+        }
+
+        functions->glActiveTexture(GL_TEXTURE0);
+        glBindTexture(GL_TEXTURE_2D, m_textureId);
+
+        glTexImage2D(
+                    GL_TEXTURE_2D,
+                    0,
+                    m_textureInternalFormat,
+                    m_textureWidth,
+                    m_textureHeight,
+                    0,
+                    m_textureFormat,
+                    m_textureType,
+                    data);
+
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
     }
 
     void setTextureSize(QSize size) {
@@ -257,22 +283,22 @@
     void setTextureInfo(GLenum internalFormat, GLuint format, GLenum type, const QSize &size) {
 
 
-//#ifndef QT_OPENGL_ES
-//        //make sure we get 8 bits per component, at least on the desktop GL where we can
-//        switch(internalFormat) {
-//        case GL_RGBA:
-//            internalFormat = GL_RGBA8;
-//            break;
-//        case GL_RGB:
-//            internalFormat = GL_RGB8;
-//            break;
-//        default:
-//            break;
-//        }
-//#endif
+#ifndef QT_OPENGL_ES
+        //make sure we get 8 bits per component, at least on the desktop GL where we can
+        switch(internalFormat) {
+        case GL_RGBA:
+            internalFormat = GL_RGBA8;
+            break;
+        case GL_RGB:
+            internalFormat = GL_RGB8;
+            break;
+        default:
+            break;
+        }
+#endif
 
-        m_textureFormat = internalFormat;
-        m_textureInternalFormat = format;
+        m_textureFormat = format;
+        m_textureInternalFormat = internalFormat;
         m_textureType = type;
 
         m_textureCount = 1;
@@ -289,67 +315,9 @@
     {
         QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
 
-        QMutexLocker lock(&m_frameMutex);
-
+        functions->glActiveTexture(GL_TEXTURE0);
+        glBindTexture(GL_TEXTURE_2D, m_textureId);
 
-        if (m_frame) {
-
-            if (m_textureSizeChanged) {
-                if (!m_textureSize.isEmpty())
-                    glDeleteTextures(1, &m_textureId);
-                glGenTextures(1, &m_textureId);
-                m_textureSizeChanged = false;
-            }
-
-
-            GLint dataType = GL_UNSIGNED_BYTE;
-            GLint dataFormat = GL_RGBA;
-
-            if (m_format == GST_VIDEO_FORMAT_RGB16) {
-                dataType = GL_UNSIGNED_SHORT_5_6_5;
-                dataFormat = GL_RGB;
-            }
-
-//            m_textureInternalFormat = dataFormat;
-//            m_textureFormat = dataFormat;
-//            m_textureType = dataType;
-
-
-//            qDebug() << "datatype: " << dataType;
-//            qDebug() << "dataformat: " << dataFormat;
-//            qDebug() << "texturesize: " << m_textureSize.width() << "x" << m_textureSize.height();
-
-//            qDebug() << "textinternal: " << m_textureInternalFormat;
-//            qDebug() << "texture: " << m_textureFormat;
-//            qDebug() << "type: " << m_textureType;
-//            qDebug() << "texturesize: " << m_textureWidth << "x" << m_textureHeight;
-
-            functions->glActiveTexture(GL_TEXTURE0);
-            glBindTexture(GL_TEXTURE_2D, m_textureId);
-
-            glTexImage2D(
-                        GL_TEXTURE_2D,
-                        0,
-                        m_textureInternalFormat,
-                        m_textureWidth,
-                        m_textureHeight,
-                        0,
-                        m_textureFormat,
-                        m_textureType,
-                        m_frame);
-
-            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-
-            m_frame = 0;
-
-        } else {
-            functions->glActiveTexture(GL_TEXTURE0);
-            glBindTexture(GL_TEXTURE_2D, m_textureId);
-        }
 
 
 
@@ -391,8 +359,6 @@
     }
 
     //QVideoFrame m_frame;
-    quint8 *m_frame;
-    QMutex m_frameMutex;
 
     QSize m_textureSize;
     bool m_textureSizeChanged;
diff -Naur qt-gstreamer-patched/src/qml/CMakeLists.txt qt-gstreamer/src/qml/CMakeLists.txt
--- qt-gstreamer-patched/src/qml/CMakeLists.txt	2013-08-16 10:58:52.868947935 +0200
+++ qt-gstreamer/src/qml/CMakeLists.txt	2013-08-16 10:58:52.856947799 +0200
@@ -1,4 +1,6 @@
-add_subdirectory(quick1)
+if (Qt4or5_Quick1_FOUND)
+    add_subdirectory(quick1)
+endif()
 
 if (USE_QT5)
     add_subdirectory(quick2)
