All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-qt5][PATCH] qtmultimedia: Fixing the build against gstreamer 0.10 version
@ 2014-09-01 12:40 Sujith H
  2014-09-23 18:01 ` Martin Jansa
  0 siblings, 1 reply; 2+ messages in thread
From: Sujith H @ 2014-09-01 12:40 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Sujith H

From: Sujith H <Sujith_Haridasan@mentor.com>

This patch fixes the qtmultimedia built against gstreamer
version 0.10, its been taken from:
https://qt.gitorious.org/qt/qtmultimedia/commit/4a6a71e5218446caf1084bc1d76ba8fc5ff38a88.patch

Signed-off-by: Sujith H <Sujith_Haridasan@mentor.com>
Signed-off-by: Sujith H <sujith.h@gmail.com>
---
 recipes-qt/qt5/qtmultimedia.inc                    |   1 +
 ...ation_when_building_against_Gstreamer_010.patch | 140 +++++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch

diff --git a/recipes-qt/qt5/qtmultimedia.inc b/recipes-qt/qt5/qtmultimedia.inc
index 5c075fa..216c711 100644
--- a/recipes-qt/qt5/qtmultimedia.inc
+++ b/recipes-qt/qt5/qtmultimedia.inc
@@ -12,6 +12,7 @@ EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'gstreamer010', 'CONFI
 SRC_URI += "\
     file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \
     file://0002-qtmultimedia.pro-Respect-OE_GSTREAMER_ENABLED-OE_GST.patch \
+    file:////Fix_compilation_when_building_against_Gstreamer_010.patch \
 "
 
 # older copyright year than what e.g. qtbase is using now
diff --git a/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch b/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch
new file mode 100644
index 0000000..2bdfd1c
--- /dev/null
+++ b/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch
@@ -0,0 +1,140 @@
+Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/gstvideoconnector.c
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/gstvideoconnector.c	2014-08-26 15:33:22.779851730 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/gstvideoconnector.c	2014-08-26 15:35:23.462334601 +0530
+@@ -464,7 +464,11 @@
+     if (element->relinked)
+         GST_LOG_OBJECT(element, "rejected buffer because of new segment request");
+ 
++#if GST_CHECK_VERSION(1,0,0)
+     return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK;
++#else
++    return !element->relinked;
++#endif
+ }
+ 
+ static GstFlowReturn
+@@ -620,8 +624,6 @@
+ static gboolean gst_video_connector_handle_sink_event (GstPad * pad,
+                                                        GstEvent * event)
+ {
+-    (void)parent;
+-
+     if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
+         GstVideoConnector *element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad));
+ 
+Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreameraudioprobecontrol.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstreameraudioprobecontrol.cpp	2014-08-26 15:33:22.779851730 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreameraudioprobecontrol.cpp	2014-08-26 15:36:24.721556554 +0530
+@@ -59,7 +59,7 @@
+ #else
+ void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer)
+ {
+-    gst_buffer_get_caps(buffer);
++    GstCaps* caps = gst_buffer_get_caps(buffer);
+ #endif
+     if (!caps)
+         return;
+Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreamervideowindow.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstreamervideowindow.cpp	2014-08-26 15:33:22.779851730 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreamervideowindow.cpp	2014-08-26 15:37:20.040866691 +0530
+@@ -45,11 +45,12 @@
+ #include <QtCore/qdebug.h>
+ 
+ #include <gst/gst.h>
+-#include <gst/video/videooverlay.h>
+ 
+ #if !GST_CHECK_VERSION(1,0,0)
+ #include <gst/interfaces/xoverlay.h>
+ #include <gst/interfaces/propertyprobe.h>
++#else
++#include <gst/video/videooverlay.h>
+ #endif
+ 
+ 
+Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstutils.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstutils.cpp	2014-08-26 15:33:22.779851730 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstutils.cpp	2014-08-26 16:20:52.678555714 +0530
+@@ -426,7 +426,7 @@
+ 
+ void qt_gst_object_ref_sink(gpointer object)
+ {
+-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 24) || GST_CHECK_VERSION(1,0,0)
++#if GST_CHECK_VERSION(0,10,24)
+     gst_object_ref_sink(object);
+ #else
+     g_return_if_fail (GST_IS_OBJECT(object));
+Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qvideosurfacegstsink.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qvideosurfacegstsink.cpp	2014-08-26 15:33:22.779851730 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qvideosurfacegstsink.cpp	2014-08-26 16:21:55.513763878 +0530
+@@ -988,6 +988,8 @@
+     }
+ #if GST_CHECK_VERSION(1, 0, 0)
+     return GST_BASE_SINK_CLASS (sink_parent_class)->event (base, event);
++#else
++    return TRUE;
+ #endif
+ }
+ 
+Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp	2014-08-26 15:33:22.795851528 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp	2014-08-26 16:24:12.972034154 +0530
+@@ -96,12 +96,16 @@
+ #if GST_CHECK_VERSION(1,0,0)
+         if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED))
+             continue;
++
++        GstRegistry *registry = gst_registry_get();
+ #else
+         if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED
+             continue;
++
++        GstRegistry *registry = gst_registry_get_default();
+ #endif
+-        orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get (),
+-                                                                         gst_plugin_get_name(plugin));
++        orig_features = features = gst_registry_get_feature_list_by_plugin(registry,
++                                                                           gst_plugin_get_name(plugin));
+         while (features) {
+             if (!G_UNLIKELY(features->data == NULL)) {
+                 GstPluginFeature *feature = GST_PLUGIN_FEATURE(features->data);
+Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp	2014-08-26 15:33:22.795851528 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp	2014-08-26 16:25:57.016761779 +0530
+@@ -110,12 +110,16 @@
+ #if GST_CHECK_VERSION(1,0,0)
+         if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED))
+             continue;
++
++        GstRegistry *registry = gst_registry_get();
+ #else
+         if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED
+             continue;
++
++        GstRegistry *registry = gst_registry_get_default();
+ #endif
+ 
+-        orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get(),
++        orig_features = features = gst_registry_get_feature_list_by_plugin(registry,
+                                                                            gst_plugin_get_name(plugin));
+         while (features) {
+             if (!G_UNLIKELY(features->data == NULL)) {
+Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+===================================================================
+--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp	2014-08-26 15:33:22.795851528 +0530
++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp	2014-08-26 16:26:42.122736934 +0530
+@@ -1825,7 +1825,7 @@
+ 
+ #else
+ 
+-static gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data)
++gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data)
+ {
+     Q_UNUSED(pad);
+ 
-- 
1.8.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-qt5][PATCH] qtmultimedia: Fixing the build against gstreamer 0.10 version
  2014-09-01 12:40 [meta-qt5][PATCH] qtmultimedia: Fixing the build against gstreamer 0.10 version Sujith H
@ 2014-09-23 18:01 ` Martin Jansa
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Jansa @ 2014-09-23 18:01 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Sujith H

