2010-09-28 Philippe Normand <pnormand@igalia.com>
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2010 06:50:34 +0000 (06:50 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2010 06:50:34 +0000 (06:50 +0000)
        Reviewed by Martin Robinson.

        check USE(GSTREAMER) instead of ENABLE(VIDEO) in gstreamer/ files
        https://bugs.webkit.org/show_bug.cgi?id=46717

        Define WTF_USE_GSTREAMER if configure found the gstreamer
        development files and add the macro in the gcc command-line if needed.

        * GNUmakefile.am:
        * configure.ac:

WebCore:

        Reviewed by Martin Robinson.

        check USE(GSTREAMER) instead of ENABLE(VIDEO) in gstreamer/ files
        https://bugs.webkit.org/show_bug.cgi?id=46717

        Guard the gstreamer/ files with USE(GSTREAMER), which is more
        explicit than ENABLE(VIDEO).

        * GNUmakefile.am: Define WTF_USE_GSTREAMER only if GStreamer
        support is enabled.
        * platform/graphics/gstreamer/DataSourceGStreamer.cpp:
        * platform/graphics/gstreamer/DataSourceGStreamer.h:
        * platform/graphics/gstreamer/GOwnPtrGStreamer.cpp:
        * platform/graphics/gstreamer/GOwnPtrGStreamer.h:
        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
        * platform/graphics/gstreamer/GStreamerGWorld.h:
        * platform/graphics/gstreamer/ImageGStreamer.h:
        * platform/graphics/gstreamer/ImageGStreamerCG.mm:
        * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/PlatformVideoWindow.h:
        * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp:
        * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp:
        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
        * platform/graphics/gstreamer/VideoSinkGStreamer.h:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:

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

23 files changed:
ChangeLog
GNUmakefile.am
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/platform/graphics/gstreamer/DataSourceGStreamer.cpp
WebCore/platform/graphics/gstreamer/DataSourceGStreamer.h
WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.cpp
WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.h
WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
WebCore/platform/graphics/gstreamer/GStreamerGWorld.h
WebCore/platform/graphics/gstreamer/ImageGStreamer.h
WebCore/platform/graphics/gstreamer/ImageGStreamerCG.mm
WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp
WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h
WebCore/platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp
WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.h
WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h
configure.ac

index 3f3a7a8621664c0df8cecb6587da99666c4f1902..57b5f5dbe358d0b74f96e30c31a14e69262ee484 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-28  Philippe Normand  <pnormand@igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        check USE(GSTREAMER) instead of ENABLE(VIDEO) in gstreamer/ files
+        https://bugs.webkit.org/show_bug.cgi?id=46717
+
+        Define WTF_USE_GSTREAMER if configure found the gstreamer
+        development files and add the macro in the gcc command-line if needed.
+
+        * GNUmakefile.am:
+        * configure.ac:
+
 2010-09-28  Kevin Ollivier  <kevino@theolliviers.com>
 
         [wx] Build fix, build sources that used to be built as part of other sources.
index 2a866cd4727ce6cfcff3135fa22e1ce60bc19c78..1c95cd192699387ed06f9cb1a0b9e37eb6f87c31 100644 (file)
@@ -273,6 +273,11 @@ global_cppflags += \
        -DUSE_SYSTEM_MALLOC
 endif
 
+if USE_GSTREAMER
+global_cppflags += \
+       -DWTF_USE_GSTREAMER=1
+endif
+
 # ----
 # GTK+ 2.x/3.x support
 # ----
index a6c7a2aaaf9021cfab8d5c47d62696c399bf3a99..49763766eb1459264f8f91d5f93050070edb632d 100644 (file)
@@ -1,3 +1,34 @@
+2010-09-28  Philippe Normand  <pnormand@igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        check USE(GSTREAMER) instead of ENABLE(VIDEO) in gstreamer/ files
+        https://bugs.webkit.org/show_bug.cgi?id=46717
+
+        Guard the gstreamer/ files with USE(GSTREAMER), which is more
+        explicit than ENABLE(VIDEO).
+
+        * GNUmakefile.am: Define WTF_USE_GSTREAMER only if GStreamer
+        support is enabled.
+        * platform/graphics/gstreamer/DataSourceGStreamer.cpp:
+        * platform/graphics/gstreamer/DataSourceGStreamer.h:
+        * platform/graphics/gstreamer/GOwnPtrGStreamer.cpp:
+        * platform/graphics/gstreamer/GOwnPtrGStreamer.h:
+        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+        * platform/graphics/gstreamer/GStreamerGWorld.h:
+        * platform/graphics/gstreamer/ImageGStreamer.h:
+        * platform/graphics/gstreamer/ImageGStreamerCG.mm:
+        * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+        * platform/graphics/gstreamer/PlatformVideoWindow.h:
+        * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp:
+        * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp:
+        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+        * platform/graphics/gstreamer/VideoSinkGStreamer.h:
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
+
 2010-09-28  Kent Tamura  <tkent@chromium.org>
 
         Unreviewed, windows build fix for r68629.
index ac9b719667ec2781783bbfac2d98d7024826020d..985b5ceaa19465a066b32cb89bf57f9e040f1add 100644 (file)
@@ -71,7 +71,6 @@ webcore_cppflags += \
 webcoregtk_cppflags += \
        -DWEBKITGTK_API_VERSION_STRING=\"@WEBKITGTK_API_VERSION@\" \
        -DWTF_USE_SOUP=1 \
-       -DWTF_USE_GSTREAMER=1 \
        -I$(srcdir)/WebCore/accessibility/gtk \
        -I$(srcdir)/WebCore/loader/gtk \
        -I$(srcdir)/WebCore/page/gtk \
@@ -3875,6 +3874,7 @@ FEATURE_DEFINES += ENABLE_VIDEO=1
 HTML_FEATURES += ENABLE_VIDEO=1
 webcore_cppflags += -DENABLE_VIDEO=1
 
+if USE_GSTREAMER
 if ENABLE_DEBUG
 webcore_cppflags += -DGST_DISABLE_DEPRECATED
 endif # END ENABLE_DEBUG
@@ -3883,6 +3883,7 @@ webcore_libadd += \
        -lgstvideo-0.10 \
        -lgstpbutils-0.10 \
        -lgstapp-0.10
+endif # END USE_GSTREAMER
 endif # END ENABLE_VIDEO
 
 # ----
index 63555bf2de96f7a836873199eeee02f8e9f32682..5a94fd4a1ae7aeb4ac92d64aef028a2955900464 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "config.h"
 #include "DataSourceGStreamer.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <gio/gio.h>
 #include <glib.h>
@@ -243,4 +243,4 @@ static void webkit_data_src_uri_handler_init(gpointer g_iface, gpointer iface_da
     iface->set_uri = webkit_data_src_uri_set_uri;
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 453685a9d0d3891fece174366223a8516fe5422a..d462ccc419713d3fc0559eaaad36613bde25444d 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef DataSourceGStreamer_h
 #define DataSourceGStreamer_h
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <glib-object.h>
 #include <gst/base/gstbasesrc.h>
@@ -53,5 +53,5 @@ GType webkit_data_src_get_type(void);
 
 G_END_DECLS
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 63334371d50f4de2e1a0005d54dc6caebb65f542..06eec14d61367f28d36cf0df57847ac39cd944c5 100644 (file)
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "GOwnPtrGStreamer.h"
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 #include <gst/gstelement.h>
 
 namespace WTF {
@@ -32,4 +32,4 @@ template <> void freeOwnedGPtr<GstElement>(GstElement* ptr)
 }
 
 }
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 84a3e307607781ef7b81a794d4d2999156ba7f06..672a23d3a0af8fdf8c64b6dac2d2e37bd807c0e9 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef GOwnPtrGStreamer_h
 #define GOwnPtrGStreamer_h
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "GOwnPtr.h"
 
@@ -31,5 +31,5 @@ template<> void freeOwnedGPtr<GstElement>(GstElement* ptr);
 
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index efccff0d320a3619a46a9a424a19e4fec81f5cc1..539d92a3d872682979fa4b3455ac47c4e841e525 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "GStreamerGWorld.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "GOwnPtrGStreamer.h"
 #include <gst/gst.h>
@@ -203,4 +203,4 @@ void GStreamerGWorld::setWindowOverlay(GstMessage* message)
 }
 
 }
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 282f13c34a81ffa8e80ce873a4d203002729b6bc..f519911f23a43d5cf490f22644653738729c0698 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifndef GStreamerGWorld_h
 #define GStreamerGWorld_h
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "PlatformVideoWindow.h"
 #include "RefCounted.h"
