[GStreamer] 0.11 build broken (again)
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 16:52:20 +0000 (16:52 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 16:52:20 +0000 (16:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93474

Reviewed by Martin Robinson.

.:

* configure.ac: Disable media-stream build if GStreamer 0.11
support is enabled, due to farstream-0.1 still messing up with
gstreamer-0.10 include path.

Source/WebCore:

Adapt the GStreamer media player backend to the latest GStreamer
0.11 API changes.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
(gstObjectIsFloating):
* platform/graphics/gstreamer/GStreamerVersioning.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
configure.ac

index 67b686d..927e893 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-08-08  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] 0.11 build broken (again)
+        https://bugs.webkit.org/show_bug.cgi?id=93474
+
+        Reviewed by Martin Robinson.
+
+        * configure.ac: Disable media-stream build if GStreamer 0.11
+        support is enabled, due to farstream-0.1 still messing up with
+        gstreamer-0.10 include path.
+
 2012-08-07  YoungTaeck Song  <youngtaeck.song@samsung.com>
 
         [WK2][EFL] Implement accelerated compositing on WK2 Efl port
index 7e7bdc4..0436ffb 100644 (file)
@@ -1,3 +1,21 @@
+2012-08-08  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] 0.11 build broken (again)
+        https://bugs.webkit.org/show_bug.cgi?id=93474
+
+        Reviewed by Martin Robinson.
+
+        Adapt the GStreamer media player backend to the latest GStreamer
+        0.11 API changes.
+
+        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
+        (WTF::adoptGRef):
+        * platform/graphics/gstreamer/GStreamerVersioning.cpp:
+        (gstObjectIsFloating):
+        * platform/graphics/gstreamer/GStreamerVersioning.h:
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (StreamingClient::didReceiveResponse):
+
 2012-08-08  Loïc Yhuel  <loic.yhuel@softathome.com>
 
         [Qt] Compile errors with OpenGLES2
index 062e3fc..37468bc 100644 (file)
@@ -28,7 +28,7 @@ namespace WTF {
 
 template <> GRefPtr<GstElement> adoptGRef(GstElement* ptr)
 {
-    ASSERT(!ptr || !GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!ptr || !gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstElement>(ptr, GRefPtrAdopt);
 }
 
@@ -48,7 +48,7 @@ template <> void derefGPtr<GstElement>(GstElement* ptr)
 
 template <> GRefPtr<GstPad> adoptGRef(GstPad* ptr)
 {
-    ASSERT(!ptr || !GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!ptr || !gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstPad>(ptr, GRefPtrAdopt);
 }
 
@@ -68,7 +68,7 @@ template <> void derefGPtr<GstPad>(GstPad* ptr)
 
 template <> GRefPtr<GstPadTemplate> adoptGRef(GstPadTemplate* ptr)
 {
-    ASSERT(!ptr || !GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!ptr || !gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstPadTemplate>(ptr, GRefPtrAdopt);
 }
 
@@ -102,7 +102,7 @@ template <> void derefGPtr<GstCaps>(GstCaps* ptr)
 
 template <> GRefPtr<GstTask> adoptGRef(GstTask* ptr)
 {
-    ASSERT(!GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstTask>(ptr, GRefPtrAdopt);
 }
 
@@ -122,7 +122,7 @@ template <> void derefGPtr<GstTask>(GstTask* ptr)
 
 template <> GRefPtr<GstBus> adoptGRef(GstBus* ptr)
 {
-    ASSERT(!GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstBus>(ptr, GRefPtrAdopt);
 }
 
@@ -142,7 +142,7 @@ template <> void derefGPtr<GstBus>(GstBus* ptr)
 
 template <> GRefPtr<GstElementFactory> adoptGRef(GstElementFactory* ptr)
 {
-    ASSERT(!GST_OBJECT_IS_FLOATING(GST_OBJECT(ptr)));
+    ASSERT(!gstObjectIsFloating(GST_OBJECT(ptr)));
     return GRefPtr<GstElementFactory>(ptr, GRefPtrAdopt);
 }
 
index 06a8c9e..3c3f367 100644 (file)
@@ -22,6 +22,7 @@
 #include "GStreamerVersioning.h"
 
 #include "IntSize.h"
+#include <wtf/UnusedParam.h>
 
 void webkitGstObjectRefSink(GstObject* gstObject)
 {
@@ -105,3 +106,22 @@ void setGstElementClassMetadata(GstElementClass* elementClass, const char* name,
     gst_element_class_set_details_simple(elementClass, name, longName, description, author);
 #endif
 }
+
+bool gstObjectIsFloating(GstObject* gstObject)
+{
+#ifdef GST_API_VERSION_1
+    return g_object_is_floating(G_OBJECT(gstObject));
+#else
+    return GST_OBJECT_IS_FLOATING(gstObject);
+#endif
+}
+
+void notifyGstTagsOnPad(GstElement* element, GstPad* pad, GstTagList* tags)
+{
+#ifdef GST_API_VERSION_1
+    UNUSED_PARAM(element);
+    gst_pad_push_event(GST_PAD_CAST(pad), gst_event_new_tag(tags));
+#else
+    gst_element_found_tags_for_pad(element, pad, tags);
+#endif
+}
index 6b21b63..a8e5182 100644 (file)
@@ -32,4 +32,6 @@ GstCaps* webkitGstGetPadCaps(GstPad*);
 bool getVideoSizeAndFormatFromCaps(GstCaps*, WebCore::IntSize&, GstVideoFormat&, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride);
 GstBuffer* createGstBuffer(GstBuffer*);
 void setGstElementClassMetadata(GstElementClass*, const char* name, const char* longName, const char* description, const char* author);
+bool gstObjectIsFloating(GstObject*);
+void notifyGstTagsOnPad(GstElement*, GstPad*, GstTagList*);
 #endif // GStreamerVersioning_h
index 38aaec1..d454bdf 100644 (file)
@@ -853,11 +853,7 @@ void StreamingClient::didReceiveResponse(ResourceHandle*, const ResourceResponse
         gst_tag_list_free(tags);
 #endif
     else
-#ifdef GST_API_VERSION_1
-        gst_pad_push_event(GST_PAD_CAST(m_src->priv->srcpad), gst_event_new_tag("WebKitWebSrc", tags));
-#else
-        gst_element_found_tags_for_pad(GST_ELEMENT(m_src), m_src->priv->srcpad, tags);
-#endif
+        notifyGstTagsOnPad(GST_ELEMENT(m_src), tags, m_src->priv->srcpad);
 }
 
 void StreamingClient::didReceiveData(ResourceHandle* handle, const char* data, int length, int encodedDataLength)
index 63b7e24..7ea5b95 100644 (file)
@@ -470,6 +470,11 @@ AC_SUBST(ENCHANT_CFLAGS)
 AC_SUBST(ENCHANT_LIBS)
 fi
 
+# farstream-0.1 depends on gstreamer 0.10 currently. Disable
+# media_stream if gstreamer 0.11 build support is enabled.
+if test "$GST_API_VERSION" = "1.0"; then
+   enable_media_stream=false
+fi
 if test "$enable_media_stream" = "yes"; then
    PKG_CHECK_MODULES([FARSTREAM], [farstream-0.1],
                      [have_farstream=yes], [enable_media_stream=false])