$ git show --format=fuller --patch-with-stat --summary bf9b6dfc3f6432592330d5bc47f78429568a756a
commit bf9b6dfc3f6432592330d5bc47f78429568a756a
Author: Bernhard Rosenkränzer <bero@lindev.ch>
AuthorDate: Sun Sep 13 02:33:47 2020 +0200
Commit: Bernhard Rosenkränzer <bero@lindev.ch>
CommitDate: Sun Sep 13 02:33:47 2020 +0200
Add upstream patches, fix build in current environment
---
...ink-fix-memory-leak-and-synchronization-i.patch | 4 +-
...ists.txt-actually-require-GStreamer-1.2.0.patch | 4 +-
...nkbase-don-t-use-variable-name-interface-.patch | 4 +-
...against-1.4-the-unit-test-fails-because-i.patch | 4 +-
...ow-supports-animated-PNGs-so-PNG-is-now-a.patch | 4 +-
...taglisttest.cpp-it-appears-tag-lists-remo.patch | 4 +-
...mpty-structure-to-pass-to-gst_message_new.patch | 4 +-
...ementMessage-also-needs-a-valid-structure.patch | 4 +-
...butils-include-directory-to-include-paths.patch | 4 +-
...nd-build-failures-with-boost-1.57-and-moc.patch | 4 +-
...0011-Fix-compilation-with-GStreamer-1.5.1.patch | 4 +-
...-cleanup.patch => 0012-whitespace-cleanup.patch | 4 +-
...r-1.6-the-audio-codec-name-for-FLAC-chang.patch | 4 +-
...-It-appears-there-is-only-one-attachement.patch | 4 +-
...y-must-never-be-set-to-0-once-the-node-is.patch | 4 +-
....8.patch => 0016-Fix-build-with-Clang-3.8.patch | 4 +-
..._new_application-fails-when-passed-a-NULL.patch | 4 +-
...-empty-structure-on-Application-and-Eleme.patch | 42 +
...hen-the-VideoItem-moves-in-the-SceneGraph.patch | 169 +++
...ix-QGst-Memory-bug-on-case-insensitive-fs.patch | 97 ++
0021-Fix-QtGStreamer-lookup-on-Qt5.patch | 36 +
...Gst-Pad-strong-ref-the-event-in-sendEvent.patch | 29 +
...eosink-fix-of-too-much-red-value-in-video.patch | 51 +
...ith-Qt-5.11_beta3-dropping-qt5_use_module.patch | 51 +
...cepainter.cpp-remove-1-for-right-and-bott.patch | 34 +
...al.cpp-Prevent-the-use-of-uninitialized-t.patch | 54 +
...o-not-use-REQUIRED-to-find-PkgConfig-and-.patch | 30 +
...er-Do-not-search-for-plugin-dir-if-gstrea.patch | 32 +
...er-Fix-cases-where-gst.h-and-gstconfig.h-.patch | 61 +
...ER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch | 51 +
0031-Device-DeviceMonitor-support.patch | 1560 ++++++++++++++++++++
0032-DeviceMonitor-example.patch | 468 ++++++
0033-Fix-discoverer-test.patch | 27 +
...lag-in-FindGStreamer-and-FindGStreamerPlu.patch | 125 ++
0035-README-add-maintenance-notice.patch | 65 +
...ompilation-fix-from-https-bugs.kde.org-sh.patch | 4 +-
qt-gstreamer-1.2.0-compile.patch | 24 +
qt-gstreamer.spec | 60 +-
38 files changed, 3081 insertions(+), 57 deletions(-)
rename 0000-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch => 0001-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch (95%)
rename 0001-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch => 0002-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch (97%)
rename 0002-qtglvideosinkbase-don-t-use-variable-name-interface-.patch => 0003-qtglvideosinkbase-don-t-use-variable-name-interface-.patch (97%)
rename 0003-when-built-against-1.4-the-unit-test-fails-because-i.patch => 0004-when-built-against-1.4-the-unit-test-fails-because-i.patch (95%)
rename 0004-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch => 0005-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch (94%)
rename 0005-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch => 0006-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch (93%)
rename 0006-Create-an-empty-structure-to-pass-to-gst_message_new.patch => 0007-Create-an-empty-structure-to-pass-to-gst_message_new.patch (94%)
rename 0007-ElementMessage-also-needs-a-valid-structure.patch => 0008-ElementMessage-also-needs-a-valid-structure.patch (96%)
rename 0008-Add-pbutils-include-directory-to-include-paths.patch => 0009-Add-pbutils-include-directory-to-include-paths.patch (93%)
rename 0009-Workaround-build-failures-with-boost-1.57-and-moc.patch => 0010-Workaround-build-failures-with-boost-1.57-and-moc.patch (93%)
rename 0010-Fix-compilation-with-GStreamer-1.5.1.patch => 0011-Fix-compilation-with-GStreamer-1.5.1.patch (95%)
rename 0011-whitespace-cleanup.patch => 0012-whitespace-cleanup.patch (93%)
rename 0012-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch => 0013-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch (95%)
rename 0013-It-appears-there-is-only-one-attachement.patch => 0014-It-appears-there-is-only-one-attachement.patch (92%)
rename 0014-The-geometry-must-never-be-set-to-0-once-the-node-is.patch => 0015-The-geometry-must-never-be-set-to-0-once-the-node-is.patch (97%)
rename 0015-Fix-build-with-Clang-3.8.patch => 0016-Fix-build-with-Clang-3.8.patch (98%)
rename 0016-gst_message_new_application-fails-when-passed-a-NULL.patch => 0017-gst_message_new_application-fails-when-passed-a-NULL.patch (97%)
create mode 100644 0018-Set-default-empty-structure-on-Application-and-Eleme.patch
create mode 100644 0019-Fix-crash-when-the-VideoItem-moves-in-the-SceneGraph.patch
create mode 100644 0020-Fix-QGst-Memory-bug-on-case-insensitive-fs.patch
create mode 100644 0021-Fix-QtGStreamer-lookup-on-Qt5.patch
create mode 100644 0022-QGst-Pad-strong-ref-the-event-in-sendEvent.patch
create mode 100644 0023-qt5glvideosink-fix-of-too-much-red-value-in-video.patch
create mode 100644 0024-Fix-cmake-with-Qt-5.11_beta3-dropping-qt5_use_module.patch
create mode 100644 0025-openglsurfacepainter.cpp-remove-1-for-right-and-bott.patch
create mode 100644 0026-videomaterial.cpp-Prevent-the-use-of-uninitialized-t.patch
create mode 100644 0027-FindGLIB2-Do-not-use-REQUIRED-to-find-PkgConfig-and-.patch
create mode 100644 0028-FindGStreamer-Do-not-search-for-plugin-dir-if-gstrea.patch
create mode 100644 0029-FindGStreamer-Fix-cases-where-gst.h-and-gstconfig.h-.patch
create mode 100644 0030-Use-GSTREAMER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch
create mode 100644 0031-Device-DeviceMonitor-support.patch
create mode 100644 0032-DeviceMonitor-example.patch
create mode 100644 0033-Fix-discoverer-test.patch
create mode 100644 0034-Fix-QUIET-flag-in-FindGStreamer-and-FindGStreamerPlu.patch
create mode 100644 0035-README-add-maintenance-notice.patch
rename gstreamer-1.16.patch => 0036-QGst-caps-compilation-fix-from-https-bugs.kde.org-sh.patch (92%)
create mode 100644 qt-gstreamer-1.2.0-compile.patch
diff --git a/0000-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch b/0001-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
similarity index 95%
rename from 0000-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
rename to 0001-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
index 478fb25..c6953db 100644
--- a/0000-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
+++ b/0001-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
@@ -1,7 +1,7 @@
From fe3e8979697773c69d98d172f3eea0bf0dd37287 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Tue, 30 Sep 2014 01:11:58 +0300
-Subject: [PATCH 00/16] gstqtvideosink: fix memory leak and synchronization
+Subject: [PATCH 01/36] gstqtvideosink: fix memory leak and synchronization
issue related to buffer reference counting
https://bugzilla.gnome.org/show_bug.cgi?id=736758
@@ -36,5 +36,5 @@ index bda535c..3073e6d 100644
int VideoMaterial::compare(const QSGMaterial *other) const
--
-2.8.3
+2.26.2
diff --git a/0001-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch b/0002-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
similarity index 97%
rename from 0001-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
rename to 0002-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
index cc069af..d46375d 100644
--- a/0001-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
+++ b/0002-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
@@ -1,7 +1,7 @@
From d48430593be88a5199f6f9fd1ead833fb2eb2cc5 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Tue, 30 Sep 2014 01:13:36 +0300
-Subject: [PATCH 01/16] CMakeLists.txt: actually require GStreamer 1.2.0
+Subject: [PATCH 02/36] CMakeLists.txt: actually require GStreamer 1.2.0
---
CMakeLists.txt | 16 ++++++++--------
@@ -47,5 +47,5 @@ index 574e31f..4d3e7dd 100644
find_package(GLIB2)
macro_log_feature(GLIB2_FOUND "GLib" "Required to build QtGLib" "http://www.gtk.org/" TRUE)
--
-2.8.3
+2.26.2
diff --git a/0002-qtglvideosinkbase-don-t-use-variable-name-interface-.patch b/0003-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
similarity index 97%
rename from 0002-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
rename to 0003-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
index 334741c..15d2600 100644
--- a/0002-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
+++ b/0003-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
@@ -1,7 +1,7 @@
From cf09822eeeee802a0314d7b0ef8c5a469558a0d5 Mon Sep 17 00:00:00 2001
From: Jeremie Knuesel <jeremie.knusel@sensefly.com>
Date: Wed, 10 Dec 2014 13:12:17 +0100
-Subject: [PATCH 02/16] qtglvideosinkbase: don't use variable name 'interface'
+Subject: [PATCH 03/36] qtglvideosinkbase: don't use variable name 'interface'
which is a reserved keyword on Windows
Rename 'interface' argument to 'balance_interface' to fix compilation
@@ -55,5 +55,5 @@ index 5cf3381..cfe8bb7 100644
static void colorbalance_set_value(GstColorBalance *balance,
GstColorBalanceChannel *channel,
--
-2.8.3
+2.26.2
diff --git a/0003-when-built-against-1.4-the-unit-test-fails-because-i.patch b/0004-when-built-against-1.4-the-unit-test-fails-because-i.patch
similarity index 95%
rename from 0003-when-built-against-1.4-the-unit-test-fails-because-i.patch
rename to 0004-when-built-against-1.4-the-unit-test-fails-because-i.patch
index 6522401..3d55b42 100644
--- a/0003-when-built-against-1.4-the-unit-test-fails-because-i.patch
+++ b/0004-when-built-against-1.4-the-unit-test-fails-because-i.patch
@@ -1,7 +1,7 @@
From d90bbcd749cfa66a26fcc4dc4de237d40646d791 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Mon, 6 Apr 2015 21:47:43 -0700
-Subject: [PATCH 03/16] when built against 1.4, the unit test fails because it
+Subject: [PATCH 04/36] when built against 1.4, the unit test fails because it
appears the description for flac changed
---
@@ -31,5 +31,5 @@ index cd9c9e0..27e6770 100644
<< makeTag("bitrate", 200000U));
QTest::newRow("numbers07.png")
--
-2.8.3
+2.26.2
diff --git a/0004-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch b/0005-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
similarity index 94%
rename from 0004-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
rename to 0005-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
index 5a80fc2..57878b8 100644
--- a/0004-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
+++ b/0005-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
@@ -1,7 +1,7 @@
From 5037310103254264c0cf8c8be4a24fca30db90a2 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Mon, 6 Apr 2015 21:52:57 -0700
-Subject: [PATCH 04/16] gstreamer now supports animated PNGs, so PNG is now a
+Subject: [PATCH 05/36] gstreamer now supports animated PNGs, so PNG is now a
video-codec
---
@@ -26,5 +26,5 @@ index 27e6770..6fef794 100644
<< baseUrl.resolved(QUrl::fromEncoded("data/numbers07.jpg")) << 0 << QString()
<< QGst::ClockTime(0) << NonSeekable
--
-2.8.3
+2.26.2
diff --git a/0005-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch b/0006-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
similarity index 93%
rename from 0005-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
rename to 0006-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
index 5d3cc4e..58f7fb3 100644
--- a/0005-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
+++ b/0006-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
@@ -1,7 +1,7 @@
From 53220ba158b74cf5d5bf27e03f7892a6629a8d50 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Mon, 6 Apr 2015 21:54:41 -0700
-Subject: [PATCH 05/16] tests/auto/taglisttest.cpp: it appears tag lists remove
+Subject: [PATCH 06/36] tests/auto/taglisttest.cpp: it appears tag lists remove
duplicates, so create a new buffer to make sure the image count is
incremented
@@ -27,5 +27,5 @@ index 31dd1f2..1f649b8 100644
tl.setAttachment(sample2, QGst::TagMergePrepend);
--
-2.8.3
+2.26.2
diff --git a/0006-Create-an-empty-structure-to-pass-to-gst_message_new.patch b/0007-Create-an-empty-structure-to-pass-to-gst_message_new.patch
similarity index 94%
rename from 0006-Create-an-empty-structure-to-pass-to-gst_message_new.patch
rename to 0007-Create-an-empty-structure-to-pass-to-gst_message_new.patch
index 21b184e..fffae8f 100644
--- a/0006-Create-an-empty-structure-to-pass-to-gst_message_new.patch
+++ b/0007-Create-an-empty-structure-to-pass-to-gst_message_new.patch
@@ -1,7 +1,7 @@
From c994209573c5b07e71276938aae212b40943f076 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Tue, 7 Apr 2015 21:15:39 -0700
-Subject: [PATCH 06/16] Create an empty structure to pass to
+Subject: [PATCH 07/36] Create an empty structure to pass to
gst_message_new_application if we don't have a valid one.
When passed a NULL structure gst_message_new_application fails with
@@ -25,5 +25,5 @@ index a252562..3e7bb56 100644
}
--
-2.8.3
+2.26.2
diff --git a/0007-ElementMessage-also-needs-a-valid-structure.patch b/0008-ElementMessage-also-needs-a-valid-structure.patch
similarity index 96%
rename from 0007-ElementMessage-also-needs-a-valid-structure.patch
rename to 0008-ElementMessage-also-needs-a-valid-structure.patch
index b84a834..02e3b9a 100644
--- a/0007-ElementMessage-also-needs-a-valid-structure.patch
+++ b/0008-ElementMessage-also-needs-a-valid-structure.patch
@@ -1,7 +1,7 @@
From f3cc3fd8b40eb1d15987ddccacb2eb60d45d8cf0 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Tue, 7 Apr 2015 21:26:03 -0700
-Subject: [PATCH 07/16] ElementMessage also needs a valid structure
+Subject: [PATCH 08/36] ElementMessage also needs a valid structure
The solution is the same as for ApplicationMessage, and
since it wasn't caught by the unit tests add a unit test.
@@ -48,5 +48,5 @@ index 7a509b7..6fe065a 100644
void RefPointerTest::messageDynamicCastTest()
--
-2.8.3
+2.26.2
diff --git a/0008-Add-pbutils-include-directory-to-include-paths.patch b/0009-Add-pbutils-include-directory-to-include-paths.patch
similarity index 93%
rename from 0008-Add-pbutils-include-directory-to-include-paths.patch
rename to 0009-Add-pbutils-include-directory-to-include-paths.patch
index 949473b..fe6aadb 100644
--- a/0008-Add-pbutils-include-directory-to-include-paths.patch
+++ b/0009-Add-pbutils-include-directory-to-include-paths.patch
@@ -1,7 +1,7 @@
From 77e58dae634fa1b282c64d435d32a2998c671b39 Mon Sep 17 00:00:00 2001
From: Hannes Weisbach <hannes.weisbach@mailbox.tu-dresden.de>
Date: Sun, 7 Jun 2015 13:37:48 +0200
-Subject: [PATCH 08/16] Add pbutils include directory to include paths
+Subject: [PATCH 09/36] Add pbutils include directory to include paths
Add directory with pbutils headers to the include_directories directive
for the auto tests.
@@ -22,5 +22,5 @@ index fd09bf8..6b53366 100644
add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
--
-2.8.3
+2.26.2
diff --git a/0009-Workaround-build-failures-with-boost-1.57-and-moc.patch b/0010-Workaround-build-failures-with-boost-1.57-and-moc.patch
similarity index 93%
rename from 0009-Workaround-build-failures-with-boost-1.57-and-moc.patch
rename to 0010-Workaround-build-failures-with-boost-1.57-and-moc.patch
index 0e0f4bf..4681bd4 100644
--- a/0009-Workaround-build-failures-with-boost-1.57-and-moc.patch
+++ b/0010-Workaround-build-failures-with-boost-1.57-and-moc.patch
@@ -1,7 +1,7 @@
From 1d2edcc9562c8826fd17b5233691f4a313ab71c7 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heirecka@exherbo.org>
Date: Fri, 7 Nov 2014 00:11:02 +0100
-Subject: [PATCH 09/16] Workaround build failures with boost>=1.57 and moc
+Subject: [PATCH 10/36] Workaround build failures with boost>=1.57 and moc
Otherwise I get the following error message:
'usr/include/boost/type_traits/detail/has_binary_operator.hp:50:
@@ -32,5 +32,5 @@ index 9ff6fde..58a3367 100644
namespace QGlib {
--
-2.8.3
+2.26.2
diff --git a/0010-Fix-compilation-with-GStreamer-1.5.1.patch b/0011-Fix-compilation-with-GStreamer-1.5.1.patch
similarity index 95%
rename from 0010-Fix-compilation-with-GStreamer-1.5.1.patch
rename to 0011-Fix-compilation-with-GStreamer-1.5.1.patch
index 64d4bc6..3143a30 100644
--- a/0010-Fix-compilation-with-GStreamer-1.5.1.patch
+++ b/0011-Fix-compilation-with-GStreamer-1.5.1.patch
@@ -1,7 +1,7 @@
From e2ca8094aa8d0eac1c3a98df66fe94ce0c754088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Santamar=C3=ADa?= <panfaust@gmail.com>
Date: Fri, 2 Oct 2015 15:00:29 +0300
-Subject: [PATCH 10/16] Fix compilation with GStreamer >= 1.5.1
+Subject: [PATCH 11/36] Fix compilation with GStreamer >= 1.5.1
apply gstreamer pkg-config definitions To ensure gstreamer builds correctly,
pick up its cflags in FindGstreamer and apply them to the build as definitions
@@ -39,5 +39,5 @@ index dab91ac..fe6cde1 100644
find_library(GSTREAMER_LIBRARY
--
-2.8.3
+2.26.2
diff --git a/0011-whitespace-cleanup.patch b/0012-whitespace-cleanup.patch
similarity index 93%
rename from 0011-whitespace-cleanup.patch
rename to 0012-whitespace-cleanup.patch
index 811af8a..ab5d3ee 100644
--- a/0011-whitespace-cleanup.patch
+++ b/0012-whitespace-cleanup.patch
@@ -1,7 +1,7 @@
From 5c51c6271da6ad67e9cffa701d3f8b1684185bd1 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Wed, 4 Nov 2015 15:35:36 -0800
-Subject: [PATCH 11/16] whitespace cleanup
+Subject: [PATCH 12/36] whitespace cleanup
---
tests/auto/refpointertest.cpp | 2 +-
@@ -21,5 +21,5 @@ index 6fe065a..9a21e03 100644
void RefPointerTest::messageDynamicCastTest()
--
-2.8.3
+2.26.2
diff --git a/0012-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch b/0013-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
similarity index 95%
rename from 0012-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
rename to 0013-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
index 3f3bcf9..867db20 100644
--- a/0012-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
+++ b/0013-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
@@ -1,7 +1,7 @@
From af4edf4cb9d33aa210c2cd670f657b9020bb0eb3 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Wed, 4 Nov 2015 21:53:37 -0800
-Subject: [PATCH 12/16] By GStreamer 1.6 the audio-codec name for FLAC changed
+Subject: [PATCH 13/36] By GStreamer 1.6 the audio-codec name for FLAC changed
from "Free Lossless Audio Codec (FLAC)" to "FLAC", so we need to update to
test for the shorter string.
@@ -32,5 +32,5 @@ index 6fef794..84dd760 100644
<< makeTag("bitrate", 200000U));
QTest::newRow("numbers07.png")
--
-2.8.3
+2.26.2
diff --git a/0013-It-appears-there-is-only-one-attachement.patch b/0014-It-appears-there-is-only-one-attachement.patch
similarity index 92%
rename from 0013-It-appears-there-is-only-one-attachement.patch
rename to 0014-It-appears-there-is-only-one-attachement.patch
index 3275c11..6b99b96 100644
--- a/0013-It-appears-there-is-only-one-attachement.patch
+++ b/0014-It-appears-there-is-only-one-attachement.patch
@@ -1,7 +1,7 @@
From 6fc7f9bda0d9ec7a3c71f54be889ca8c8280f469 Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Sat, 16 Apr 2016 21:42:16 -0700
-Subject: [PATCH 13/16] It appears there is only one attachement.
+Subject: [PATCH 14/36] It appears there is only one attachement.
As far as I can tell from staring at the code it really
does look like there's only one attachment added to the tag
@@ -26,5 +26,5 @@ index 1f649b8..043f930 100644
}
--
-2.8.3
+2.26.2
diff --git a/0014-The-geometry-must-never-be-set-to-0-once-the-node-is.patch b/0015-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
similarity index 97%
rename from 0014-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
rename to 0015-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
index 551793f..77a0b32 100644
--- a/0014-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
+++ b/0015-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
@@ -1,7 +1,7 @@
From af4d94de093b114c5371bda522ec11075ead60ea Mon Sep 17 00:00:00 2001
From: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Date: Sun, 6 Mar 2016 13:50:03 +0100
-Subject: [PATCH 14/16] The geometry must never be set to 0 once the node is
+Subject: [PATCH 15/36] The geometry must never be set to 0 once the node is
added to the SG
The application can crash otherwise.
@@ -86,5 +86,5 @@ index ed9d36f..8ba4c3b 100644
#endif // VIDEONODE_H
--
-2.8.3
+2.26.2
diff --git a/0015-Fix-build-with-Clang-3.8.patch b/0016-Fix-build-with-Clang-3.8.patch
similarity index 98%
rename from 0015-Fix-build-with-Clang-3.8.patch
rename to 0016-Fix-build-with-Clang-3.8.patch
index 29ce357..9fbbbd6 100644
--- a/0015-Fix-build-with-Clang-3.8.patch
+++ b/0016-Fix-build-with-Clang-3.8.patch
@@ -1,7 +1,7 @@
From fc159e5c4c8ffeabdc7319514c6bb19c9c9e1d3b Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Mon, 13 Jun 2016 10:36:34 +0200
-Subject: [PATCH 15/16] Fix build with Clang 3.8
+Subject: [PATCH 16/36] Fix build with Clang 3.8
error: invalid suffix on literal; C++11 requires a space between literal and identifier
@@ -66,5 +66,5 @@ index 118d0a2..a707e02 100644
QCoreApplication::postEvent(sink->delegate, new BaseDelegate::BufferEvent(buffer));
--
-2.8.3
+2.26.2
diff --git a/0016-gst_message_new_application-fails-when-passed-a-NULL.patch b/0017-gst_message_new_application-fails-when-passed-a-NULL.patch
similarity index 97%
rename from 0016-gst_message_new_application-fails-when-passed-a-NULL.patch
rename to 0017-gst_message_new_application-fails-when-passed-a-NULL.patch
index 5183e78..0c9420d 100644
--- a/0016-gst_message_new_application-fails-when-passed-a-NULL.patch
+++ b/0017-gst_message_new_application-fails-when-passed-a-NULL.patch
@@ -1,7 +1,7 @@
From 0384481b2f670b3db1a147a1ac0c5ea24c66554e Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Sat, 21 Mar 2015 13:08:29 -0700
-Subject: [PATCH 16/16] gst_message_new_application fails when passed a NULL
+Subject: [PATCH 17/36] gst_message_new_application fails when passed a NULL
structure
QGst provided a default null structure argument ApplicationMessagePtr::create
@@ -68,5 +68,5 @@ index 9a21e03..3bbca6b 100644
QVERIFY(!msg.dynamicCast<QGst::ApplicationMessage>().isNull());
QVERIFY(msg.dynamicCast<QGst::EosMessage>().isNull());
--
-2.8.3
+2.26.2
diff --git a/0018-Set-default-empty-structure-on-Application-and-Eleme.patch b/0018-Set-default-empty-structure-on-Application-and-Eleme.patch
new file mode 100644
index 0000000..c67eabb
--- /dev/null
+++ b/0018-Set-default-empty-structure-on-Application-and-Eleme.patch
@@ -0,0 +1,42 @@
+From 393ddb4595da77eedc69bcef1319cdd4cb49701b Mon Sep 17 00:00:00 2001
+From: Diane Trout <diane@ghic.org>
+Date: Fri, 17 Mar 2017 10:37:26 -0700
+Subject: [PATCH 18/36] Set default empty structure on Application and Element
+ MesssagePtr
+
+Fix for the fix in Bug 746584.
+
+The fix that was committed causes one test to not build.
+
+At some point it was pointed out I shouldn't arbitrarily break source
+compatibility, so this fixes the build error and makes code written
+before commit 0384481b2f670b3db1a147a1ac0c5ea24c66554e work
+---
+ src/QGst/message.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/QGst/message.h b/src/QGst/message.h
+index 2d66ba1..7ed2bdf 100644
+--- a/src/QGst/message.h
++++ b/src/QGst/message.h
+@@ -205,7 +205,7 @@ class QTGSTREAMER_EXPORT ApplicationMessage : public Message
+ QGST_WRAPPER_FAKE_SUBCLASS(Application, Message)
+ public:
+ static ApplicationMessagePtr create(const ObjectPtr & source,
+- const Structure & structure);
++ const Structure & structure=Structure());
+ };
+
+ /*! \headerfile message.h <QGst/Message>
+@@ -216,7 +216,7 @@ class QTGSTREAMER_EXPORT ElementMessage : public Message
+ QGST_WRAPPER_FAKE_SUBCLASS(Element, Message)
+ public:
+ static ElementMessagePtr create(const ObjectPtr & source,
+- const Structure & structure);
++ const Structure & structure=Structure());
+ };
+
+ //maybe do: SEGMENT_START (internal)
+--
+2.26.2
+
diff --git a/0019-Fix-crash-when-the-VideoItem-moves-in-the-SceneGraph.patch b/0019-Fix-crash-when-the-VideoItem-moves-in-the-SceneGraph.patch
new file mode 100644
index 0000000..64ec131
--- /dev/null
+++ b/0019-Fix-crash-when-the-VideoItem-moves-in-the-SceneGraph.patch
@@ -0,0 +1,169 @@
+From ea0d273008316e875a2f6496c0f5f3fa1fcfb6b8 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Fri, 10 Mar 2017 01:50:33 +0100
+Subject: [PATCH 19/36] Fix crash when the VideoItem moves in the SceneGraph
+
+When the item is recreated it should set the format on the new node,
+otherwise we get the crash.
+
+BUG: 744816
+---
+ .../delegates/qtquick2videosinkdelegate.cpp | 1 +
+ tests/auto/CMakeLists.txt | 9 ++
+ tests/auto/qtquick2test.cpp | 87 +++++++++++++++++++
+ tests/auto/videoitemtest.qml | 20 +++++
+ 4 files changed, 117 insertions(+)
+ create mode 100644 tests/auto/qtquick2test.cpp
+ create mode 100644 tests/auto/videoitemtest.qml
+
+diff --git a/elements/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp b/elements/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp
+index 8cb261f..b4e894a 100644
+--- a/elements/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp
++++ b/elements/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp
+@@ -32,6 +32,7 @@ QSGNode* QtQuick2VideoSinkDelegate::updateNode(QSGNode *node, const QRectF & tar
+ if (!vnode) {
+ GST_INFO_OBJECT(m_sink, "creating new VideoNode");
+ vnode = new VideoNode;
++ m_formatDirty = true;
+ }
+
+ if (!m_buffer) {
+diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
+index 6b53366..dc1cbd8 100644
+--- a/tests/auto/CMakeLists.txt
++++ b/tests/auto/CMakeLists.txt
+@@ -33,3 +33,12 @@ qgst_test(discoverertest)
+ qgst_test(allocatortest)
+ qgst_test(memorytest)
+ qgst_test(padtest)
++
++if(TARGET Qt5GStreamerQuick)
++ add_executable(qtquick2test qtquick2test.cpp)
++ target_link_libraries(qtquick2test Qt5::Qml Qt5GStreamerQuick ${QTGSTREAMER_LIBRARIES})
++ qt4or5_use_modules(qtquick2test Test)
++ add_test(NAME qtquick2test
++ COMMAND cmake -E env QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/src/qml/quick2/:$ENV{QML2_IMPORT_PATH} GST_PLUGIN_PATH=${CMAKE_BINARY_DIR}/elements/gstqtvideosink/:$ENV{GST_PLUGIN_PATH} ${CMAKE_CURRENT_BINARY_DIR}/qtquick2test
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++endif()
+diff --git a/tests/auto/qtquick2test.cpp b/tests/auto/qtquick2test.cpp
+new file mode 100644
+index 0000000..05f1575
+--- /dev/null
++++ b/tests/auto/qtquick2test.cpp
+@@ -0,0 +1,87 @@
++/*
++ Copyright (C) 2017 Aleix Pol Gonzalez <aleixpol@kde.org>
++
++ 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 <QTest>
++#include <QSignalSpy>
++#include <QGst/Init>
++#include <QQmlApplicationEngine>
++#include <QQmlParserStatus>
++#include <QQmlContext>
++#include <QGlib/Connect>
++#include <QGst/Pipeline>
++#include <QGst/Bus>
++#include <QGst/Parse>
++#include <QGst/ElementFactory>
++#include <QGst/Message>
++#include <QGst/Quick/VideoSurface>
++
++
++class QtQuick2Test : public QObject
++{
++ Q_OBJECT
++private:
++ void onBusMessage(const QGst::MessagePtr &msg)
++ {
++ switch (msg->type()) {
++ case QGst::MessageError: //Some error occurred.
++ qCritical() << msg.staticCast<QGst::ErrorMessage>()->error();
++ break;
++ default:
++// qDebug() << msg->type();
++// qDebug() << msg->typeName();
++// qDebug() << msg->internalStructure()->name();
++ break;
++ }
++ }
++
++private Q_SLOTS:
++ void testLaunch();
++};
++
++void QtQuick2Test::testLaunch()
++{
++ QGst::init();
++
++ QQmlApplicationEngine* engine = new QQmlApplicationEngine(this);
++ QGst::Quick::VideoSurface *surface = new QGst::Quick::VideoSurface(this);
++
++ auto source = QGst::ElementFactory::make("videotestsrc", "");
++
++ auto pipeline = QGst::Pipeline::create();
++ auto bus = pipeline->bus();
++ bus->addSignalWatch();
++ QGlib::connect(bus, "message", this, &QtQuick2Test::onBusMessage);
++ pipeline->add(source, surface->videoSink());
++
++ source->link(surface->videoSink());
++
++ pipeline->setState(QGst::StatePlaying);
++
++ engine->rootContext()->setContextProperty("surface1", surface);
++ engine->load(QUrl("videoitemtest.qml"));
++
++ QSignalSpy spy(engine->rootObjects().first(), SIGNAL(frameSwapped()));
++ spy.wait(100);
++
++ pipeline->setState(QGst::StateNull);
++
++ delete engine;
++}
++
++QTEST_MAIN(QtQuick2Test)
++
++#include "qtquick2test.moc"
+diff --git a/tests/auto/videoitemtest.qml b/tests/auto/videoitemtest.qml
+new file mode 100644
+index 0000000..589ca6e
+--- /dev/null
++++ b/tests/auto/videoitemtest.qml
+@@ -0,0 +1,20 @@
++import QtQuick 2.1
++import QtQuick.Window 2.1
++import QtGStreamer 1.0
++
++Window {
++ width: 200
++ height: 200
++ visible: true
++
++ ListView {
++ anchors.fill: parent
++ model: 3
++
++ delegate: VideoItem {
++ width: 100
++ height: 100
++ surface: surface1
++ }
++ }
++}
+--
+2.26.2
+
diff --git a/0020-Fix-QGst-Memory-bug-on-case-insensitive-fs.patch b/0020-Fix-QGst-Memory-bug-on-case-insensitive-fs.patch
new file mode 100644
index 0000000..f9cea1b
--- /dev/null
+++ b/0020-Fix-QGst-Memory-bug-on-case-insensitive-fs.patch
@@ -0,0 +1,97 @@
+From fac0b07d22bcd0ad4ae82651ac430ede500b2d1a Mon Sep 17 00:00:00 2001
+From: ilovezfs <ilovezfs@icloud.com>
+Date: Fri, 6 May 2016 00:52:46 -0700
+Subject: [PATCH 20/36] Fix QGst/Memory bug on case-insensitive fs
+
+"Memory" collides with standard lib's "memory" on case-insensitive
+file systems.
+
+See https://bugzilla.gnome.org/show_bug.cgi?id=763201
+---
+ src/QGst/CMakeLists.txt | 2 +-
+ src/QGst/{Memory => QGstMemory} | 1 -
+ src/QGst/memory.h | 2 +-
+ tests/auto/allocatortest.cpp | 2 +-
+ tests/auto/buffertest.cpp | 2 +-
+ tests/auto/memorytest.cpp | 2 +-
+ 6 files changed, 5 insertions(+), 6 deletions(-)
+ rename src/QGst/{Memory => QGstMemory} (95%)
+
+diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt
+index b780fb8..a13f1f5 100644
+--- a/src/QGst/CMakeLists.txt
++++ b/src/QGst/CMakeLists.txt
+@@ -88,7 +88,7 @@ set(QtGStreamer_INSTALLED_HEADERS
+ buffer.h Buffer
+ sample.h Sample
+ allocator.h Allocator
+- memory.h Memory
++ memory.h QGstMemory
+ event.h Event
+ clocktime.h ClockTime
+ taglist.h TagList
+diff --git a/src/QGst/Memory b/src/QGst/QGstMemory
+similarity index 95%
+rename from src/QGst/Memory
+rename to src/QGst/QGstMemory
+index 8c5815e..b31569d 100644
+--- a/src/QGst/Memory
++++ b/src/QGst/QGstMemory
+@@ -1,2 +1 @@
+ #include "memory.h"
+-
+diff --git a/src/QGst/memory.h b/src/QGst/memory.h
+index b895291..e3faaa8 100644
+--- a/src/QGst/memory.h
++++ b/src/QGst/memory.h
+@@ -41,7 +41,7 @@ private:
+ void *m_object;
+ };
+
+-/*! \headerfile memory.h <QGst/Memory>
++/*! \headerfile memory.h <QGst/QGstMemory>
+ * \brief Wrapper class for GstMemory
+ *
+ * GstMemory is a lightweight refcounted object that wraps a region
+diff --git a/tests/auto/allocatortest.cpp b/tests/auto/allocatortest.cpp
+index 588f1bc..cfb4fc6 100644
+--- a/tests/auto/allocatortest.cpp
++++ b/tests/auto/allocatortest.cpp
+@@ -18,7 +18,7 @@
+ #include "qgsttest.h"
+ #include <QGlib/Error>
+ #include <QGst/Allocator>
+-#include <QGst/Memory>
++#include <QGst/QGstMemory>
+
+ class AllocatorTest : public QGstTest
+ {
+diff --git a/tests/auto/buffertest.cpp b/tests/auto/buffertest.cpp
+index 4a4a55a..2d3a482 100644
+--- a/tests/auto/buffertest.cpp
++++ b/tests/auto/buffertest.cpp
+@@ -17,7 +17,7 @@
+ */
+ #include "qgsttest.h"
+ #include <QGst/Buffer>
+-#include <QGst/Memory>
++#include <QGst/QGstMemory>
+ #include <QGst/Caps>
+
+ class BufferTest : public QGstTest
+diff --git a/tests/auto/memorytest.cpp b/tests/auto/memorytest.cpp
+index 88c4ebb..afa73de 100644
+--- a/tests/auto/memorytest.cpp
++++ b/tests/auto/memorytest.cpp
+@@ -17,7 +17,7 @@
+
+ #include "qgsttest.h"
+ #include <QGlib/Error>
+-#include <QGst/Memory>
++#include <QGst/QGstMemory>
+ #include <QGst/Allocator>
+
+ class MemoryTest : public QGstTest
+--
+2.26.2
+
diff --git a/0021-Fix-QtGStreamer-lookup-on-Qt5.patch b/0021-Fix-QtGStreamer-lookup-on-Qt5.patch
new file mode 100644
index 0000000..2993146
--- /dev/null
+++ b/0021-Fix-QtGStreamer-lookup-on-Qt5.patch
@@ -0,0 +1,36 @@
+From 9740ed6ca478fcac8884f974dba7bc0f4e1d1898 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Tue, 23 Jan 2018 20:35:44 +0000
+Subject: [PATCH 21/36] Fix QtGStreamer lookup on Qt5
+
+No need to look-up the file, it will be in the current
+directory. If there's a different version it will have
+the same set of files. Also it includes the targets file,
+so that we can link against the exported targets as "Qt5GStreamer".
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747247
+---
+ cmake/modules/QtGStreamerConfig.cmake.in | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/cmake/modules/QtGStreamerConfig.cmake.in b/cmake/modules/QtGStreamerConfig.cmake.in
+index 4b1f609..54c5456 100644
+--- a/cmake/modules/QtGStreamerConfig.cmake.in
++++ b/cmake/modules/QtGStreamerConfig.cmake.in
+@@ -67,11 +67,8 @@ endif()
+
+ unset(_QTGSTREAMER_FIND_DEPS_ARGS)
+
+-# include QtGStreamerConfigCommon.cmake from the same directory
+-find_file(_QTGSTREAMER_CONFIG_COMMON_FILE QtGStreamerConfigCommon.cmake
+- PATHS ${_QTGSTREAMER_CONFIG_DIR} NO_DEFAULT_PATH)
+-include(${_QTGSTREAMER_CONFIG_COMMON_FILE})
+-unset(_QTGSTREAMER_CONFIG_COMMON_FILE)
++include("${CMAKE_CURRENT_LIST_DIR}/QtGStreamerConfigCommon.cmake")
++include("${CMAKE_CURRENT_LIST_DIR}/@QTGSTREAMER_PACKAGE_NAME@Targets.cmake")
+
+ # compatibility variable
+ set(QTGSTREAMER_FOUND ${@QTGSTREAMER_PACKAGE_NAME@_FOUND})
+--
+2.26.2
+
diff --git a/0022-QGst-Pad-strong-ref-the-event-in-sendEvent.patch b/0022-QGst-Pad-strong-ref-the-event-in-sendEvent.patch
new file mode 100644
index 0000000..99859d6
--- /dev/null
+++ b/0022-QGst-Pad-strong-ref-the-event-in-sendEvent.patch
@@ -0,0 +1,29 @@
+From 0cf247bfb444973c5c36dde03f17c8192cb60b07 Mon Sep 17 00:00:00 2001
+From: Jeremie Knuesel <jeremie.knusel@sensefly.com>
+Date: Tue, 18 Nov 2014 12:04:43 +0100
+Subject: [PATCH 22/36] QGst::Pad: strong ref() the event in sendEvent()
+
+Just as in Element::sendEvent().
+
+https://bugzilla.gnome.org/show_bug.cgi?id=740319
+---
+ src/QGst/pad.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/QGst/pad.cpp b/src/QGst/pad.cpp
+index 5132460..1a07f0a 100644
+--- a/src/QGst/pad.cpp
++++ b/src/QGst/pad.cpp
+@@ -111,6 +111,9 @@ bool Pad::query(const QueryPtr & query)
+
+ bool Pad::sendEvent(const EventPtr &event)
+ {
++ //Sending an event passes ownership of it, so we need to strong ref() it as we still
++ //hold a pointer to the object, and will release it when the wrapper is cleared.
++ gst_event_ref(event);
+ return gst_pad_send_event(object<GstPad>(), event);
+ }
+
+--
+2.26.2
+
diff --git a/0023-qt5glvideosink-fix-of-too-much-red-value-in-video.patch b/0023-qt5glvideosink-fix-of-too-much-red-value-in-video.patch
new file mode 100644
index 0000000..95dd9b8
--- /dev/null
+++ b/0023-qt5glvideosink-fix-of-too-much-red-value-in-video.patch
@@ -0,0 +1,51 @@
+From 91c9011e901ccd713e225ac85b4c46e1689b98ce Mon Sep 17 00:00:00 2001
+From: Toon Heyrman <toonheyrman@hotmail.com>
+Date: Thu, 27 Apr 2017 16:49:24 +0200
+Subject: [PATCH 23/36] qt5glvideosink: fix of too much red value in video
+
+The red value was too much in the video when using qt5glvideosink.
+This was caused by a wrong color matrix.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=781816
+---
+ elements/gstqtvideosink/painters/openglsurfacepainter.cpp | 6 +++---
+ elements/gstqtvideosink/painters/videomaterial.cpp | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/elements/gstqtvideosink/painters/openglsurfacepainter.cpp b/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
+index 6cae138..c9f2a77 100644
+--- a/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
++++ b/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
+@@ -146,9 +146,9 @@ void OpenGLSurfacePainter::updateColors(int brightness, int contrast, int hue, i
+ #endif
+ case GST_VIDEO_COLOR_MATRIX_BT709:
+ m_colorMatrix *= QMatrix4x4(
+- 1.164, 0.000, 1.793, -0.5727,
+- 1.164, -0.534, -0.213, 0.3007,
+- 1.164, 2.115, 0.000, -1.1302,
++ 1.164, 0.000, 1.793, -0.969,
++ 1.164, -0.213, -0.533, 0.300,
++ 1.164, 2.112, 0.000, -1.129,
+ 0.0, 0.000, 0.000, 1.0000);
+ break;
+ case GST_VIDEO_COLOR_MATRIX_BT601:
+diff --git a/elements/gstqtvideosink/painters/videomaterial.cpp b/elements/gstqtvideosink/painters/videomaterial.cpp
+index 3073e6d..49a2f47 100644
+--- a/elements/gstqtvideosink/painters/videomaterial.cpp
++++ b/elements/gstqtvideosink/painters/videomaterial.cpp
+@@ -384,9 +384,9 @@ void VideoMaterial::updateColors(int brightness, int contrast, int hue, int satu
+ switch (m_colorMatrixType) {
+ case GST_VIDEO_COLOR_MATRIX_BT709:
+ m_colorMatrix *= QMatrix4x4(
+- 1.164, 0.000, 1.793, -0.5727,
+- 1.164, -0.534, -0.213, 0.3007,
+- 1.164, 2.115, 0.000, -1.1302,
++ 1.164, 0.000, 1.793, -0.969,
++ 1.164, -0.213, -0.533, 0.300,
++ 1.164, 2.112, 0.000, -1.129,
+ 0.0, 0.000, 0.000, 1.0000);
+ break;
+ case GST_VIDEO_COLOR_MATRIX_BT601:
+--
+2.26.2
+
diff --git a/0024-Fix-cmake-with-Qt-5.11_beta3-dropping-qt5_use_module.patch b/0024-Fix-cmake-with-Qt-5.11_beta3-dropping-qt5_use_module.patch
new file mode 100644
index 0000000..6af9223
--- /dev/null
+++ b/0024-Fix-cmake-with-Qt-5.11_beta3-dropping-qt5_use_module.patch
@@ -0,0 +1,51 @@
+From 1967da1ffcf04eddbc250c65d6f6efce4b77fe4b Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 15 Apr 2018 23:46:50 +0200
+Subject: [PATCH 24/36] Fix cmake with Qt 5.11_beta3 (dropping qt5_use_modules)
+
+https://bugzilla.gnome.org/show_bug.cgi?id=795285
+---
+ cmake/modules/FindQt4or5.cmake | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/modules/FindQt4or5.cmake b/cmake/modules/FindQt4or5.cmake
+index 855a48e..d73b3a2 100644
+--- a/cmake/modules/FindQt4or5.cmake
++++ b/cmake/modules/FindQt4or5.cmake
+@@ -49,6 +49,16 @@ macro(_qt4or5_component_names_to_qt_components output_list)
+ list(REMOVE_DUPLICATES ${output_list})
+ endmacro()
+
++macro(_qt5_component_names_to_target_link_libaries output_list)
++ foreach(module ${ARGN})
++ _qt4or5_component_name_to_qt_component(qt_component ${module})
++ list(APPEND ${output_list} Qt5::${qt_component})
++ unset(qt_component)
++ endforeach()
++
++ list(REMOVE_DUPLICATES ${output_list})
++endmacro()
++
+ if (Qt4or5_FIND_QUIETLY)
+ set(_Qt4or5_FIND_PACKAGE_ARGS QUIET)
+ endif()
+@@ -195,13 +205,13 @@ function(qt4or5_use_modules _target _link_type)
+ set(modules ${_link_type} ${ARGN})
+ endif()
+
+- _qt4or5_component_names_to_qt_components(real_modules ${modules})
+-
+ # Verify that Qt5 was found before using qt5_* macros,
+ # otherwise cmake will bail out if they are undefined.
+ if (${QT_VERSION} STREQUAL "5" AND Qt5Core_FOUND)
+- qt5_use_modules(${_target} ${link_type} ${real_modules})
++ _qt5_component_names_to_target_link_libaries(real_modules ${modules})
++ target_link_libraries(${_target} ${link_type} ${real_modules})
+ elseif (${QT_VERSION} STREQUAL "4")
++ _qt4or5_component_names_to_qt_components(real_modules ${modules})
+ qt4_use_modules(${_target} ${link_type} ${real_modules})
+ endif()
+ endfunction()
+--
+2.26.2
+
diff --git a/0025-openglsurfacepainter.cpp-remove-1-for-right-and-bott.patch b/0025-openglsurfacepainter.cpp-remove-1-for-right-and-bott.patch
new file mode 100644
index 0000000..74f68c7
--- /dev/null
+++ b/0025-openglsurfacepainter.cpp-remove-1-for-right-and-bott.patch
@@ -0,0 +1,34 @@
+From 088acb70e969f8ece8986cf2ab0c2f4ac1379f48 Mon Sep 17 00:00:00 2001
+From: Jeremie Knuesel <jeremie.knusel@sensefly.com>
+Date: Fri, 11 Apr 2014 12:03:26 +0200
+Subject: [PATCH 25/36] openglsurfacepainter.cpp: remove '+1' for right and
+ bottom in QRECT_TO_GLMATRIX
+
+The '+1' calculation is wrong now that QRectF is used instead of QRect.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=740326
+---
+ elements/gstqtvideosink/painters/openglsurfacepainter.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/elements/gstqtvideosink/painters/openglsurfacepainter.cpp b/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
+index c9f2a77..51afab2 100644
+--- a/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
++++ b/elements/gstqtvideosink/painters/openglsurfacepainter.cpp
+@@ -37,10 +37,10 @@
+
+ #define QRECT_TO_GLMATRIX(rect) \
+ { \
+- GLfloat(rect.left()) , GLfloat(rect.bottom() + 1), \
+- GLfloat(rect.right() + 1), GLfloat(rect.bottom() + 1), \
++ GLfloat(rect.left()) , GLfloat(rect.bottom()), \
++ GLfloat(rect.right()), GLfloat(rect.bottom()), \
+ GLfloat(rect.left()) , GLfloat(rect.top()), \
+- GLfloat(rect.right() + 1), GLfloat(rect.top()) \
++ GLfloat(rect.right()), GLfloat(rect.top()) \
+ }
+
+ OpenGLSurfacePainter::OpenGLSurfacePainter()
+--
+2.26.2
+
diff --git a/0026-videomaterial.cpp-Prevent-the-use-of-uninitialized-t.patch b/0026-videomaterial.cpp-Prevent-the-use-of-uninitialized-t.patch
new file mode 100644
index 0000000..d1cb460
--- /dev/null
+++ b/0026-videomaterial.cpp-Prevent-the-use-of-uninitialized-t.patch
@@ -0,0 +1,54 @@
+From 49a030719452f44042d008b2018af246d120fb07 Mon Sep 17 00:00:00 2001
+From: Vincent Dehors <vincent.dehors@openwide.fr>
+Date: Fri, 4 May 2018 15:08:47 +0300
+Subject: [PATCH 26/36] videomaterial.cpp: Prevent the use of uninitialized
+ textures for RGB formats
+
+https://bugzilla.gnome.org/show_bug.cgi?id=751770
+---
+ .../gstqtvideosink/painters/videomaterial.cpp | 24 ++++++++++++-------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/elements/gstqtvideosink/painters/videomaterial.cpp b/elements/gstqtvideosink/painters/videomaterial.cpp
+index 49a2f47..7221aa5 100644
+--- a/elements/gstqtvideosink/painters/videomaterial.cpp
++++ b/elements/gstqtvideosink/painters/videomaterial.cpp
+@@ -414,19 +414,27 @@ void VideoMaterial::bind()
+ if (frame) {
+ GstMapInfo info;
+ gst_buffer_map(frame, &info, GST_MAP_READ);
+- functions->glActiveTexture(GL_TEXTURE1);
+- bindTexture(1, info.data);
+- functions->glActiveTexture(GL_TEXTURE2);
+- bindTexture(2, info.data);
++ if (m_textureCount > 1) {
++ functions->glActiveTexture(GL_TEXTURE1);
++ bindTexture(1, info.data);
++ }
++ if (m_textureCount > 2) {
++ functions->glActiveTexture(GL_TEXTURE2);
++ bindTexture(2, info.data);
++ }
+ functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
+ bindTexture(0, info.data);
+ gst_buffer_unmap(frame, &info);
+ gst_buffer_unref(frame);
+ } else {
+- functions->glActiveTexture(GL_TEXTURE1);
+- glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
+- functions->glActiveTexture(GL_TEXTURE2);
+- glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
++ if (m_textureCount > 1) {
++ functions->glActiveTexture(GL_TEXTURE1);
++ glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
++ }
++ if (m_textureCount > 2) {
++ 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]);
+ }
+--
+2.26.2
+
diff --git a/0027-FindGLIB2-Do-not-use-REQUIRED-to-find-PkgConfig-and-.patch b/0027-FindGLIB2-Do-not-use-REQUIRED-to-find-PkgConfig-and-.patch
new file mode 100644
index 0000000..d28444d
--- /dev/null
+++ b/0027-FindGLIB2-Do-not-use-REQUIRED-to-find-PkgConfig-and-.patch
@@ -0,0 +1,30 @@
+From 13a6c5337b5f4407159c3d6aaea194c188c162a5 Mon Sep 17 00:00:00 2001
+From: "Daniele E. Domenichelli" <daniele.domenichelli@iit.it>
+Date: Mon, 9 Oct 2017 13:19:39 +0200
+Subject: [PATCH 27/36] FindGLIB2: Do not use REQUIRED to find PkgConfig and
+ glib-2.0
+
+---
+ cmake/modules/FindGLIB2.cmake | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake
+index 54ac2e7..b608ab1 100644
+--- a/cmake/modules/FindGLIB2.cmake
++++ b/cmake/modules/FindGLIB2.cmake
+@@ -17,8 +17,10 @@ if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
+ endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
+
+ if (NOT WIN32)
+- find_package(PkgConfig REQUIRED)
+- pkg_check_modules(PKG_GLIB REQUIRED glib-2.0)
++ find_package(PkgConfig QUIET)
++ if(PKG_CONFIG_FOUND)
++ pkg_check_modules(PKG_GLIB QUIET glib-2.0)
++ endif()
+ endif(NOT WIN32)
+
+ find_path(GLIB2_MAIN_INCLUDE_DIR glib.h
+--
+2.26.2
+
diff --git a/0028-FindGStreamer-Do-not-search-for-plugin-dir-if-gstrea.patch b/0028-FindGStreamer-Do-not-search-for-plugin-dir-if-gstrea.patch
new file mode 100644
index 0000000..0981825
--- /dev/null
+++ b/0028-FindGStreamer-Do-not-search-for-plugin-dir-if-gstrea.patch
@@ -0,0 +1,32 @@
+From 6d3282c28340c688e7749c99c29b8f8f7065a418 Mon Sep 17 00:00:00 2001
+From: "Daniele E. Domenichelli" <daniele.domenichelli@iit.it>
+Date: Tue, 10 Oct 2017 09:24:16 +0200
+Subject: [PATCH 28/36] FindGStreamer: Do not search for plugin dir if
+ gstreamer was not found
+
+---
+ cmake/modules/FindGStreamer.cmake | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake
+index fe6cde1..1981a07 100644
+--- a/cmake/modules/FindGStreamer.cmake
++++ b/cmake/modules/FindGStreamer.cmake
+@@ -33,9 +33,11 @@ find_package(PkgConfig)
+
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(PKG_GSTREAMER gstreamer-${GSTREAMER_ABI_VERSION})
+- exec_program(${PKG_CONFIG_EXECUTABLE}
+- ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION}
+- OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR)
++ if(PKG_GSTREAMER_FOUND)
++ exec_program(${PKG_CONFIG_EXECUTABLE}
++ ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION}
++ OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR)
++ endif()
+ set(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS})
+ endif()
+
+--
+2.26.2
+
diff --git a/0029-FindGStreamer-Fix-cases-where-gst.h-and-gstconfig.h-.patch b/0029-FindGStreamer-Fix-cases-where-gst.h-and-gstconfig.h-.patch
new file mode 100644
index 0000000..81a5d56
--- /dev/null
+++ b/0029-FindGStreamer-Fix-cases-where-gst.h-and-gstconfig.h-.patch
@@ -0,0 +1,61 @@
+From 08659a08a39ce6c91df475d366fb7be6500e7ed3 Mon Sep 17 00:00:00 2001
+From: "Daniele E. Domenichelli" <daniele.domenichelli@iit.it>
+Date: Thu, 12 Oct 2017 12:23:14 +0200
+Subject: [PATCH 29/36] FindGStreamer: Fix cases where gst.h and gstconfig.h
+ are not in the same folder
+
+---
+ cmake/modules/FindGStreamer.cmake | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake
+index 1981a07..2c61cec 100644
+--- a/cmake/modules/FindGStreamer.cmake
++++ b/cmake/modules/FindGStreamer.cmake
+@@ -2,7 +2,8 @@
+ # Once done this will define
+ #
+ # GSTREAMER_FOUND - system has GStreamer
+-# GSTREAMER_INCLUDE_DIR - the GStreamer include directory
++# GSTREAMER_INCLUDE_DIR - the GStreamer main include directory
++# GSTREAMER_INCLUDE_DIRS - the GStreamer include directories
+ # GSTREAMER_LIBRARY - the main GStreamer library
+ # GSTREAMER_PLUGIN_DIR - the GStreamer plugin directory
+ #
+@@ -50,6 +51,14 @@ find_path(GSTREAMER_INCLUDE_DIR
+ HINTS ${PKG_GSTREAMER_INCLUDE_DIRS} ${PKG_GSTREAMER_INCLUDEDIR}
+ PATH_SUFFIXES gstreamer-${GSTREAMER_ABI_VERSION})
+
++find_path(GSTREAMER_gstconfig_INCLUDE_DIR
++ gst/gstconfig.h
++ HINTS ${PKG_GSTREAMER_INCLUDE_DIRS} ${PKG_GSTREAMER_INCLUDEDIR}
++ PATH_SUFFIXES gstreamer-${GSTREAMER_ABI_VERSION})
++
++set(GSTREAMER_INCLUDE_DIRS ${GSTREAMER_INCLUDE_DIR} ${GSTREAMER_gstconfig_INCLUDE_DIR})
++list(REMOVE_DUPLICATES GSTREAMER_INCLUDE_DIRS)
++
+ if (PKG_GSTREAMER_PLUGIN_DIR)
+ set(_GSTREAMER_PLUGIN_DIR ${PKG_GSTREAMER_PLUGIN_DIR})
+ else()
+@@ -60,7 +69,10 @@ endif()
+ set(GSTREAMER_PLUGIN_DIR ${_GSTREAMER_PLUGIN_DIR}
+ CACHE PATH "The path to the gstreamer plugins installation directory")
+
+-mark_as_advanced(GSTREAMER_LIBRARY GSTREAMER_INCLUDE_DIR GSTREAMER_PLUGIN_DIR)
++mark_as_advanced(GSTREAMER_LIBRARY
++ GSTREAMER_INCLUDE_DIR
++ GSTREAMER_gstconfig_INCLUDE_DIR
++ GSTREAMER_PLUGIN_DIR)
+
+
+ # Find additional libraries
+@@ -131,5 +143,5 @@ endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(GStreamer DEFAULT_MSG
+- GSTREAMER_LIBRARY GSTREAMER_INCLUDE_DIR
++ GSTREAMER_LIBRARY GSTREAMER_INCLUDE_DIRS
+ GSTREAMER_VERSION_COMPATIBLE ${_GSTREAMER_EXTRA_VARIABLES})
+--
+2.26.2
+
diff --git a/0030-Use-GSTREAMER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch b/0030-Use-GSTREAMER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch
new file mode 100644
index 0000000..8eee1b8
--- /dev/null
+++ b/0030-Use-GSTREAMER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch
@@ -0,0 +1,51 @@
+From 49bef1a1f1b383b2ada61c1fa84a836195d79ea2 Mon Sep 17 00:00:00 2001
+From: "Daniele E. Domenichelli" <daniele.domenichelli@iit.it>
+Date: Fri, 13 Oct 2017 00:52:36 +0200
+Subject: [PATCH 30/36] Use GSTREAMER_INCLUDE_DIRS instead of
+ GSTREAMER_INCLUDE_DIR
+
+---
+ elements/CMakeLists.txt | 2 +-
+ src/QGst/CMakeLists.txt | 2 +-
+ tests/auto/CMakeLists.txt | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/elements/CMakeLists.txt b/elements/CMakeLists.txt
+index bfa7f65..242d082 100644
+--- a/elements/CMakeLists.txt
++++ b/elements/CMakeLists.txt
+@@ -8,7 +8,7 @@ add_definitions(-DPACKAGE="qt-gstreamer"
+ -DGST_DISABLE_XML
+ -DGST_DISABLE_LOADSAVE)
+
+-include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR})
++include_directories(${GSTREAMER_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIR})
+
+ if (GSTREAMER_BASE_LIBRARY_FOUND AND GSTREAMER_VIDEO_LIBRARY_FOUND)
+ include_directories(${GSTREAMER_BASE_INCLUDE_DIR} ${GSTREAMER_VIDEO_INCLUDE_DIR})
+diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt
+index a13f1f5..f7bc74e 100644
+--- a/src/QGst/CMakeLists.txt
++++ b/src/QGst/CMakeLists.txt
+@@ -140,7 +140,7 @@ set(QTGSTREAMER_QUICK_SOVERSION 0)
+ set(QTGSTREAMER_UI_SOVERSION 0)
+ set(QTGSTREAMER_UTILS_SOVERSION 0)
+ include_directories(
+- ${GSTREAMER_INCLUDE_DIR}
++ ${GSTREAMER_INCLUDE_DIRS}
+ ${GSTREAMER_AUDIO_INCLUDE_DIR}
+ ${GSTREAMER_VIDEO_INCLUDE_DIR}
+ ${GSTREAMER_BASE_INCLUDE_DIR}
+diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
+index dc1cbd8..d395450 100644
+--- a/tests/auto/CMakeLists.txt
++++ b/tests/auto/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include_directories(${GSTREAMER_INCLUDE_DIR} ${GSTREAMER_PBUTILS_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${QTGSTREAMER_INCLUDES})
++include_directories(${GSTREAMER_INCLUDE_DIRS} ${GSTREAMER_PBUTILS_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${QTGSTREAMER_INCLUDES})
+ add_definitions(${QTGSTREAMER_DEFINITIONS} -DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE)
+ add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
+--
+2.26.2
+
diff --git a/0031-Device-DeviceMonitor-support.patch b/0031-Device-DeviceMonitor-support.patch
new file mode 100644
index 0000000..4ac0c29
--- /dev/null
+++ b/0031-Device-DeviceMonitor-support.patch
@@ -0,0 +1,1560 @@
+From 437a3ae0e0548f5db7515341728a77a4e852ff80 Mon Sep 17 00:00:00 2001
+From: Pavel Bludov <pbludov@gmail.com>
+Date: Fri, 23 Oct 2015 14:56:26 +0800
+Subject: [PATCH 31/36] Device & DeviceMonitor support
+
+---
+ src/QGst/CMakeLists.txt | 4 +
+ src/QGst/Device | 1 +
+ src/QGst/DeviceMonitor | 1 +
+ src/QGst/device.cpp | 60 +++
+ src/QGst/device.h | 50 ++
+ src/QGst/devicemonitor.cpp | 71 +++
+ src/QGst/devicemonitor.h | 53 +++
+ src/QGst/enums.h | 9 +
+ src/QGst/gen.cpp | 909 +++++++++++++++++++------------------
+ src/QGst/global.h | 4 +
+ src/QGst/message.cpp | 30 ++
+ src/QGst/message.h | 27 ++
+ 12 files changed, 786 insertions(+), 433 deletions(-)
+ create mode 100644 src/QGst/Device
+ create mode 100644 src/QGst/DeviceMonitor
+ create mode 100644 src/QGst/device.cpp
+ create mode 100644 src/QGst/device.h
+ create mode 100644 src/QGst/devicemonitor.cpp
+ create mode 100644 src/QGst/devicemonitor.h
+
+diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt
+index f7bc74e..901ff03 100644
+--- a/src/QGst/CMakeLists.txt
++++ b/src/QGst/CMakeLists.txt
+@@ -34,6 +34,8 @@ set(QtGStreamer_SRCS
+ bufferlist.cpp
+ discoverer.cpp
+ segment.cpp
++ device.cpp
++ devicemonitor.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/gen.cpp
+ )
+
+@@ -95,6 +97,8 @@ set(QtGStreamer_INSTALLED_HEADERS
+ bufferlist.h BufferList
+ discoverer.h Discoverer
+ segment.h Segment
++ device.h Device
++ devicemonitor.h DeviceMonitor
+
+ Ui/global.h
+ Ui/videowidget.h Ui/VideoWidget
+diff --git a/src/QGst/Device b/src/QGst/Device
+new file mode 100644
+index 0000000..155c911
+--- /dev/null
++++ b/src/QGst/Device
+@@ -0,0 +1 @@
++#include "device.h"
+diff --git a/src/QGst/DeviceMonitor b/src/QGst/DeviceMonitor
+new file mode 100644
+index 0000000..ce319e6
+--- /dev/null
++++ b/src/QGst/DeviceMonitor
+@@ -0,0 +1 @@
++#include "devicemonitor.h"
+diff --git a/src/QGst/device.cpp b/src/QGst/device.cpp
+new file mode 100644
+index 0000000..2efb912
+--- /dev/null
++++ b/src/QGst/device.cpp
+@@ -0,0 +1,60 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 "device.h"
++#include "caps.h"
++#include "element.h"
++#include "../QGlib/string_p.h"
++#include <QtCore/QDebug>
++#include <gst/gst.h>
++
++namespace QGst {
++
++ElementPtr Device::createElement(const char* name) const
++{
++ GstElement *e = gst_device_create_element(object<GstDevice>(), name);
++ if (e) {
++ gst_object_ref_sink(e);
++ }
++ return ElementPtr::wrap(e, false);
++}
++
++CapsPtr Device::caps() const
++{
++ return CapsPtr::wrap(gst_device_get_caps(object<GstDevice>()), false);
++}
++
++QString Device::deviceClass() const
++{
++ return QGlib::Private::stringFromGCharPtr(gst_device_get_device_class(object<GstDevice>()));
++}
++
++QString Device::displayName() const
++{
++ return QGlib::Private::stringFromGCharPtr(gst_device_get_display_name(object<GstDevice>()));
++}
++
++bool Device::hasClasses(const char *classes) const
++{
++ return gst_device_has_classes(object<GstDevice>(), classes);
++}
++
++bool Device::reconfigureElement(const ElementPtr & element) const
++{
++ return gst_device_reconfigure_element(object<GstDevice>(), element);
++}
++
++} //namespace QGst
+diff --git a/src/QGst/device.h b/src/QGst/device.h
+new file mode 100644
+index 0000000..e1692d5
+--- /dev/null
++++ b/src/QGst/device.h
+@@ -0,0 +1,50 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 QGST_DEVICE_H
++#define QGST_DEVICE_H
++
++#include "object.h"
++
++namespace QGst {
++
++ /*! \headerfile device.h <QGst/Device>
++ * \brief Wrapper class for GstDevice
++ *
++ * Device are objects representing a hardware device, they contain relevant
++ * metadata about the device, such as its class and the Caps representing
++ * the media types it can produce or handle.
++ *
++ */
++class QTGSTREAMER_EXPORT Device : public Object
++{
++ QGST_WRAPPER(Device)
++public:
++ QString displayName() const;
++ CapsPtr caps() const;
++
++ ElementPtr createElement(const char* name) const;
++ bool reconfigureElement(const ElementPtr & element) const;
++
++ QString deviceClass() const;
++ bool hasClasses(const char *classes) const;
++};
++
++} //namespace QGst
++
++QGST_REGISTER_TYPE(QGst::Device)
++
++#endif
+diff --git a/src/QGst/devicemonitor.cpp b/src/QGst/devicemonitor.cpp
+new file mode 100644
+index 0000000..d424e56
+--- /dev/null
++++ b/src/QGst/devicemonitor.cpp
+@@ -0,0 +1,71 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 "global.h"
++#include "devicemonitor.h"
++#include <gst/gst.h>
++
++namespace QGst {
++
++//static
++DeviceMonitorPtr DeviceMonitor::create()
++{
++ GstDeviceMonitor *m = gst_device_monitor_new();
++ if (m) {
++ gst_object_ref_sink(m);
++ }
++ return DeviceMonitorPtr::wrap(m, false);
++}
++
++BusPtr DeviceMonitor::bus() const
++{
++ return BusPtr::wrap(gst_device_monitor_get_bus(object<GstDeviceMonitor>()), false);
++}
++
++quint32 DeviceMonitor::addFilter(const char* classes, const CapsPtr & caps)
++{
++ return gst_device_monitor_add_filter(object<GstDeviceMonitor>(), classes, caps);
++}
++
++bool DeviceMonitor::removeFilter(quint32 filterId)
++{
++ return gst_device_monitor_remove_filter(object<GstDeviceMonitor>(), filterId);
++}
++
++bool DeviceMonitor::start()
++{
++ return gst_device_monitor_start(object<GstDeviceMonitor>());
++}
++
++void DeviceMonitor::stop()
++{
++ gst_device_monitor_stop(object<GstDeviceMonitor>());
++}
++
++QList<DevicePtr> DeviceMonitor::devices() const
++{
++ QList<DevicePtr> output;
++ GList *input = gst_device_monitor_get_devices(object<GstDeviceMonitor>());
++
++ while (input) {
++ output += DevicePtr::wrap(GST_DEVICE(input->data), false);
++ input = g_list_delete_link(input, input);
++ }
++
++ return output;
++}
++
++}
+diff --git a/src/QGst/devicemonitor.h b/src/QGst/devicemonitor.h
+new file mode 100644
+index 0000000..5bb2083
+--- /dev/null
++++ b/src/QGst/devicemonitor.h
+@@ -0,0 +1,53 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 QGST_DEVICEMONITOR_H
++#define QGST_DEVICEMONITOR_H
++
++#include "bus.h"
++#include "caps.h"
++#include "device.h"
++#include "object.h"
++
++namespace QGst {
++
++/*! \headerfile devicemonitor.h <QGst/DeviceMonitor>
++ * \brief Wrapper class for GstDeviceMonitor
++ *
++ * A device monitor and prober
++ */
++class QTGSTREAMER_EXPORT DeviceMonitor : public Object
++{
++ QGST_WRAPPER(DeviceMonitor)
++public:
++ static DeviceMonitorPtr create();
++
++ BusPtr bus() const;
++
++ quint32 addFilter(const char* classes, const CapsPtr & caps);
++ bool removeFilter(quint32 filterId);
++
++ bool start();
++ void stop();
++
++ QList<DevicePtr> devices() const;
++};
++
++}
++
++QGST_REGISTER_TYPE(QGst::DeviceMonitor)
++
++#endif
+diff --git a/src/QGst/enums.h b/src/QGst/enums.h
+index fe8f08d..6cd0d71 100644
+--- a/src/QGst/enums.h
++++ b/src/QGst/enums.h
+@@ -193,6 +193,15 @@ namespace QGst {
+ MessageRequestState = (1 << 22),
+ MessageStepStart = (1 << 23),
+ MessageQos = (1 << 24),
++ MessageProgress = (1 << 25),
++ MessageToc = (1 << 26),
++ MessageResetTime = (1 << 27),
++ MessageStreamStart = (1 << 28),
++ MessageNeedContext = (1 << 29),
++ MessageHaveContext = (1 << 30),
++ MessageExtended = (1 << 31),
++ MessageDeviceAdded /*= MessageExtended + 1*/,
++ MessageDeviceRemoved /*= MessageExtended + 2*/,
+ MessageAny = ~0
+ };
+ }
+diff --git a/src/QGst/gen.cpp b/src/QGst/gen.cpp
+index c8de4e7..fec9147 100644
+--- a/src/QGst/gen.cpp
++++ b/src/QGst/gen.cpp
+@@ -37,75 +37,14 @@
+ #include <gst/pbutils/gstdiscoverer.h>
+ #include <gst/pbutils/pbutils-enumtypes.h>
+ #include <QGlib/Quark>
+-#include "QGst/objectstore_p.h"
+-
+-#include "QGst/message.h"
++#include "QGst/urihandler.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Message,GST_TYPE_MESSAGE)
++REGISTER_TYPE_IMPLEMENTATION(QGst::UriHandler,GST_TYPE_URI_HANDLER)
+
+ namespace QGst {
+- QGlib::RefCountedObject *Message_new(void *instance)
++ QGlib::RefCountedObject *UriHandler_new(void *instance)
+ {
+- QGst::Message *cppClass = NULL;
+- switch(GST_MESSAGE_TYPE(instance)) {
+- case QGst::MessageEos:
+- cppClass = new QGst::EosMessage;
+- break;
+- case QGst::MessageError:
+- cppClass = new QGst::ErrorMessage;
+- break;
+- case QGst::MessageWarning:
+- cppClass = new QGst::WarningMessage;
+- break;
+- case QGst::MessageInfo:
+- cppClass = new QGst::InfoMessage;
+- break;
+- case QGst::MessageTag:
+- cppClass = new QGst::TagMessage;
+- break;
+- case QGst::MessageBuffering:
+- cppClass = new QGst::BufferingMessage;
+- break;
+- case QGst::MessageStateChanged:
+- cppClass = new QGst::StateChangedMessage;
+- break;
+- case QGst::MessageStepDone:
+- cppClass = new QGst::StepDoneMessage;
+- break;
+- case QGst::MessageStreamStatus:
+- cppClass = new QGst::StreamStatusMessage;
+- break;
+- case QGst::MessageApplication:
+- cppClass = new QGst::ApplicationMessage;
+- break;
+- case QGst::MessageElement:
+- cppClass = new QGst::ElementMessage;
+- break;
+- case QGst::MessageSegmentDone:
+- cppClass = new QGst::SegmentDoneMessage;
+- break;
+- case QGst::MessageDurationChanged:
+- cppClass = new QGst::DurationChangedMessage;
+- break;
+- case QGst::MessageLatency:
+- cppClass = new QGst::LatencyMessage;
+- break;
+- case QGst::MessageAsyncDone:
+- cppClass = new QGst::AsyncDoneMessage;
+- break;
+- case QGst::MessageRequestState:
+- cppClass = new QGst::RequestStateMessage;
+- break;
+- case QGst::MessageStepStart:
+- cppClass = new QGst::StepStartMessage;
+- break;
+- case QGst::MessageQos:
+- cppClass = new QGst::QosMessage;
+- break;
+- default:
+- cppClass = new QGst::Message;
+- break;
+- }
++ QGst::UriHandler *cppClass = new QGst::UriHandler;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+@@ -124,22 +63,7 @@ namespace QGst {
+ }
+ } //namespace QGst
+
+-#include "QGst/videoorientation.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::VideoOrientation,GST_TYPE_VIDEO_ORIENTATION)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *VideoOrientation_new(void *instance)
+- {
+- QGst::VideoOrientation *cppClass = new QGst::VideoOrientation;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/structure.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Structure,GST_TYPE_STRUCTURE)
++#include "QGst/parse.h"
+
+ #include "QGst/clock.h"
+
+@@ -154,323 +78,122 @@ namespace QGst {
+ }
+ } //namespace QGst
+
+-#include "QGst/childproxy.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::ChildProxy,GST_TYPE_CHILD_PROXY)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *ChildProxy_new(void *instance)
+- {
+- QGst::ChildProxy *cppClass = new QGst::ChildProxy;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/query.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Query,GST_TYPE_QUERY)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Query_new(void *instance)
+- {
+- QGst::Query *cppClass = NULL;
+- switch(GST_QUERY_TYPE(instance)) {
+- case QGst::QueryPosition:
+- cppClass = new QGst::PositionQuery;
+- break;
+- case QGst::QueryDuration:
+- cppClass = new QGst::DurationQuery;
+- break;
+- case QGst::QueryLatency:
+- cppClass = new QGst::LatencyQuery;
+- break;
+- case QGst::QuerySeeking:
+- cppClass = new QGst::SeekingQuery;
+- break;
+- case QGst::QuerySegment:
+- cppClass = new QGst::SegmentQuery;
+- break;
+- case QGst::QueryConvert:
+- cppClass = new QGst::ConvertQuery;
+- break;
+- case QGst::QueryFormats:
+- cppClass = new QGst::FormatsQuery;
+- break;
+- case QGst::QueryBuffering:
+- cppClass = new QGst::BufferingQuery;
+- break;
+- case QGst::QueryUri:
+- cppClass = new QGst::UriQuery;
+- break;
+- default:
+- cppClass = new QGst::Query;
+- break;
+- }
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/pipeline.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Pipeline,GST_TYPE_PIPELINE)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Pipeline_new(void *instance)
+- {
+- QGst::Pipeline *cppClass = new QGst::Pipeline;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/streamvolume.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::StreamVolume,GST_TYPE_STREAM_VOLUME)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *StreamVolume_new(void *instance)
+- {
+- QGst::StreamVolume *cppClass = new QGst::StreamVolume;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/structs.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Fourcc,G_TYPE_UINT)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Fraction,GST_TYPE_FRACTION)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::IntRange,GST_TYPE_INT_RANGE)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Int64Range,GST_TYPE_INT64_RANGE)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DoubleRange,GST_TYPE_DOUBLE_RANGE)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::FractionRange,GST_TYPE_FRACTION_RANGE)
+-
+-#include "QGst/caps.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Caps,GST_TYPE_CAPS)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Caps_new(void *instance)
+- {
+- QGst::Caps *cppClass = new QGst::Caps;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/miniobject.h"
+-
+-#include "QGst/event.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Event,GST_TYPE_EVENT)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Event_new(void *instance)
+- {
+- QGst::Event *cppClass = NULL;
+- switch(GST_EVENT_TYPE(instance)) {
+- case QGst::EventFlushStart:
+- cppClass = new QGst::FlushStartEvent;
+- break;
+- case QGst::EventFlushStop:
+- cppClass = new QGst::FlushStopEvent;
+- break;
+- case QGst::EventEos:
+- cppClass = new QGst::EosEvent;
+- break;
+- case QGst::EventCaps:
+- cppClass = new QGst::CapsEvent;
+- break;
+- case QGst::EventSegment:
+- cppClass = new QGst::SegmentEvent;
+- break;
+- case QGst::EventTag:
+- cppClass = new QGst::TagEvent;
+- break;
+- case QGst::EventBufferSize:
+- cppClass = new QGst::BufferSizeEvent;
+- break;
+- case QGst::EventSinkMessage:
+- cppClass = new QGst::SinkMessageEvent;
+- break;
+- case QGst::EventQos:
+- cppClass = new QGst::QosEvent;
+- break;
+- case QGst::EventSeek:
+- cppClass = new QGst::SeekEvent;
+- break;
+- case QGst::EventNavigation:
+- cppClass = new QGst::NavigationEvent;
+- break;
+- case QGst::EventLatency:
+- cppClass = new QGst::LatencyEvent;
+- break;
+- case QGst::EventStep:
+- cppClass = new QGst::StepEvent;
+- break;
+- default:
+- cppClass = new QGst::Event;
+- break;
+- }
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/memory.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Memory,GST_TYPE_MEMORY)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Memory_new(void *instance)
+- {
+- QGst::Memory *cppClass = new QGst::Memory;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/element.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Element,GST_TYPE_ELEMENT)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Element_new(void *instance)
+- {
+- QGst::Element *cppClass = new QGst::Element;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/taglist.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::TagList,GST_TYPE_TAG_LIST)
+-
+-#include "QGst/allocator.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Allocator,GST_TYPE_ALLOCATOR)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *Allocator_new(void *instance)
+- {
+- QGst::Allocator *cppClass = new QGst::Allocator;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/clocktime.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::ClockTime,GST_TYPE_CLOCK_TIME)
+-
+-#include "QGst/pluginfeature.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::PluginFeature,GST_TYPE_PLUGIN_FEATURE)
+-
+-namespace QGst {
+- QGlib::RefCountedObject *PluginFeature_new(void *instance)
+- {
+- QGst::PluginFeature *cppClass = new QGst::PluginFeature;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
+-
+-#include "QGst/discoverer.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererStreamInfo,GST_TYPE_DISCOVERER_STREAM_INFO)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererContainerInfo,GST_TYPE_DISCOVERER_CONTAINER_INFO)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererAudioInfo,GST_TYPE_DISCOVERER_AUDIO_INFO)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererVideoInfo,GST_TYPE_DISCOVERER_VIDEO_INFO)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererSubtitleInfo,GST_TYPE_DISCOVERER_SUBTITLE_INFO)
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererInfo,GST_TYPE_DISCOVERER_INFO)
++#include "QGst/segment.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Discoverer,GST_TYPE_DISCOVERER)
++REGISTER_TYPE_IMPLEMENTATION(QGst::Segment,GST_TYPE_SEGMENT)
+
+-namespace QGst {
+- QGlib::RefCountedObject *DiscovererStreamInfo_new(void *instance)
+- {
+- QGst::DiscovererStreamInfo *cppClass = new QGst::DiscovererStreamInfo;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
++#include "QGst/videooverlay.h"
+
+-namespace QGst {
+- QGlib::RefCountedObject *DiscovererContainerInfo_new(void *instance)
+- {
+- QGst::DiscovererContainerInfo *cppClass = new QGst::DiscovererContainerInfo;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
++REGISTER_TYPE_IMPLEMENTATION(QGst::VideoOverlay,GST_TYPE_VIDEO_OVERLAY)
+
+ namespace QGst {
+- QGlib::RefCountedObject *DiscovererAudioInfo_new(void *instance)
++ QGlib::RefCountedObject *VideoOverlay_new(void *instance)
+ {
+- QGst::DiscovererAudioInfo *cppClass = new QGst::DiscovererAudioInfo;
++ QGst::VideoOverlay *cppClass = new QGst::VideoOverlay;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-namespace QGst {
+- QGlib::RefCountedObject *DiscovererVideoInfo_new(void *instance)
+- {
+- QGst::DiscovererVideoInfo *cppClass = new QGst::DiscovererVideoInfo;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
++#include "QGst/sample.h"
+
+-namespace QGst {
+- QGlib::RefCountedObject *DiscovererSubtitleInfo_new(void *instance)
+- {
+- QGst::DiscovererSubtitleInfo *cppClass = new QGst::DiscovererSubtitleInfo;
+- cppClass->m_object = instance;
+- return cppClass;
+- }
+-} //namespace QGst
++REGISTER_TYPE_IMPLEMENTATION(QGst::Sample,GST_TYPE_SAMPLE)
+
+ namespace QGst {
+- QGlib::RefCountedObject *DiscovererInfo_new(void *instance)
++ QGlib::RefCountedObject *Sample_new(void *instance)
+ {
+- QGst::DiscovererInfo *cppClass = new QGst::DiscovererInfo;
++ QGst::Sample *cppClass = new QGst::Sample;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
++#include "QGst/message.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Message,GST_TYPE_MESSAGE)
++
+ namespace QGst {
+- QGlib::RefCountedObject *Discoverer_new(void *instance)
++ QGlib::RefCountedObject *Message_new(void *instance)
+ {
+- QGst::Discoverer *cppClass = new QGst::Discoverer;
++ QGst::Message *cppClass = NULL;
++ switch(GST_MESSAGE_TYPE(instance)) {
++ case QGst::MessageEos:
++ cppClass = new QGst::EosMessage;
++ break;
++ case QGst::MessageError:
++ cppClass = new QGst::ErrorMessage;
++ break;
++ case QGst::MessageWarning:
++ cppClass = new QGst::WarningMessage;
++ break;
++ case QGst::MessageInfo:
++ cppClass = new QGst::InfoMessage;
++ break;
++ case QGst::MessageTag:
++ cppClass = new QGst::TagMessage;
++ break;
++ case QGst::MessageBuffering:
++ cppClass = new QGst::BufferingMessage;
++ break;
++ case QGst::MessageStateChanged:
++ cppClass = new QGst::StateChangedMessage;
++ break;
++ case QGst::MessageStepDone:
++ cppClass = new QGst::StepDoneMessage;
++ break;
++ case QGst::MessageStreamStatus:
++ cppClass = new QGst::StreamStatusMessage;
++ break;
++ case QGst::MessageApplication:
++ cppClass = new QGst::ApplicationMessage;
++ break;
++ case QGst::MessageElement:
++ cppClass = new QGst::ElementMessage;
++ break;
++ case QGst::MessageSegmentDone:
++ cppClass = new QGst::SegmentDoneMessage;
++ break;
++ case QGst::MessageDurationChanged:
++ cppClass = new QGst::DurationChangedMessage;
++ break;
++ case QGst::MessageLatency:
++ cppClass = new QGst::LatencyMessage;
++ break;
++ case QGst::MessageAsyncDone:
++ cppClass = new QGst::AsyncDoneMessage;
++ break;
++ case QGst::MessageRequestState:
++ cppClass = new QGst::RequestStateMessage;
++ break;
++ case QGst::MessageStepStart:
++ cppClass = new QGst::StepStartMessage;
++ break;
++ case QGst::MessageQos:
++ cppClass = new QGst::QosMessage;
++ break;
++ case QGst::MessageDeviceAdded:
++ cppClass = new QGst::DeviceAddedMessage;
++ break;
++ case QGst::MessageDeviceRemoved:
++ cppClass = new QGst::DeviceRemovedMessage;
++ break;
++ default:
++ cppClass = new QGst::Message;
++ break;
++ }
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/urihandler.h"
++#include "QGst/bufferlist.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::UriHandler,GST_TYPE_URI_HANDLER)
++REGISTER_TYPE_IMPLEMENTATION(QGst::BufferList,GST_TYPE_BUFFER_LIST)
+
+ namespace QGst {
+- QGlib::RefCountedObject *UriHandler_new(void *instance)
++ QGlib::RefCountedObject *BufferList_new(void *instance)
+ {
+- QGst::UriHandler *cppClass = new QGst::UriHandler;
++ QGst::BufferList *cppClass = new QGst::BufferList;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+@@ -663,6 +386,15 @@ namespace QGst {
+ BOOST_STATIC_ASSERT(static_cast<int>(MessageRequestState) == static_cast<int>(GST_MESSAGE_REQUEST_STATE));
+ BOOST_STATIC_ASSERT(static_cast<int>(MessageStepStart) == static_cast<int>(GST_MESSAGE_STEP_START));
+ BOOST_STATIC_ASSERT(static_cast<int>(MessageQos) == static_cast<int>(GST_MESSAGE_QOS));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageProgress) == static_cast<int>(GST_MESSAGE_PROGRESS));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageToc) == static_cast<int>(GST_MESSAGE_TOC));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageResetTime) == static_cast<int>(GST_MESSAGE_RESET_TIME));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageStreamStart) == static_cast<int>(GST_MESSAGE_STREAM_START));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageNeedContext) == static_cast<int>(GST_MESSAGE_NEED_CONTEXT));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageHaveContext) == static_cast<int>(GST_MESSAGE_HAVE_CONTEXT));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageExtended) == static_cast<int>(GST_MESSAGE_EXTENDED));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageDeviceAdded) == static_cast<int>(GST_MESSAGE_DEVICE_ADDED));
++ BOOST_STATIC_ASSERT(static_cast<int>(MessageDeviceRemoved) == static_cast<int>(GST_MESSAGE_DEVICE_REMOVED));
+ BOOST_STATIC_ASSERT(static_cast<int>(MessageAny) == static_cast<int>(GST_MESSAGE_ANY));
+ }
+
+@@ -878,7 +610,161 @@ namespace QGst {
+ BOOST_STATIC_ASSERT(static_cast<int>(MemoryFlagLast) == static_cast<int>(GST_MEMORY_FLAG_LAST));
+ }
+
+-#include "QGst/parse.h"
++#include "QGst/objectstore_p.h"
++
++#include "QGst/ghostpad.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::GhostPad,GST_TYPE_GHOST_PAD)
++
++namespace QGst {
++ QGlib::RefCountedObject *GhostPad_new(void *instance)
++ {
++ QGst::GhostPad *cppClass = new QGst::GhostPad;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/pluginfeature.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::PluginFeature,GST_TYPE_PLUGIN_FEATURE)
++
++namespace QGst {
++ QGlib::RefCountedObject *PluginFeature_new(void *instance)
++ {
++ QGst::PluginFeature *cppClass = new QGst::PluginFeature;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/taglist.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::TagList,GST_TYPE_TAG_LIST)
++
++#include "QGst/memory.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Memory,GST_TYPE_MEMORY)
++
++namespace QGst {
++ QGlib::RefCountedObject *Memory_new(void *instance)
++ {
++ QGst::Memory *cppClass = new QGst::Memory;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/object.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Object,GST_TYPE_OBJECT)
++
++namespace QGst {
++ QGlib::RefCountedObject *Object_new(void *instance)
++ {
++ QGst::Object *cppClass = new QGst::Object;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/videoorientation.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::VideoOrientation,GST_TYPE_VIDEO_ORIENTATION)
++
++namespace QGst {
++ QGlib::RefCountedObject *VideoOrientation_new(void *instance)
++ {
++ QGst::VideoOrientation *cppClass = new QGst::VideoOrientation;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/bus.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Bus,GST_TYPE_BUS)
++
++namespace QGst {
++ QGlib::RefCountedObject *Bus_new(void *instance)
++ {
++ QGst::Bus *cppClass = new QGst::Bus;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/pipeline.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Pipeline,GST_TYPE_PIPELINE)
++
++namespace QGst {
++ QGlib::RefCountedObject *Pipeline_new(void *instance)
++ {
++ QGst::Pipeline *cppClass = new QGst::Pipeline;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/structs.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Fourcc,G_TYPE_UINT)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Fraction,GST_TYPE_FRACTION)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::IntRange,GST_TYPE_INT_RANGE)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Int64Range,GST_TYPE_INT64_RANGE)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DoubleRange,GST_TYPE_DOUBLE_RANGE)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::FractionRange,GST_TYPE_FRACTION_RANGE)
++
++#include "QGst/structure.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Structure,GST_TYPE_STRUCTURE)
++
++#include "QGst/childproxy.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::ChildProxy,GST_TYPE_CHILD_PROXY)
++
++namespace QGst {
++ QGlib::RefCountedObject *ChildProxy_new(void *instance)
++ {
++ QGst::ChildProxy *cppClass = new QGst::ChildProxy;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/bin.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Bin,GST_TYPE_BIN)
++
++namespace QGst {
++ QGlib::RefCountedObject *Bin_new(void *instance)
++ {
++ QGst::Bin *cppClass = new QGst::Bin;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++
++
++#include "QGst/element.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Element,GST_TYPE_ELEMENT)
++
++namespace QGst {
++ QGlib::RefCountedObject *Element_new(void *instance)
++ {
++ QGst::Element *cppClass = new QGst::Element;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
+ #include "QGst/colorbalance.h"
+
+@@ -887,167 +773,333 @@ REGISTER_TYPE_IMPLEMENTATION(QGst::ColorBalanceChannel,GST_TYPE_COLOR_BALANCE_CH
+ REGISTER_TYPE_IMPLEMENTATION(QGst::ColorBalance,GST_TYPE_COLOR_BALANCE)
+
+ namespace QGst {
+- QGlib::RefCountedObject *ColorBalanceChannel_new(void *instance)
++ QGlib::RefCountedObject *ColorBalanceChannel_new(void *instance)
++ {
++ QGst::ColorBalanceChannel *cppClass = new QGst::ColorBalanceChannel;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++namespace QGst {
++ QGlib::RefCountedObject *ColorBalance_new(void *instance)
++ {
++ QGst::ColorBalance *cppClass = new QGst::ColorBalance;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
++
++#include "QGst/caps.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Caps,GST_TYPE_CAPS)
++
++namespace QGst {
++ QGlib::RefCountedObject *Caps_new(void *instance)
+ {
+- QGst::ColorBalanceChannel *cppClass = new QGst::ColorBalanceChannel;
++ QGst::Caps *cppClass = new QGst::Caps;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
++#include "QGst/init.h"
++
++#include "QGst/buffer.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Buffer,GST_TYPE_BUFFER)
++
+ namespace QGst {
+- QGlib::RefCountedObject *ColorBalance_new(void *instance)
++ QGlib::RefCountedObject *Buffer_new(void *instance)
+ {
+- QGst::ColorBalance *cppClass = new QGst::ColorBalance;
++ QGst::Buffer *cppClass = new QGst::Buffer;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/videooverlay.h"
++#include "QGst/allocator.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::VideoOverlay,GST_TYPE_VIDEO_OVERLAY)
++REGISTER_TYPE_IMPLEMENTATION(QGst::Allocator,GST_TYPE_ALLOCATOR)
+
+ namespace QGst {
+- QGlib::RefCountedObject *VideoOverlay_new(void *instance)
++ QGlib::RefCountedObject *Allocator_new(void *instance)
+ {
+- QGst::VideoOverlay *cppClass = new QGst::VideoOverlay;
++ QGst::Allocator *cppClass = new QGst::Allocator;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/buffer.h"
++#include "QGst/devicemonitor.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Buffer,GST_TYPE_BUFFER)
++REGISTER_TYPE_IMPLEMENTATION(QGst::DeviceMonitor,GST_TYPE_DEVICE_MONITOR)
+
+ namespace QGst {
+- QGlib::RefCountedObject *Buffer_new(void *instance)
++ QGlib::RefCountedObject *DeviceMonitor_new(void *instance)
+ {
+- QGst::Buffer *cppClass = new QGst::Buffer;
++ QGst::DeviceMonitor *cppClass = new QGst::DeviceMonitor;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/ghostpad.h"
++#include "QGst/device.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::GhostPad,GST_TYPE_GHOST_PAD)
++REGISTER_TYPE_IMPLEMENTATION(QGst::Device,GST_TYPE_DEVICE)
+
+ namespace QGst {
+- QGlib::RefCountedObject *GhostPad_new(void *instance)
++ QGlib::RefCountedObject *Device_new(void *instance)
+ {
+- QGst::GhostPad *cppClass = new QGst::GhostPad;
++ QGst::Device *cppClass = new QGst::Device;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/elementfactory.h"
++#include "QGst/clocktime.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::ElementFactory,GST_TYPE_ELEMENT_FACTORY)
++REGISTER_TYPE_IMPLEMENTATION(QGst::ClockTime,GST_TYPE_CLOCK_TIME)
++
++#include "QGst/event.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Event,GST_TYPE_EVENT)
+
+ namespace QGst {
+- QGlib::RefCountedObject *ElementFactory_new(void *instance)
++ QGlib::RefCountedObject *Event_new(void *instance)
+ {
+- QGst::ElementFactory *cppClass = new QGst::ElementFactory;
++ QGst::Event *cppClass = NULL;
++ switch(GST_EVENT_TYPE(instance)) {
++ case QGst::EventFlushStart:
++ cppClass = new QGst::FlushStartEvent;
++ break;
++ case QGst::EventFlushStop:
++ cppClass = new QGst::FlushStopEvent;
++ break;
++ case QGst::EventEos:
++ cppClass = new QGst::EosEvent;
++ break;
++ case QGst::EventCaps:
++ cppClass = new QGst::CapsEvent;
++ break;
++ case QGst::EventSegment:
++ cppClass = new QGst::SegmentEvent;
++ break;
++ case QGst::EventTag:
++ cppClass = new QGst::TagEvent;
++ break;
++ case QGst::EventBufferSize:
++ cppClass = new QGst::BufferSizeEvent;
++ break;
++ case QGst::EventSinkMessage:
++ cppClass = new QGst::SinkMessageEvent;
++ break;
++ case QGst::EventQos:
++ cppClass = new QGst::QosEvent;
++ break;
++ case QGst::EventSeek:
++ cppClass = new QGst::SeekEvent;
++ break;
++ case QGst::EventNavigation:
++ cppClass = new QGst::NavigationEvent;
++ break;
++ case QGst::EventLatency:
++ cppClass = new QGst::LatencyEvent;
++ break;
++ case QGst::EventStep:
++ cppClass = new QGst::StepEvent;
++ break;
++ default:
++ cppClass = new QGst::Event;
++ break;
++ }
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/sample.h"
++#include "QGst/discoverer.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Sample,GST_TYPE_SAMPLE)
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererStreamInfo,GST_TYPE_DISCOVERER_STREAM_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererContainerInfo,GST_TYPE_DISCOVERER_CONTAINER_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererAudioInfo,GST_TYPE_DISCOVERER_AUDIO_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererVideoInfo,GST_TYPE_DISCOVERER_VIDEO_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererSubtitleInfo,GST_TYPE_DISCOVERER_SUBTITLE_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::DiscovererInfo,GST_TYPE_DISCOVERER_INFO)
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Discoverer,GST_TYPE_DISCOVERER)
+
+ namespace QGst {
+- QGlib::RefCountedObject *Sample_new(void *instance)
++ QGlib::RefCountedObject *DiscovererStreamInfo_new(void *instance)
+ {
+- QGst::Sample *cppClass = new QGst::Sample;
++ QGst::DiscovererStreamInfo *cppClass = new QGst::DiscovererStreamInfo;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/bin.h"
+-
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Bin,GST_TYPE_BIN)
++namespace QGst {
++ QGlib::RefCountedObject *DiscovererContainerInfo_new(void *instance)
++ {
++ QGst::DiscovererContainerInfo *cppClass = new QGst::DiscovererContainerInfo;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
+ namespace QGst {
+- QGlib::RefCountedObject *Bin_new(void *instance)
++ QGlib::RefCountedObject *DiscovererAudioInfo_new(void *instance)
+ {
+- QGst::Bin *cppClass = new QGst::Bin;
++ QGst::DiscovererAudioInfo *cppClass = new QGst::DiscovererAudioInfo;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
++namespace QGst {
++ QGlib::RefCountedObject *DiscovererVideoInfo_new(void *instance)
++ {
++ QGst::DiscovererVideoInfo *cppClass = new QGst::DiscovererVideoInfo;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
++namespace QGst {
++ QGlib::RefCountedObject *DiscovererSubtitleInfo_new(void *instance)
++ {
++ QGst::DiscovererSubtitleInfo *cppClass = new QGst::DiscovererSubtitleInfo;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
+-#include "QGst/segment.h"
++namespace QGst {
++ QGlib::RefCountedObject *DiscovererInfo_new(void *instance)
++ {
++ QGst::DiscovererInfo *cppClass = new QGst::DiscovererInfo;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Segment,GST_TYPE_SEGMENT)
++namespace QGst {
++ QGlib::RefCountedObject *Discoverer_new(void *instance)
++ {
++ QGst::Discoverer *cppClass = new QGst::Discoverer;
++ cppClass->m_object = instance;
++ return cppClass;
++ }
++} //namespace QGst
+
+-#include "QGst/bufferlist.h"
++#include "QGst/elementfactory.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::BufferList,GST_TYPE_BUFFER_LIST)
++REGISTER_TYPE_IMPLEMENTATION(QGst::ElementFactory,GST_TYPE_ELEMENT_FACTORY)
+
+ namespace QGst {
+- QGlib::RefCountedObject *BufferList_new(void *instance)
++ QGlib::RefCountedObject *ElementFactory_new(void *instance)
+ {
+- QGst::BufferList *cppClass = new QGst::BufferList;
++ QGst::ElementFactory *cppClass = new QGst::ElementFactory;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/object.h"
++#include "QGst/miniobject.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Object,GST_TYPE_OBJECT)
++#include "QGst/query.h"
++
++REGISTER_TYPE_IMPLEMENTATION(QGst::Query,GST_TYPE_QUERY)
+
+ namespace QGst {
+- QGlib::RefCountedObject *Object_new(void *instance)
++ QGlib::RefCountedObject *Query_new(void *instance)
+ {
+- QGst::Object *cppClass = new QGst::Object;
++ QGst::Query *cppClass = NULL;
++ switch(GST_QUERY_TYPE(instance)) {
++ case QGst::QueryPosition:
++ cppClass = new QGst::PositionQuery;
++ break;
++ case QGst::QueryDuration:
++ cppClass = new QGst::DurationQuery;
++ break;
++ case QGst::QueryLatency:
++ cppClass = new QGst::LatencyQuery;
++ break;
++ case QGst::QuerySeeking:
++ cppClass = new QGst::SeekingQuery;
++ break;
++ case QGst::QuerySegment:
++ cppClass = new QGst::SegmentQuery;
++ break;
++ case QGst::QueryConvert:
++ cppClass = new QGst::ConvertQuery;
++ break;
++ case QGst::QueryFormats:
++ cppClass = new QGst::FormatsQuery;
++ break;
++ case QGst::QueryBuffering:
++ cppClass = new QGst::BufferingQuery;
++ break;
++ case QGst::QueryUri:
++ cppClass = new QGst::UriQuery;
++ break;
++ default:
++ cppClass = new QGst::Query;
++ break;
++ }
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/bus.h"
++#include "QGst/streamvolume.h"
+
+-REGISTER_TYPE_IMPLEMENTATION(QGst::Bus,GST_TYPE_BUS)
++REGISTER_TYPE_IMPLEMENTATION(QGst::StreamVolume,GST_TYPE_STREAM_VOLUME)
+
+ namespace QGst {
+- QGlib::RefCountedObject *Bus_new(void *instance)
++ QGlib::RefCountedObject *StreamVolume_new(void *instance)
+ {
+- QGst::Bus *cppClass = new QGst::Bus;
++ QGst::StreamVolume *cppClass = new QGst::StreamVolume;
+ cppClass->m_object = instance;
+ return cppClass;
+ }
+ } //namespace QGst
+
+-#include "QGst/init.h"
+-
+ namespace QGst {
+ namespace Private {
+ void registerWrapperConstructors()
+ {
+ QGlib::Quark q = g_quark_from_static_string("QGlib__wrapper_constructor");
+- QGlib::GetType<Message>().setQuarkData(q, reinterpret_cast<void*>(&Message_new));
++ QGlib::GetType<UriHandler>().setQuarkData(q, reinterpret_cast<void*>(&UriHandler_new));
+ QGlib::GetType<Pad>().setQuarkData(q, reinterpret_cast<void*>(&Pad_new));
+- QGlib::GetType<VideoOrientation>().setQuarkData(q, reinterpret_cast<void*>(&VideoOrientation_new));
+ QGlib::GetType<Clock>().setQuarkData(q, reinterpret_cast<void*>(&Clock_new));
+- QGlib::GetType<ChildProxy>().setQuarkData(q, reinterpret_cast<void*>(&ChildProxy_new));
+- QGlib::GetType<Query>().setQuarkData(q, reinterpret_cast<void*>(&Query_new));
+- QGlib::GetType<Pipeline>().setQuarkData(q, reinterpret_cast<void*>(&Pipeline_new));
+- QGlib::GetType<StreamVolume>().setQuarkData(q, reinterpret_cast<void*>(&StreamVolume_new));
+- QGlib::GetType<Caps>().setQuarkData(q, reinterpret_cast<void*>(&Caps_new));
+- QGlib::GetType<Event>().setQuarkData(q, reinterpret_cast<void*>(&Event_new));
++ QGlib::GetType<VideoOverlay>().setQuarkData(q, reinterpret_cast<void*>(&VideoOverlay_new));
++ QGlib::GetType<Sample>().setQuarkData(q, reinterpret_cast<void*>(&Sample_new));
++ QGlib::GetType<Message>().setQuarkData(q, reinterpret_cast<void*>(&Message_new));
++ QGlib::GetType<BufferList>().setQuarkData(q, reinterpret_cast<void*>(&BufferList_new));
++ QGlib::GetType<GhostPad>().setQuarkData(q, reinterpret_cast<void*>(&GhostPad_new));
++ QGlib::GetType<PluginFeature>().setQuarkData(q, reinterpret_cast<void*>(&PluginFeature_new));
+ QGlib::GetType<Memory>().setQuarkData(q, reinterpret_cast<void*>(&Memory_new));
++ QGlib::GetType<Object>().setQuarkData(q, reinterpret_cast<void*>(&Object_new));
++ QGlib::GetType<VideoOrientation>().setQuarkData(q, reinterpret_cast<void*>(&VideoOrientation_new));
++ QGlib::GetType<Bus>().setQuarkData(q, reinterpret_cast<void*>(&Bus_new));
++ QGlib::GetType<Pipeline>().setQuarkData(q, reinterpret_cast<void*>(&Pipeline_new));
++ QGlib::GetType<ChildProxy>().setQuarkData(q, reinterpret_cast<void*>(&ChildProxy_new));
++ QGlib::GetType<Bin>().setQuarkData(q, reinterpret_cast<void*>(&Bin_new));
+ QGlib::GetType<Element>().setQuarkData(q, reinterpret_cast<void*>(&Element_new));
++ QGlib::GetType<ColorBalanceChannel>().setQuarkData(q, reinterpret_cast<void*>(&ColorBalanceChannel_new));
++ QGlib::GetType<ColorBalance>().setQuarkData(q, reinterpret_cast<void*>(&ColorBalance_new));
++ QGlib::GetType<Caps>().setQuarkData(q, reinterpret_cast<void*>(&Caps_new));
++ QGlib::GetType<Buffer>().setQuarkData(q, reinterpret_cast<void*>(&Buffer_new));
+ QGlib::GetType<Allocator>().setQuarkData(q, reinterpret_cast<void*>(&Allocator_new));
+- QGlib::GetType<PluginFeature>().setQuarkData(q, reinterpret_cast<void*>(&PluginFeature_new));
++ QGlib::GetType<DeviceMonitor>().setQuarkData(q, reinterpret_cast<void*>(&DeviceMonitor_new));
++ QGlib::GetType<Device>().setQuarkData(q, reinterpret_cast<void*>(&Device_new));
++ QGlib::GetType<Event>().setQuarkData(q, reinterpret_cast<void*>(&Event_new));
+ QGlib::GetType<DiscovererStreamInfo>().setQuarkData(q, reinterpret_cast<void*>(&DiscovererStreamInfo_new));
+ QGlib::GetType<DiscovererContainerInfo>().setQuarkData(q, reinterpret_cast<void*>(&DiscovererContainerInfo_new));
+ QGlib::GetType<DiscovererAudioInfo>().setQuarkData(q, reinterpret_cast<void*>(&DiscovererAudioInfo_new));
+@@ -1055,18 +1107,9 @@ namespace Private {
+ QGlib::GetType<DiscovererSubtitleInfo>().setQuarkData(q, reinterpret_cast<void*>(&DiscovererSubtitleInfo_new));
+ QGlib::GetType<DiscovererInfo>().setQuarkData(q, reinterpret_cast<void*>(&DiscovererInfo_new));
+ QGlib::GetType<Discoverer>().setQuarkData(q, reinterpret_cast<void*>(&Discoverer_new));
+- QGlib::GetType<UriHandler>().setQuarkData(q, reinterpret_cast<void*>(&UriHandler_new));
+- QGlib::GetType<ColorBalanceChannel>().setQuarkData(q, reinterpret_cast<void*>(&ColorBalanceChannel_new));
+- QGlib::GetType<ColorBalance>().setQuarkData(q, reinterpret_cast<void*>(&ColorBalance_new));
+- QGlib::GetType<VideoOverlay>().setQuarkData(q, reinterpret_cast<void*>(&VideoOverlay_new));
+- QGlib::GetType<Buffer>().setQuarkData(q, reinterpret_cast<void*>(&Buffer_new));
+- QGlib::GetType<GhostPad>().setQuarkData(q, reinterpret_cast<void*>(&GhostPad_new));
+ QGlib::GetType<ElementFactory>().setQuarkData(q, reinterpret_cast<void*>(&ElementFactory_new));
+- QGlib::GetType<Sample>().setQuarkData(q, reinterpret_cast<void*>(&Sample_new));
+- QGlib::GetType<Bin>().setQuarkData(q, reinterpret_cast<void*>(&Bin_new));
+- QGlib::GetType<BufferList>().setQuarkData(q, reinterpret_cast<void*>(&BufferList_new));
+- QGlib::GetType<Object>().setQuarkData(q, reinterpret_cast<void*>(&Object_new));
+- QGlib::GetType<Bus>().setQuarkData(q, reinterpret_cast<void*>(&Bus_new));
++ QGlib::GetType<Query>().setQuarkData(q, reinterpret_cast<void*>(&Query_new));
++ QGlib::GetType<StreamVolume>().setQuarkData(q, reinterpret_cast<void*>(&StreamVolume_new));
+ }
+ } //namespace Private
+ } //namespace QGst
+diff --git a/src/QGst/global.h b/src/QGst/global.h
+index 9d8eefe..f5464b1 100644
+--- a/src/QGst/global.h
++++ b/src/QGst/global.h
+@@ -75,6 +75,8 @@ QGST_WRAPPER_DECLARATION(ChildProxy)
+ QGST_WRAPPER_DECLARATION(Clock)
+ QGST_WRAPPER_DECLARATION(ColorBalanceChannel)
+ QGST_WRAPPER_DECLARATION(ColorBalance)
++QGST_WRAPPER_DECLARATION(Device)
++QGST_WRAPPER_DECLARATION(DeviceMonitor)
+ QGST_WRAPPER_DECLARATION(Discoverer)
+ QGST_WRAPPER_DECLARATION(DiscovererInfo)
+ QGST_WRAPPER_DECLARATION(DiscovererStreamInfo)
+@@ -104,6 +106,8 @@ QGST_WRAPPER_REFPOINTER_DECLARATION(AsyncDoneMessage)
+ QGST_WRAPPER_REFPOINTER_DECLARATION(RequestStateMessage)
+ QGST_WRAPPER_REFPOINTER_DECLARATION(StepStartMessage)
+ QGST_WRAPPER_REFPOINTER_DECLARATION(QosMessage)
++QGST_WRAPPER_REFPOINTER_DECLARATION(DeviceAddedMessage)
++QGST_WRAPPER_REFPOINTER_DECLARATION(DeviceRemovedMessage)
+ QGST_WRAPPER_DECLARATION(MiniObject)
+ QGST_WRAPPER_DECLARATION(Object)
+ QGST_WRAPPER_DECLARATION(Pad)
+diff --git a/src/QGst/message.cpp b/src/QGst/message.cpp
+index e8b5a90..ae845cc 100644
+--- a/src/QGst/message.cpp
++++ b/src/QGst/message.cpp
+@@ -575,4 +575,34 @@ void QosMessage::setStats(Format format, quint64 processed, quint64 dropped)
+ dropped);
+ }
+
++//********************************************************
++
++DeviceAddedMessagePtr DeviceAddedMessage::create(const ObjectPtr & source, const DevicePtr & device)
++{
++ GstMessage *m = gst_message_new_device_added(source, device);
++ return DeviceAddedMessagePtr::wrap(m, false);
++}
++
++DevicePtr DeviceAddedMessage::device() const
++{
++ GstDevice *d;
++ gst_message_parse_device_added(object<GstMessage>(), &d);
++ return DevicePtr::wrap(d, false);
++}
++
++//********************************************************
++
++DeviceRemovedMessagePtr DeviceRemovedMessage::create(const ObjectPtr & source, const DevicePtr & device)
++{
++ GstMessage *m = gst_message_new_device_removed(source, device);
++ return DeviceRemovedMessagePtr::wrap(m, false);
++}
++
++DevicePtr DeviceRemovedMessage::device() const
++{
++ GstDevice *d;
++ gst_message_parse_device_removed(object<GstMessage>(), &d);
++ return DevicePtr::wrap(d, false);
++}
++
+ } //namespace QGst
+diff --git a/src/QGst/message.h b/src/QGst/message.h
+index 7ed2bdf..cd489b7 100644
+--- a/src/QGst/message.h
++++ b/src/QGst/message.h
+@@ -18,6 +18,7 @@
+ #define QGST_MESSAGE_H
+
+ #include "clocktime.h"
++#include "device.h"
+ #include "miniobject.h"
+ #include "structure.h"
+ #include "taglist.h"
+@@ -325,6 +326,30 @@ public:
+ void setStats(Format format, quint64 processed, quint64 dropped);
+ };
+
++/*! \headerfile message.h <QGst/Message>
++ * \brief Wrapper class for messages of type QGst::MessageDeviceAdded
++ */
++class QTGSTREAMER_EXPORT DeviceAddedMessage : public Message
++{
++ QGST_WRAPPER_FAKE_SUBCLASS(DeviceAdded, Message)
++public:
++ static DeviceAddedMessagePtr create(const ObjectPtr & source, const DevicePtr& device);
++
++ DevicePtr device() const;
++};
++
++/*! \headerfile message.h <QGst/Message>
++ * \brief Wrapper class for messages of type QGst::MessageDeviceRemoved
++ */
++class QTGSTREAMER_EXPORT DeviceRemovedMessage : public Message
++{
++ QGST_WRAPPER_FAKE_SUBCLASS(DeviceRemoved, Message)
++public:
++ static DeviceRemovedMessagePtr create(const ObjectPtr & source, const DevicePtr& device);
++
++ DevicePtr device() const;
++};
++
+ } //namespace QGst
+
+ QGST_REGISTER_TYPE(QGst::Message)
+@@ -346,5 +371,7 @@ QGST_REGISTER_SUBCLASS(Message, AsyncDone)
+ QGST_REGISTER_SUBCLASS(Message, RequestState)
+ QGST_REGISTER_SUBCLASS(Message, StepStart)
+ QGST_REGISTER_SUBCLASS(Message, Qos)
++QGST_REGISTER_SUBCLASS(Message, DeviceAdded)
++QGST_REGISTER_SUBCLASS(Message, DeviceRemoved)
+
+ #endif
+--
+2.26.2
+
diff --git a/0032-DeviceMonitor-example.patch b/0032-DeviceMonitor-example.patch
new file mode 100644
index 0000000..3f0796a
--- /dev/null
+++ b/0032-DeviceMonitor-example.patch
@@ -0,0 +1,468 @@
+From 7f298aa319703826ebf78b4b8aaa6caf8e36c292 Mon Sep 17 00:00:00 2001
+From: Pavel Bludov <pbludov@gmail.com>
+Date: Fri, 23 Oct 2015 14:56:57 +0800
+Subject: [PATCH 32/36] DeviceMonitor example
+
+---
+ examples/CMakeLists.txt | 3 +
+ examples/devmon/CMakeLists.txt | 23 +++
+ examples/devmon/devmon.pro | 23 +++
+ examples/devmon/main.cpp | 34 +++++
+ examples/devmon/mainwindow.cpp | 270 +++++++++++++++++++++++++++++++++
+ examples/devmon/mainwindow.h | 55 +++++++
+ 6 files changed, 408 insertions(+)
+ create mode 100644 examples/devmon/CMakeLists.txt
+ create mode 100644 examples/devmon/devmon.pro
+ create mode 100644 examples/devmon/main.cpp
+ create mode 100644 examples/devmon/mainwindow.cpp
+ create mode 100644 examples/devmon/mainwindow.h
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 548d84f..01ae289 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -39,3 +39,6 @@ if (Qt4or5_Quick2_FOUND)
+ add_subdirectory(qmlplayer2)
+ example_distcheck(qmlplayer2)
+ endif()
++
++add_subdirectory(devmon)
++example_distcheck(devmon)
+diff --git a/examples/devmon/CMakeLists.txt b/examples/devmon/CMakeLists.txt
+new file mode 100644
+index 0000000..5f0674c
+--- /dev/null
++++ b/examples/devmon/CMakeLists.txt
+@@ -0,0 +1,23 @@
++project(qtgst-example-devmon)
++
++if (NOT BUILDING_QTGSTREAMER)
++ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules)
++ find_package(Qt4or5 COMPONENTS Core Gui Widgets REQUIRED)
++ if (${QT_VERSION} STREQUAL "5")
++ find_package(Qt5GStreamer REQUIRED)
++ else()
++ find_package(QtGStreamer REQUIRED)
++ endif()
++ set(CMAKE_AUTOMOC ON)
++ set(CMAKE_INCLUDE_CURRENT_DIR ON)
++endif()
++
++include_directories(${QTGSTREAMER_INCLUDES})
++add_definitions(${QTGSTREAMER_DEFINITIONS})
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
++
++set(devmon_SOURCES main.cpp mainwindow.cpp)
++
++add_executable(devmon ${devmon_SOURCES})
++target_link_libraries(devmon ${QTGSTREAMER_UI_LIBRARIES})
++qt4or5_use_modules(devmon Core Gui Widgets)
+diff --git a/examples/devmon/devmon.pro b/examples/devmon/devmon.pro
+new file mode 100644
+index 0000000..f553067
+--- /dev/null
++++ b/examples/devmon/devmon.pro
+@@ -0,0 +1,23 @@
++#
++# Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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/>.
++QT += core gui widgets
++CONFIG += link_pkgconfig
++PKGCONFIG += Qt5GLib-2.0 Qt5GStreamer-1.0
++TARGET = devmon
++TEMPLATE = app
++SOURCES += main.cpp mainwindow.cpp
++HEADERS += mainwindow.h
++
+diff --git a/examples/devmon/main.cpp b/examples/devmon/main.cpp
+new file mode 100644
+index 0000000..43b6126
+--- /dev/null
++++ b/examples/devmon/main.cpp
+@@ -0,0 +1,34 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 "mainwindow.h"
++#include <QApplication>
++
++#include <QGst/Init>
++
++int main(int argc, char *argv[])
++{
++ QGst::init(&argc, &argv);
++ QApplication a(argc, argv);
++
++ MainWindow w;
++ w.show();
++
++ int ret = a.exec();
++
++ QGst::cleanup();
++ return ret;
++}
+diff --git a/examples/devmon/mainwindow.cpp b/examples/devmon/mainwindow.cpp
+new file mode 100644
+index 0000000..eef3022
+--- /dev/null
++++ b/examples/devmon/mainwindow.cpp
+@@ -0,0 +1,270 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 "mainwindow.h"
++
++#include <QApplication>
++#include <QBoxLayout>
++#include <QDebug>
++#include <QHeaderView>
++#include <QMessageBox>
++#include <QMenuBar>
++#include <QTextEdit>
++#include <QTreeWidget>
++
++#include <QGlib/Connect>
++#include <QGlib/ParamSpec>
++#include <QGst/ElementFactory>
++#include <QGst/Pipeline>
++
++MainWindow::MainWindow(QWidget *parent) :
++ QWidget(parent)
++{
++ //
++ // UI
++ //
++
++ deviceTree = new QTreeWidget;
++ propEdit = new QTextEdit;
++ capsEdit = new QTextEdit;
++
++ QLayout *layout = new QVBoxLayout();
++ layout->addWidget(deviceTree);
++ layout->addWidget(propEdit);
++ layout->addWidget(capsEdit);
++ setLayout(layout);
++
++ deviceTree->setColumnCount(2);
++ deviceTree->setColumnWidth(0, 250);
++ deviceTree->setHeaderLabels(QStringList(tr("Name")) << tr("Display name"));
++ deviceTree->addTopLevelItem(new QTreeWidgetItem(QStringList(tr("Devices"))));
++ deviceTree->setMinimumHeight(300);
++ connect(deviceTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
++ this, SLOT(onCurrentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
++ connect(deviceTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(onItemDoubleClicked(QTreeWidgetItem*,int)));
++
++ propEdit->setMinimumHeight(60);
++ propEdit->setReadOnly(true);
++
++ capsEdit->setMinimumHeight(200);
++ capsEdit->setReadOnly(true);
++ resize(800, 600);
++
++ //
++ // Menu
++ //
++
++ QMenuBar *bar = new QMenuBar();
++ QMenu *menu = new QMenu(tr("&Device Monitor"));
++ bar->addMenu(menu);
++ layout->setMenuBar(bar);
++
++ createElementAction = menu->addAction(tr("&Create"), this, SLOT(onCreateElement()), QKeySequence::New);
++ menu->addSeparator();
++ menu->addAction(tr("&Quit"), qApp, SLOT(quit()), QKeySequence::Quit);
++
++ //
++ // DeviceMonitor
++ //
++
++ monitor = QGst::DeviceMonitor::create();
++
++ if (!monitor) {
++ QMessageBox::warning(this, this->windowTitle(), "Failed to create the device monitor");
++ return;
++ }
++
++ if (!monitor->start()) {
++ QMessageBox::warning(this, this->windowTitle(), "Failed to start the device monitor");
++ return;
++ }
++
++ QGst::BusPtr bus = monitor->bus();
++ bus->addSignalWatch();
++ QGlib::connect(bus, "message", this, &MainWindow::onBusMessage);
++
++ // Add all existing devices to the list
++ Q_FOREACH (QGst::DevicePtr device, monitor->devices()) {
++ onDeviceAdded(device);
++ }
++}
++
++MainWindow::~MainWindow()
++{
++ QGst::BusPtr bus = monitor->bus();
++ bus->removeSignalWatch();
++ QGlib::disconnect(bus, "message", this, &MainWindow::onBusMessage);
++ monitor->stop();
++}
++
++void MainWindow::onBusMessage(const QGst::MessagePtr& msg)
++{
++ switch (msg->type()) {
++ case QGst::MessageDeviceAdded:
++ onDeviceAdded(msg.staticCast<QGst::DeviceAddedMessage>()->device());
++ break;
++ case QGst::MessageDeviceRemoved:
++ onDeviceRemoved(msg.staticCast<QGst::DeviceRemovedMessage>()->device());
++ break;
++ default:
++ qDebug() << msg->typeName() << " " << msg->source()->property("name").toString();
++ break;
++ }
++}
++
++void MainWindow::onDeviceAdded(const QGst::DevicePtr & device)
++{
++ QTreeWidgetItem *parent = deviceTree->topLevelItem(0);
++
++ // Create the class hierarchy tree
++ Q_FOREACH (QString cls, device->deviceClass().split('/')) {
++ QTreeWidgetItem* next = NULL;
++ for (int idx = 0; idx < parent->childCount(); ++idx) {
++ QTreeWidgetItem* item = parent->child(idx);
++ if (item->text(0) == cls) {
++ next = item;
++ break;
++ }
++ }
++ if (!next) {
++ next = new QTreeWidgetItem(QStringList(cls));
++ parent->addChild(next);
++ }
++ parent = next;
++ }
++
++ // Add newly created item for the device
++ QTreeWidgetItem* newItem = new QTreeWidgetItem(QStringList(device->name()) << device->displayName());
++ parent->addChild(newItem);
++ deviceTree->expandAll();
++
++ // Display all device properties. All of them are internal, undocumented, and should be never used
++ QString info;
++ Q_FOREACH (const QGlib::ParamSpecPtr & prop, device->listProperties()) {
++ if (QGlib::GetType<QGst::Device>().isA(prop->ownerType())) {
++ // Filter out all base class properties
++ continue;
++ }
++
++ info.append(prop->name())
++ .append('=')
++ .append(device->property(prop->name().toUtf8()).toString())
++ .append("\r\n");
++ }
++ newItem->setData(0, Qt::UserRole, info);
++ propEdit->setText(info);
++
++ // Dsiplay the device caps
++ QString caps = device->caps()->toString().replace("; ", ";\r\n");
++ newItem->setData(1, Qt::UserRole, caps);
++ capsEdit->setText(caps);
++}
++
++void MainWindow::onDeviceRemoved(const QGst::DevicePtr & device)
++{
++ Q_FOREACH (QTreeWidgetItem *item, deviceTree->findItems(device->name(), Qt::MatchRecursive)) {
++ if (item->isSelected()) {
++ // Clear prop & caps
++ onCurrentItemChanged(NULL, NULL);
++ }
++ delete item;
++ }
++}
++
++// Probe the device. Only Audio|Video/Source|Sink are implemented.
++void MainWindow::createElement(const QGst::DevicePtr & device)
++{
++ QGst::PipelinePtr pipeline = QGst::Pipeline::create();
++ QGst::ElementPtr src;
++ QGst::ElementPtr sink;
++
++ if (device->hasClasses("Source"))
++ {
++ src = device->createElement("src");
++ if (!src) {
++ QMessageBox::critical(this, this->windowTitle(), tr("Failed to create the source element"));
++ return;
++ }
++ sink = QGst::ElementFactory::make(device->hasClasses("Video")? "autovideosink": "autoaudiosink");
++ if (!sink) {
++ QMessageBox::critical(this, this->windowTitle(), tr("Failed to create the autosink element"));
++ return;
++ }
++ }
++ else if (device->hasClasses("Sink")) {
++ sink = device->createElement("sink");
++ if (!sink) {
++ QMessageBox::critical(this, this->windowTitle(), tr("Failed to create the sink element"));
++ return;
++ }
++ src = QGst::ElementFactory::make(device->hasClasses("Video")? "videotestsrc": "audiotestsrc");
++ if (!src) {
++ QMessageBox::critical(this, this->windowTitle(), tr("Failed to create the test source element"));
++ return;
++ }
++ }
++ else {
++ QMessageBox::warning(this, this->windowTitle(), tr("Unsupported class '%1'").arg(device->deviceClass()));
++ return;
++ }
++
++ // Build sample pipeline for testing
++
++ pipeline->add(src, sink);
++ src->link(sink);
++
++ pipeline->setState(QGst::StatePlaying);
++ if (QGst::StateChangeSuccess != pipeline->getState(NULL, NULL, QGst::ClockTime::fromSeconds(10))) {
++ QMessageBox::critical(this, this->windowTitle(), tr("Failed to set the pipeline to playing state"));
++ } else {
++ QMessageBox::information(this, device->displayName(), tr("It works! Press 'OK' to continue"));
++ }
++ pipeline->setState(QGst::StateNull);
++ pipeline->getState(NULL, NULL, QGst::ClockTime::fromSeconds(10));
++}
++
++void MainWindow::onCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *)
++{
++ if (current) {
++ propEdit->setText(current->data(0, Qt::UserRole).toString());
++ capsEdit->setText(current->data(1, Qt::UserRole).toString());
++ createElementAction->setEnabled(!current->data(0, Qt::UserRole).isNull());
++ }
++ else {
++ propEdit->clear();
++ capsEdit->clear();
++ createElementAction->setEnabled(false);
++ }
++}
++
++void MainWindow::onCreateElement()
++{
++ QTreeWidgetItem *item = deviceTree->currentItem();
++ if (item) {
++ onItemDoubleClicked(item, 0);
++ }
++ }
++
++void MainWindow::onItemDoubleClicked(QTreeWidgetItem *item, int)
++{
++ QString name = item->text(0);
++ Q_FOREACH (QGst::DevicePtr device, monitor->devices()) {
++ if (device->name() == name) {
++ createElement(device);
++ break;
++ }
++ }
++}
+diff --git a/examples/devmon/mainwindow.h b/examples/devmon/mainwindow.h
+new file mode 100644
+index 0000000..71e4c35
+--- /dev/null
++++ b/examples/devmon/mainwindow.h
+@@ -0,0 +1,55 @@
++/*
++ Copyright (C) 2015 Pavel Bludov <pbludov@gmail.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 MAINWINDOW_H
++#define MAINWINDOW_H
++
++#include <QWidget>
++
++#include <QGst/DeviceMonitor>
++#include <QGst/Message>
++
++class QTextEdit;
++class QTreeWidget;
++class QTreeWidgetItem;
++
++class MainWindow : public QWidget
++{
++ Q_OBJECT
++
++public:
++ explicit MainWindow(QWidget *parent = 0);
++ ~MainWindow();
++
++private Q_SLOTS:
++ void onCreateElement();
++ void onCurrentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem*);
++ void onItemDoubleClicked(QTreeWidgetItem *item, int);
++
++private:
++ QAction *createElementAction;
++ QTreeWidget *deviceTree;
++ QTextEdit *propEdit;
++ QTextEdit *capsEdit;
++ QGst::DeviceMonitorPtr monitor;
++
++ void onBusMessage(const QGst::MessagePtr & msg);
++ void onDeviceAdded(const QGst::DevicePtr & device);
++ void onDeviceRemoved(const QGst::DevicePtr & device);
++ void createElement(const QGst::DevicePtr & device);
++};
++
++#endif // MAINWINDOW_H
+--
+2.26.2
+
diff --git a/0033-Fix-discoverer-test.patch b/0033-Fix-discoverer-test.patch
new file mode 100644
index 0000000..8808987
--- /dev/null
+++ b/0033-Fix-discoverer-test.patch
@@ -0,0 +1,27 @@
+From 1ebcb1c4ecd948d0fa9b12f80ec02afd7720a989 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Fri, 4 May 2018 17:40:59 +0300
+Subject: [PATCH 33/36] Fix discoverer test
+
+https://bugzilla.gnome.org/show_bug.cgi?id=710370
+---
+ tests/auto/discoverertest.cpp | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/auto/discoverertest.cpp b/tests/auto/discoverertest.cpp
+index 84dd760..ee9b92a 100644
+--- a/tests/auto/discoverertest.cpp
++++ b/tests/auto/discoverertest.cpp
+@@ -391,9 +391,6 @@ void DiscovererTest::setupDiscoveryData()
+ ->setSampleRate(48000)->setChannels(1)->setDepth(16)
+ ->addTag("audio-codec", "FLAC")
+ ->addTag("container-format", "Ogg"))
+- << StreamInfoPtr((new AudioStreamInfo("audio/x-flac"))
+- ->setSampleRate(48000)->setChannels(1)
+- ->setNative(false))
+ << StreamInfoPtr((new VideoStreamInfo("video/x-theora"))
+ ->setWidth(160)->setHeight(120)->setInterlaced(false)
+ ->setBitrate(200000)->setFramerate(QGst::Fraction(5, 1))
+--
+2.26.2
+
diff --git a/0034-Fix-QUIET-flag-in-FindGStreamer-and-FindGStreamerPlu.patch b/0034-Fix-QUIET-flag-in-FindGStreamer-and-FindGStreamerPlu.patch
new file mode 100644
index 0000000..a35224c
--- /dev/null
+++ b/0034-Fix-QUIET-flag-in-FindGStreamer-and-FindGStreamerPlu.patch
@@ -0,0 +1,125 @@
+From 7e0aa96a117414a947a899e28dea2b99cc4ef299 Mon Sep 17 00:00:00 2001
+From: "Daniele E. Domenichelli" <daniele.domenichelli@iit.it>
+Date: Tue, 10 Oct 2017 09:25:19 +0200
+Subject: [PATCH 34/36] Fix QUIET flag in FindGStreamer and
+ FindGStreamerPluginsBase
+
+---
+ cmake/modules/FindGStreamer.cmake | 10 ++++++----
+ cmake/modules/FindGStreamerPluginsBase.cmake | 12 +++++++++---
+ cmake/modules/MacroFindGStreamerLibrary.cmake | 6 +++---
+ 3 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake
+index 2c61cec..8ad91ca 100644
+--- a/cmake/modules/FindGStreamer.cmake
++++ b/cmake/modules/FindGStreamer.cmake
+@@ -33,7 +33,7 @@ set(GSTREAMER_ABI_VERSION "1.0")
+ find_package(PkgConfig)
+
+ if (PKG_CONFIG_FOUND)
+- pkg_check_modules(PKG_GSTREAMER gstreamer-${GSTREAMER_ABI_VERSION})
++ pkg_check_modules(PKG_GSTREAMER QUIET gstreamer-${GSTREAMER_ABI_VERSION})
+ if(PKG_GSTREAMER_FOUND)
+ exec_program(${PKG_CONFIG_EXECUTABLE}
+ ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION}
+@@ -79,7 +79,7 @@ mark_as_advanced(GSTREAMER_LIBRARY
+ include(MacroFindGStreamerLibrary)
+
+ macro(_find_gst_component _name _header)
+- find_gstreamer_library(${_name} ${_header} ${GSTREAMER_ABI_VERSION})
++ find_gstreamer_library(${_name} ${_header} ${GSTREAMER_ABI_VERSION} ${GStreamer_FIND_QUIETLY})
+ set(_GSTREAMER_EXTRA_VARIABLES ${_GSTREAMER_EXTRA_VARIABLES}
+ GSTREAMER_${_name}_LIBRARY GSTREAMER_${_name}_INCLUDE_DIR)
+ endmacro()
+@@ -103,7 +103,9 @@ endforeach()
+ if (GStreamer_FIND_VERSION)
+ if (PKG_GSTREAMER_FOUND)
+ if("${PKG_GSTREAMER_VERSION}" VERSION_LESS "${GStreamer_FIND_VERSION}")
+- message(STATUS "Found GStreamer version ${PKG_GSTREAMER_VERSION}, but at least version ${GStreamer_FIND_VERSION} is required")
++ if(NOT GStreamer_FIND_QUIETLY)
++ message(STATUS "Found GStreamer version ${PKG_GSTREAMER_VERSION}, but at least version ${GStreamer_FIND_VERSION} is required")
++ endif()
+ set(GSTREAMER_VERSION_COMPATIBLE FALSE)
+ else()
+ set(GSTREAMER_VERSION_COMPATIBLE TRUE)
+@@ -128,7 +130,7 @@ int main() { return 0; }
+ #endif
+ " GSTREAMER_VERSION_COMPATIBLE)
+
+- if (NOT GSTREAMER_VERSION_COMPATIBLE)
++ if (NOT GSTREAMER_VERSION_COMPATIBLE AND NOT GStreamer_FIND_QUIETLY)
+ message(STATUS "GStreamer ${GStreamer_FIND_VERSION} is required, but the version found is older")
+ endif()
+ else()
+diff --git a/cmake/modules/FindGStreamerPluginsBase.cmake b/cmake/modules/FindGStreamerPluginsBase.cmake
+index 6e75b8e..516cdc0 100644
+--- a/cmake/modules/FindGStreamerPluginsBase.cmake
++++ b/cmake/modules/FindGStreamerPluginsBase.cmake
+@@ -23,15 +23,19 @@ set(GSTREAMER_ABI_VERSION "1.0")
+ find_package(PkgConfig)
+
+ if (PKG_CONFIG_FOUND)
+- pkg_check_modules(PKG_GSTREAMER_PLUGINS_BASE gstreamer-plugins-base-${GSTREAMER_ABI_VERSION})
++ pkg_check_modules(PKG_GSTREAMER_PLUGINS_BASE QUIET gstreamer-plugins-base-${GSTREAMER_ABI_VERSION})
+ endif()
+
+
+ # Find the plugin libraries
+ include(MacroFindGStreamerLibrary)
+
++if (NOT DEFINED GStreamerPluginsBase_FIND_QUIETLY)
++ set(GStreamerPluginsBase_FIND_QUIETLY 0)
++endif()
++
+ macro(_find_gst_plugins_base_component _name _header)
+- find_gstreamer_library(${_name} ${_header} ${GSTREAMER_ABI_VERSION})
++ find_gstreamer_library(${_name} ${_header} ${GSTREAMER_ABI_VERSION} ${GStreamerPluginsBase_FIND_QUIETLY})
+ set(_GSTREAMER_PLUGINS_BASE_EXTRA_VARIABLES ${_GSTREAMER_PLUGINS_BASE_EXTRA_VARIABLES}
+ GSTREAMER_${_name}_LIBRARY GSTREAMER_${_name}_INCLUDE_DIR)
+ endmacro()
+@@ -67,7 +71,9 @@ endforeach()
+ if (GStreamerPluginsBase_FIND_VERSION)
+ if (PKG_GSTREAMER_PLUGINS_BASE_FOUND)
+ if("${PKG_GSTREAMER_PLUGINS_BASE_VERSION}" VERSION_LESS "${GStreamerPluginsBase_FIND_VERSION}")
+- message(STATUS "Found gst-plugins-base version ${PKG_GSTREAMER_PLUGINS_BASE_VERSION}, but at least version ${GStreamerPluginsBase_FIND_VERSION} is required")
++ if (NOT GStreamerPluginsBase_FIND_QUIETLY)
++ message(STATUS "Found gst-plugins-base version ${PKG_GSTREAMER_PLUGINS_BASE_VERSION}, but at least version ${GStreamerPluginsBase_FIND_VERSION} is required")
++ endif()
+ set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE FALSE)
+ else()
+ set(GSTREAMER_PLUGINS_BASE_VERSION_COMPATIBLE TRUE)
+diff --git a/cmake/modules/MacroFindGStreamerLibrary.cmake b/cmake/modules/MacroFindGStreamerLibrary.cmake
+index 761a80c..b46cbe8 100644
+--- a/cmake/modules/MacroFindGStreamerLibrary.cmake
++++ b/cmake/modules/MacroFindGStreamerLibrary.cmake
+@@ -6,7 +6,7 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-macro(find_gstreamer_library _name _header _abi_version)
++macro(find_gstreamer_library _name _header _abi_version _quiet)
+ string(TOLOWER ${_name} _lower_name)
+ string(TOUPPER ${_name} _upper_name)
+
+@@ -17,7 +17,7 @@ macro(find_gstreamer_library _name _header _abi_version)
+ endif()
+
+ if (PKG_CONFIG_FOUND)
+- pkg_check_modules(PKG_GSTREAMER_${_upper_name} gstreamer-${_lower_name}-${_abi_version})
++ pkg_check_modules(PKG_GSTREAMER_${_upper_name} QUIET gstreamer-${_lower_name}-${_abi_version})
+ endif()
+
+ find_library(GSTREAMER_${_upper_name}_LIBRARY
+@@ -39,7 +39,7 @@ macro(find_gstreamer_library _name _header _abi_version)
+ set(GSTREAMER_${_upper_name}_LIBRARY_FOUND FALSE)
+ endif()
+
+- if (NOT _GSTREAMER_${_upper_name}_QUIET)
++ if (NOT _GSTREAMER_${_upper_name}_QUIET AND NOT _quiet)
+ if (GSTREAMER_${_upper_name}_LIBRARY)
+ message(STATUS "Found GSTREAMER_${_upper_name}_LIBRARY: ${GSTREAMER_${_upper_name}_LIBRARY}")
+ else()
+--
+2.26.2
+
diff --git a/0035-README-add-maintenance-notice.patch b/0035-README-add-maintenance-notice.patch
new file mode 100644
index 0000000..b71fca7
--- /dev/null
+++ b/0035-README-add-maintenance-notice.patch
@@ -0,0 +1,65 @@
+From a0e95b202a72b6d9e48bd1949ab6811c0f3c91c3 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Sat, 5 May 2018 12:56:22 +0300
+Subject: [PATCH 35/36] README: add maintenance notice
+
+---
+ README | 32 ++++++++++++++++++++++++++++++--
+ 1 file changed, 30 insertions(+), 2 deletions(-)
+
+diff --git a/README b/README
+index 081fa5c..1d7d6cd 100644
+--- a/README
++++ b/README
+@@ -1,3 +1,30 @@
++0. Maintenance Notice
++---------------------
++
++This code is unmaintained. You can use it at your own risk.
++
++If you want to integrate video display in your QML-based UI,
++you should consider using 'qmlglsink', from gst-plugins-good.
++This is a well supported video sink that uses the generic
++gstreamer-gl stack and is in many ways superior to 'qtquick2videosink'
++that is provided by qt-gstreamer. You can use this code as an example:
++https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/qt/qmlsink
++
++If you are not interested in using QML in your UI, then you
++may use one of the other elements provided by this module
++(see below). If you do that, it would be helpful to let us
++know that this code is still useful to you. We may consider
++adding these elements in one of the core gstreamer modules.
++
++If you are here for the Qt-style bindings, I'm sorry to disappoint you.
++The alternative is to use the C API, or the GStreamermm C++ API.
++Qt-style bindings are cool, but unfortunately they are very hard
++to maintain because they are written by hand. If you are interested
++in continuing this project, you are welcome to implement a
++generator for them, probably based on GObject-Introspection.
++I am happy to provide directions if you want to pursue such a thing.
++
++
+ 1. About
+ --------
+
+@@ -188,14 +215,15 @@ Mailing list:
+
+ Irc channels:
+ irc://irc.freenode.net/gstreamer
+- irc://irc.freenode.net/qtgstreamer
+
+ Git repository:
+ http://cgit.freedesktop.org/gstreamer/qt-gstreamer/
+
+ Bugs, feature requests & patches should be sent at:
+ https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&component=qt-gstreamer
++ **Note**: This component has been closed as of May 5, 2018.
++ See the maintenance notice at the top of this file
+
+ --
+ George Kiagiadakis <george.kiagiadakis@collabora.com>
+-Last updated: Jun 24, 2014
++Last updated: May 5, 2018
+--
+2.26.2
+
diff --git a/gstreamer-1.16.patch b/0036-QGst-caps-compilation-fix-from-https-bugs.kde.org-sh.patch
similarity index 92%
rename from gstreamer-1.16.patch
rename to 0036-QGst-caps-compilation-fix-from-https-bugs.kde.org-sh.patch
index 770f651..2193dd1 100644
--- a/gstreamer-1.16.patch
+++ b/0036-QGst-caps-compilation-fix-from-https-bugs.kde.org-sh.patch
@@ -1,7 +1,7 @@
From 6e4fb2f3fcfb453c5522c66457ac5ed8c3b1b05c Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Sat, 7 Sep 2019 10:49:38 +0300
-Subject: QGst/caps: compilation fix from
+Subject: [PATCH 36/36] QGst/caps: compilation fix from
https://bugs.kde.org/show_bug.cgi?id=406676#c2
Because the macro version of gst_caps_copy() confuses the C++ compiler
@@ -24,5 +24,5 @@ index 3824d82..a15b701 100644
CapsPtr Caps::merge(CapsPtr & caps2)
--
-cgit v1.2.1
+2.26.2
diff --git a/qt-gstreamer-1.2.0-compile.patch b/qt-gstreamer-1.2.0-compile.patch
new file mode 100644
index 0000000..0edc2d3
--- /dev/null
+++ b/qt-gstreamer-1.2.0-compile.patch
@@ -0,0 +1,24 @@
+diff -up qt-gstreamer-1.2.0/src/QGst/event.cpp.omv~ qt-gstreamer-1.2.0/src/QGst/event.cpp
+--- qt-gstreamer-1.2.0/src/QGst/event.cpp.omv~ 2020-09-13 01:51:38.736603340 +0200
++++ qt-gstreamer-1.2.0/src/QGst/event.cpp 2020-09-13 01:51:52.392772567 +0200
+@@ -125,7 +125,7 @@ Segment SegmentEvent::segment() const
+ //********************************************************
+ TagEventPtr TagEvent::create(const TagList & taglist)
+ {
+- GstEvent * e = gst_event_new_tag(gst_tag_list_copy(taglist));
++ GstEvent * e = gst_event_new_tag(gst_tag_list_copy(static_cast<const GstTagList*>(taglist)));
+ return TagEventPtr::wrap(e, false);
+ }
+
+diff -up qt-gstreamer-1.2.0/src/QGst/message.cpp.omv~ qt-gstreamer-1.2.0/src/QGst/message.cpp
+--- qt-gstreamer-1.2.0/src/QGst/message.cpp.omv~ 2020-09-13 01:49:07.827740594 +0200
++++ qt-gstreamer-1.2.0/src/QGst/message.cpp 2020-09-13 01:51:29.278486194 +0200
+@@ -157,7 +157,7 @@ QString InfoMessage::debugMessage() cons
+
+ TagMessagePtr TagMessage::create(const ObjectPtr & source, const TagList & taglist)
+ {
+- GstMessage *m = gst_message_new_tag(source, gst_tag_list_copy(taglist));
++ GstMessage *m = gst_message_new_tag(source, gst_tag_list_copy(static_cast<const GstTagList*>(taglist)));
+ return TagMessagePtr::wrap(m, false);
+ }
+
diff --git a/qt-gstreamer.spec b/qt-gstreamer.spec
index c2128ff..acb6f51 100644
--- a/qt-gstreamer.spec
+++ b/qt-gstreamer.spec
@@ -8,33 +8,51 @@
Summary: C++ bindings for GStreamer with a Qt-style API
Name: qt-gstreamer
Version: 1.2.0
-Release: 11
+Release: 12
License: LGPLv2+
Group: Development/KDE and Qt
Url: http://gstreamer.freedesktop.org/wiki/QtGStreamer
Source0: http://gstreamer.freedesktop.org/src/qt-gstreamer/%{name}-%{version}.tar.xz
## upstream patches
-Patch0: 0000-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
-Patch1: 0001-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
-Patch2: 0002-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
-Patch3: 0003-when-built-against-1.4-the-unit-test-fails-because-i.patch
-Patch4: 0004-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
-Patch5: 0005-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
-Patch6: 0006-Create-an-empty-structure-to-pass-to-gst_message_new.patch
-Patch7: 0007-ElementMessage-also-needs-a-valid-structure.patch
-Patch8: 0008-Add-pbutils-include-directory-to-include-paths.patch
-Patch9: 0009-Workaround-build-failures-with-boost-1.57-and-moc.patch
-Patch10: 0010-Fix-compilation-with-GStreamer-1.5.1.patch
-Patch11: 0011-whitespace-cleanup.patch
-Patch12: 0012-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
-Patch13: 0013-It-appears-there-is-only-one-attachement.patch
-Patch14: 0014-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
-Patch15: 0015-Fix-build-with-Clang-3.8.patch
-Patch16: 0016-gst_message_new_application-fails-when-passed-a-NULL.patch
-
+Patch0: 0001-gstqtvideosink-fix-memory-leak-and-synchronization-i.patch
+Patch1: 0002-CMakeLists.txt-actually-require-GStreamer-1.2.0.patch
+Patch2: 0003-qtglvideosinkbase-don-t-use-variable-name-interface-.patch
+Patch3: 0004-when-built-against-1.4-the-unit-test-fails-because-i.patch
+Patch4: 0005-gstreamer-now-supports-animated-PNGs-so-PNG-is-now-a.patch
+Patch5: 0006-tests-auto-taglisttest.cpp-it-appears-tag-lists-remo.patch
+Patch6: 0007-Create-an-empty-structure-to-pass-to-gst_message_new.patch
+Patch7: 0008-ElementMessage-also-needs-a-valid-structure.patch
+Patch8: 0009-Add-pbutils-include-directory-to-include-paths.patch
+Patch9: 0010-Workaround-build-failures-with-boost-1.57-and-moc.patch
+Patch10: 0011-Fix-compilation-with-GStreamer-1.5.1.patch
+Patch11: 0012-whitespace-cleanup.patch
+Patch12: 0013-By-GStreamer-1.6-the-audio-codec-name-for-FLAC-chang.patch
+Patch13: 0014-It-appears-there-is-only-one-attachement.patch
+Patch14: 0015-The-geometry-must-never-be-set-to-0-once-the-node-is.patch
+Patch15: 0016-Fix-build-with-Clang-3.8.patch
+Patch16: 0017-gst_message_new_application-fails-when-passed-a-NULL.patch
+Patch17: 0018-Set-default-empty-structure-on-Application-and-Eleme.patch
+Patch18: 0019-Fix-crash-when-the-VideoItem-moves-in-the-SceneGraph.patch
+Patch19: 0020-Fix-QGst-Memory-bug-on-case-insensitive-fs.patch
+Patch20: 0021-Fix-QtGStreamer-lookup-on-Qt5.patch
+Patch21: 0022-QGst-Pad-strong-ref-the-event-in-sendEvent.patch
+Patch22: 0023-qt5glvideosink-fix-of-too-much-red-value-in-video.patch
+Patch23: 0024-Fix-cmake-with-Qt-5.11_beta3-dropping-qt5_use_module.patch
+Patch24: 0025-openglsurfacepainter.cpp-remove-1-for-right-and-bott.patch
+Patch25: 0026-videomaterial.cpp-Prevent-the-use-of-uninitialized-t.patch
+Patch26: 0027-FindGLIB2-Do-not-use-REQUIRED-to-find-PkgConfig-and-.patch
+Patch27: 0028-FindGStreamer-Do-not-search-for-plugin-dir-if-gstrea.patch
+Patch28: 0029-FindGStreamer-Fix-cases-where-gst.h-and-gstconfig.h-.patch
+Patch29: 0030-Use-GSTREAMER_INCLUDE_DIRS-instead-of-GSTREAMER_INCL.patch
+Patch30: 0031-Device-DeviceMonitor-support.patch
+Patch31: 0032-DeviceMonitor-example.patch
+Patch32: 0033-Fix-discoverer-test.patch
+Patch33: 0034-Fix-QUIET-flag-in-FindGStreamer-and-FindGStreamerPlu.patch
+Patch34: 0035-README-add-maintenance-notice.patch
+Patch35: 0036-QGst-caps-compilation-fix-from-https-bugs.kde.org-sh.patch
## uptreamable patches
-Patch100: qt-gstreamer-1.2.0-boost_160.patch
-Patch101: https://git.archlinux.org/svntogit/packages.git/plain/trunk/gstreamer-1.16.patch
+#Patch100: qt-gstreamer-1.2.0-boost_160.patch
+Patch101: qt-gstreamer-1.2.0-compile.patch
BuildRequires: bison
BuildRequires: cmake