@@ -62,5 +62,5 @@ private:
 };
 
 }
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 4a4ff2ba21296dd37e395a035f9e8e39178901e5..cf2b9d655ba5502eaf0ceac67b5dc45897777e55 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef ImageGStreamer_h
 #define ImageGStreamer_h
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "BitmapImage.h"
 #include <gst/gst.h>
@@ -59,5 +59,5 @@ class ImageGStreamer : public RefCounted<ImageGStreamer> {
     };
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 076df4a00afde97542728fa4f66b4f02e8c9c909..c73adc015405076d802125202f40698bfdcf7833 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "ImageGStreamer.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 using namespace WebCore;
 
@@ -57,4 +57,4 @@ ImageGStreamer::~ImageGStreamer()
     m_image = 0;
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 2fed8924416eaa6db49f4d5718737254a983ac8c..6a9d06826478f201233efbb1a7c54faa441624c9 100644 (file)
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "ImageGStreamer.h"
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "GOwnPtr.h"
 
@@ -65,4 +65,4 @@ ImageGStreamer::~ImageGStreamer()
 
     m_image = 0;
 }
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 0071d6743d5459fad4020b8652531467e3960594..da9255b217a6c2d2fdb43c7a9cf2f0409866a786 100644 (file)
@@ -24,7 +24,7 @@
 #include "config.h"
 #include "MediaPlayerPrivateGStreamer.h"
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "ColorSpace.h"
 #include "DataSourceGStreamer.h"
