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
+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.
}
}
+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)
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();