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 3f3a7a8..57b5f5d 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 2a866cd..1c95cd1 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 a6c7a2a..4976376 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 ac9b719..985b5ce 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 63555bf..5a94fd4 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 453685a..d462ccc 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 6333437..06eec14 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 84a3e30..672a23d 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 efccff0..539d92a 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 282f13c..f519911 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 4a4ff2b..cf2b9d6 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 076df4a..c73adc0 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 2fed892..6a9d068 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 0071d67..da9255b 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 6d1392d..800ca6d 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 3c4904b..f3df207 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 68ab7ac..c55b9cc 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 88b6552..77343ae 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 00fef4b..4319f6c 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 767e83f..6cd86c2 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 4e57193..635feff 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 1594062..bdb0833 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 dea741a..c7aae96 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"])