@@ -1459,4 +1459,4 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
 
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 6d1392d0155d8df186162be2e6df64773d1e945e..800ca6d252b3ca8157bbabfd602bdf56211d11a2 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef MediaPlayerPrivateGStreamer_h
 #define MediaPlayerPrivateGStreamer_h
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <wtf/Forward.h>
 #include "MediaPlayerPrivate.h"
@@ -179,5 +179,5 @@ class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateInterface {
     };
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 3c4904b1f7079da5fe1b96636b1ac82a452a06ab..f3df2071c5fa3424291e209324d02af89e714ff3 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef PlatformVideoWindow_h
 #define PlatformVideoWindow_h
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "Widget.h"
 #include <wtf/PassRefPtr.h>
@@ -44,5 +44,5 @@ class PlatformVideoWindow : public RefCounted<PlatformVideoWindow> {
     };
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 68ab7acd2866f4f3bf16f36a6cf5bdc003039ddf..c55b9cc10f48505903aae2a5fbe2b12d3c75ae9d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "PlatformVideoWindow.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "NotImplemented.h"
 
@@ -35,4 +35,4 @@ PlatformVideoWindow::~PlatformVideoWindow()
     notImplemented();
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 88b655294e2a49458e05b4f3add68f369c8b4fdf..77343ae73e5bf51918b0ca2fcb00e0f53965ab21 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "PlatformVideoWindow.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <gtk/gtk.h>
 
@@ -61,4 +61,4 @@ PlatformVideoWindow::~PlatformVideoWindow()
 
     m_videoWindowId = 0;
 }
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 00fef4b28eb6bd0762effe3c390cef67a024260c..4319f6c287797a8243eaed8fdd8fa99e6a0ac96f 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "config.h"
 #include "VideoSinkGStreamer.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <glib.h>
 #include <gst/gst.h>
@@ -371,4 +371,4 @@ webkit_video_sink_new(void)
     return (GstElement*)g_object_new(WEBKIT_TYPE_VIDEO_SINK, 0);
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
index 767e83f9dfbd267b10b4af16f1ccfa59f0affecb..6cd86c2331cc232f835a5ca77e4678cc43da999f 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef VideoSinkGStreamer_h
 #define VideoSinkGStreamer_h
 
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include <glib-object.h>
 #include <gst/video/gstvideosink.h>
@@ -77,5 +77,5 @@ GstElement *webkit_video_sink_new(void);
 
 G_END_DECLS
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index 4e5719398631a977f800ba861a8fb35af891f73b..635feff6335b6ecfd5ef4401bd20fc003f1f49f4 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "config.h"
 #include "WebKitWebSourceGStreamer.h"
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "Document.h"
 #include "GOwnPtr.h"
@@ -795,5 +795,5 @@ void StreamingClient::cannotShowURL(ResourceHandle*)
     GST_ELEMENT_ERROR(m_src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", m_src->priv->uri), (0));
 }
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 
index 15940620c4f4d7ba534eec06d97c4e16c0a9aba8..bdb083339ffa1edceecd1227a8d7a75888044f02 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef WebKitWebSourceGStreamer_h
 #define WebKitWebSourceGStreamer_h
-#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
 
 #include "Frame.h"
 #include <gst/gst.h>
@@ -50,5 +50,5 @@ void  webKitWebSrcSetFrame(WebKitWebSrc* src, WebCore::Frame* frame);
 
 G_END_DECLS
 
-#endif // ENABLE(VIDEO)
+#endif // USE(GSTREAMER)
 #endif
index dea741a4180c923f9bfc05077544679365dcd908..c7aae96bc79e923ecca7e131223dd2d46700ae48 100644 (file)
@@ -863,7 +863,10 @@ if test "$enable_video" = "yes"; then
                      gstreamer-interfaces-0.10
                      gstreamer-pbutils-0.10
                      gstreamer-plugins-base-0.10 >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
-                     gstreamer-video-0.10])
+                     gstreamer-video-0.10],
+                     [have_gstreamer=yes],
+                     [have_gstreamer=no])
+
    AC_SUBST([GSTREAMER_CFLAGS])
    AC_SUBST([GSTREAMER_LIBS])
 fi
@@ -907,6 +910,9 @@ AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
 # GLib/GIO feature conditionals
 AM_CONDITIONAL([USE_GSETTINGS], [test "$have_gsettings" = "yes"])
 
+# GStreamer feature conditional
+AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
+
 # WebKit feature conditionals
 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
 AM_CONDITIONAL([ENABLE_3D_TRANSFORMS],[test "$enable_3D_transforms" = "yes"])