summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-04-08 17:13:06 (GMT)
committerEmanuele Aina <emanuele.aina@collabora.com>2015-04-11 10:15:07 (GMT)
commit2fde18be2cfc9311fa24e7ed2ac2329807eb7ed3 (patch)
tree5d953b8e474c11ab8a0cfca1e8c9c37938f52fb6
parent3135446a9b4537bfce7ea081716d73b6322a6d7c (diff)
downloadWebKit-2fde18be2cfc9311fa24e7ed2ac2329807eb7ed3.tar.gz
WebKit-2fde18be2cfc9311fa24e7ed2ac2329807eb7ed3.tar.xz
[GStreamer] Enable native video if /dev/vchiq is not accessible
We know that in that case software video decoders will be plugged so we need to allow software converters as otherwise caps negotiation won't be possible in many cases.
-rw-r--r--Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index d8427bb..a69f496 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -61,6 +61,10 @@
#include <gtk/gtk.h>
#endif
+#if PLATFORM(RPI)
+#include "VideoCore.h"
+#endif
+
// GstPlayFlags flags from playbin2. It is the policy of GStreamer to
// not publicly expose element-specific enums. That's why this
// GstPlayFlags enum has been copied here.
@@ -1943,14 +1947,21 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
#if !USE(ACCELERATED_COMPOSITING)
int flags;
+ bool hw_available = false;
g_object_get(m_playBin.get(), "flags", &flags, NULL);
flags &= ~GST_PLAY_FLAG_TEXT;
flags &= ~GST_PLAY_FLAG_VIS;
flags &= ~GST_PLAY_FLAG_DEINTERLACE;
flags &= ~GST_PLAY_FLAG_COLORBALANCE;
- if (!g_getenv("WEBKIT_DISABLE_OMX")) {
+
+#if PLATFORM(RPI)
+ hw_available = VideoCore::ensureInitialized();
+#endif
+
+ if (!g_getenv("WEBKIT_DISABLE_OMX") && hw_available) {
flags |= GST_PLAY_FLAG_NATIVE_VIDEO;
}
+
g_object_set(m_playBin.get(), "flags", flags, NULL);
#endif
}