2009-11-24 Philippe Normand <pnormand@igalia.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Nov 2009 18:55:13 +0000 (18:55 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Nov 2009 18:55:13 +0000 (18:55 +0000)
        Reviewed by Gustavo Noronha Silva.

        [Gtk] GStreamer-CRITICAL's (and other warnings) on <video>
        https://bugs.webkit.org/show_bug.cgi?id=26354

        Implemented MediaPlayerPrivate::isAvailable by checking the
        presence of the playbin2 GStreamer element.

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::isAvailable):
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:

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

WebCore/ChangeLog
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h

index 692a12ec58ebc84113e2cb2a4e769657184389d4..f48e2d7c4525d69a3d5bd2928d40b15161f07813 100644 (file)
@@ -1,3 +1,17 @@
+2009-11-24  Philippe Normand  <pnormand@igalia.com>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        [Gtk] GStreamer-CRITICAL's (and other warnings) on <video>
+        https://bugs.webkit.org/show_bug.cgi?id=26354
+
+        Implemented MediaPlayerPrivate::isAvailable by checking the
+        presence of the playbin2 GStreamer element.
+
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivate::isAvailable):
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
+
 2009-11-24  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
 
         Reviewed by Xan Lopez.
index 4f85f79145ec77751934295315ef259a664995e8..b325d8cbba40a206795ed5c0c5dba7dedea6baa4 100644 (file)
@@ -158,6 +158,17 @@ static void do_gst_init()
     }
 }
 
+bool MediaPlayerPrivate::isAvailable()
+{
+    do_gst_init();
+    GstElementFactory* factory = gst_element_factory_find("playbin2");
+    if (factory) {
+        gst_object_unref(GST_OBJECT(factory));
+        return true;
+    }
+    return false;
+}
+
 MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
     : m_player(player)
     , m_playBin(0)
index 1ecbc46a515864079ab174d33beb31b4fd37b3de..6ab8edbb4965b7259eddeb554e484046f1162cff 100644 (file)
@@ -109,7 +109,7 @@ namespace WebCore {
 
             static void getSupportedTypes(HashSet<String>&);
             static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
-            static bool isAvailable() { return true; }
+            static bool isAvailable();
 
             void updateStates();
             void cancelSeek();