[-- Attachment #1: Type: text/plain, Size: 9853 bytes --]

On Mon, Sep 01, 2014 at 06:10:34PM +0530, Sujith H wrote:
> From: Sujith H <Sujith_Haridasan@mentor.com>
> 
> This patch fixes the qtmultimedia built against gstreamer
> version 0.10, its been taken from:
> https://qt.gitorious.org/qt/qtmultimedia/commit/4a6a71e5218446caf1084bc1d76ba8fc5ff38a88.patch
> 
> Signed-off-by: Sujith H <Sujith_Haridasan@mentor.com>
> Signed-off-by: Sujith H <sujith.h@gmail.com>
> ---
>  recipes-qt/qt5/qtmultimedia.inc                    |   1 +
>  ...ation_when_building_against_Gstreamer_010.patch | 140 +++++++++++++++++++++
>  2 files changed, 141 insertions(+)
>  create mode 100644 recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch
> 
> diff --git a/recipes-qt/qt5/qtmultimedia.inc b/recipes-qt/qt5/qtmultimedia.inc
> index 5c075fa..216c711 100644
> --- a/recipes-qt/qt5/qtmultimedia.inc
> +++ b/recipes-qt/qt5/qtmultimedia.inc
> @@ -12,6 +12,7 @@ EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'gstreamer010', 'CONFI
>  SRC_URI += "\
>      file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \
>      file://0002-qtmultimedia.pro-Respect-OE_GSTREAMER_ENABLED-OE_GST.patch \
> +    file:////Fix_compilation_when_building_against_Gstreamer_010.patch \

Did you test your patch? This //// doesn't look correct and fails here:
WARNING: Unable to get checksum for qtmultimedia SRC_URI entry
Fix_compilation_when_building_against_Gstreamer_010.patch: [Errno 2] No such file or directory: '//Fix_compilation_when_building_against_Gstreamer_010.patch'

Please re-test and re-send (also use normal git headers in the patch
itself and add Upstream-Status and SOB line in .patch - move it from
commit message).

>  "
>  
>  # older copyright year than what e.g. qtbase is using now
> diff --git a/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch b/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch
> new file mode 100644
> index 0000000..2bdfd1c
> --- /dev/null
> +++ b/recipes-qt/qt5/qtmultimedia/Fix_compilation_when_building_against_Gstreamer_010.patch
> @@ -0,0 +1,140 @@
> +Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/gstvideoconnector.c
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/gstvideoconnector.c	2014-08-26 15:33:22.779851730 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/gstvideoconnector.c	2014-08-26 15:35:23.462334601 +0530
> +@@ -464,7 +464,11 @@
> +     if (element->relinked)
> +         GST_LOG_OBJECT(element, "rejected buffer because of new segment request");
> + 
> ++#if GST_CHECK_VERSION(1,0,0)
> +     return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK;
> ++#else
> ++    return !element->relinked;
> ++#endif
> + }
> + 
> + static GstFlowReturn
> +@@ -620,8 +624,6 @@
> + static gboolean gst_video_connector_handle_sink_event (GstPad * pad,
> +                                                        GstEvent * event)
> + {
> +-    (void)parent;
> +-
> +     if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
> +         GstVideoConnector *element = GST_VIDEO_CONNECTOR (gst_pad_get_parent (pad));
> + 
> +Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreameraudioprobecontrol.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstreameraudioprobecontrol.cpp	2014-08-26 15:33:22.779851730 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreameraudioprobecontrol.cpp	2014-08-26 15:36:24.721556554 +0530
> +@@ -59,7 +59,7 @@
> + #else
> + void QGstreamerAudioProbeControl::bufferProbed(GstBuffer* buffer)
> + {
> +-    gst_buffer_get_caps(buffer);
> ++    GstCaps* caps = gst_buffer_get_caps(buffer);
> + #endif
> +     if (!caps)
> +         return;
> +Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreamervideowindow.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstreamervideowindow.cpp	2014-08-26 15:33:22.779851730 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstreamervideowindow.cpp	2014-08-26 15:37:20.040866691 +0530
> +@@ -45,11 +45,12 @@
> + #include <QtCore/qdebug.h>
> + 
> + #include <gst/gst.h>
> +-#include <gst/video/videooverlay.h>
> + 
> + #if !GST_CHECK_VERSION(1,0,0)
> + #include <gst/interfaces/xoverlay.h>
> + #include <gst/interfaces/propertyprobe.h>
> ++#else
> ++#include <gst/video/videooverlay.h>
> + #endif
> + 
> + 
> +Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstutils.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qgstutils.cpp	2014-08-26 15:33:22.779851730 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qgstutils.cpp	2014-08-26 16:20:52.678555714 +0530
> +@@ -426,7 +426,7 @@
> + 
> + void qt_gst_object_ref_sink(gpointer object)
> + {
> +-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 24) || GST_CHECK_VERSION(1,0,0)
> ++#if GST_CHECK_VERSION(0,10,24)
> +     gst_object_ref_sink(object);
> + #else
> +     g_return_if_fail (GST_IS_OBJECT(object));
> +Index: qtmultimedia-opensource-src-5.3.1/src/gsttools/qvideosurfacegstsink.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/gsttools/qvideosurfacegstsink.cpp	2014-08-26 15:33:22.779851730 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/gsttools/qvideosurfacegstsink.cpp	2014-08-26 16:21:55.513763878 +0530
> +@@ -988,6 +988,8 @@
> +     }
> + #if GST_CHECK_VERSION(1, 0, 0)
> +     return GST_BASE_SINK_CLASS (sink_parent_class)->event (base, event);
> ++#else
> ++    return TRUE;
> + #endif
> + }
> + 
> +Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp	2014-08-26 15:33:22.795851528 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp	2014-08-26 16:24:12.972034154 +0530
> +@@ -96,12 +96,16 @@
> + #if GST_CHECK_VERSION(1,0,0)
> +         if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED))
> +             continue;
> ++
> ++        GstRegistry *registry = gst_registry_get();
> + #else
> +         if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED
> +             continue;
> ++
> ++        GstRegistry *registry = gst_registry_get_default();
> + #endif
> +-        orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get (),
> +-                                                                         gst_plugin_get_name(plugin));
> ++        orig_features = features = gst_registry_get_feature_list_by_plugin(registry,
> ++                                                                           gst_plugin_get_name(plugin));
> +         while (features) {
> +             if (!G_UNLIKELY(features->data == NULL)) {
> +                 GstPluginFeature *feature = GST_PLUGIN_FEATURE(features->data);
> +Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp	2014-08-26 15:33:22.795851528 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp	2014-08-26 16:25:57.016761779 +0530
> +@@ -110,12 +110,16 @@
> + #if GST_CHECK_VERSION(1,0,0)
> +         if (GST_OBJECT_FLAG_IS_SET(plugin, GST_PLUGIN_FLAG_BLACKLISTED))
> +             continue;
> ++
> ++        GstRegistry *registry = gst_registry_get();
> + #else
> +         if (plugin->flags & (1<<1)) //GST_PLUGIN_FLAG_BLACKLISTED
> +             continue;
> ++
> ++        GstRegistry *registry = gst_registry_get_default();
> + #endif
> + 
> +-        orig_features = features = gst_registry_get_feature_list_by_plugin(gst_registry_get(),
> ++        orig_features = features = gst_registry_get_feature_list_by_plugin(registry,
> +                                                                            gst_plugin_get_name(plugin));
> +         while (features) {
> +             if (!G_UNLIKELY(features->data == NULL)) {
> +Index: qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
> +===================================================================
> +--- qtmultimedia-opensource-src-5.3.1.orig/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp	2014-08-26 15:33:22.795851528 +0530
> ++++ qtmultimedia-opensource-src-5.3.1/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp	2014-08-26 16:26:42.122736934 +0530
> +@@ -1825,7 +1825,7 @@
> + 
> + #else
> + 
> +-static gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data)
> ++gboolean QGstreamerPlayerSession::padVideoBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data)
> + {
> +     Q_UNUSED(pad);
> + 
> -- 
> 1.8.4
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-23 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-01 12:40 [meta-qt5][PATCH] qtmultimedia: Fixing the build against gstreamer 0.10 version Sujith H
2014-09-23 18:01 ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.