From 394b3ede7f8d4ed52eee2a593b2c4e7f538b32bd Mon Sep 17 00:00:00 2001 From: modeveci Date: Wed, 30 May 2018 13:55:18 +0200 Subject: [PATCH] [acn]: Create both audio and video sink of brcm - replace videosink only patch with which includes both --- .../0006-brcm-force-sink-av-factories.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/wpe/wpewebkit/0006-brcm-force-sink-av-factories.patch diff --git a/package/wpe/wpewebkit/0006-brcm-force-sink-av-factories.patch b/package/wpe/wpewebkit/0006-brcm-force-sink-av-factories.patch new file mode 100644 index 000000000000..6d60d5816bb0 --- /dev/null +++ b/package/wpe/wpewebkit/0006-brcm-force-sink-av-factories.patch @@ -0,0 +1,46 @@ +diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +index 0a875d2..f9343e0 100644 +--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp ++++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +@@ -2359,12 +2359,32 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin() + m_videoSink = gst_element_factory_make( "db410csink", "optimized vsink"); + g_object_set(m_pipeline.get(), "video-sink", m_videoSink.get(), nullptr); + #endif ++ ++#if PLATFORM(BCM_NEXUS) ++ m_videoSink = gst_element_factory_make( "brcmvideosink", "brcmvideosink"); ++ g_object_set(m_pipeline.get(), "video-sink", m_videoSink.get(), nullptr); + +-#if !USE(WESTEROS_SINK) && !USE(FUSION_SINK) ++ GValue window_set = {0, }; ++ static char str[40]; ++ snprintf(str, 40, "%d,%d,%d,%d", 0,0, 1280, 720); ++ ++ g_value_init(&window_set, G_TYPE_STRING); ++ g_value_set_static_string(&window_set, str); ++ g_object_set(m_videoSink.get(), "window_set", str, nullptr); ++ g_object_set(m_videoSink.get(), "zorder", 0, nullptr); ++ ++ GstElement* audioSink = gst_element_factory_make( "brcmaudiosink", "brcmaudiosink"); ++ g_object_set(m_pipeline.get(), "audio-sink", audioSink, nullptr); ++ ++#endif ++ ++#if !USE(WESTEROS_SINK) && !USE(FUSION_SINK) && !PLATFORM(BCM_NEXUS) ++ + g_object_set(m_pipeline.get(), "audio-sink", createAudioSink(), nullptr); + #endif + configurePlaySink(); + ++#if !PLATFORM(BCM_NEXUS) + // On 1.4.2 and newer we use the audio-filter property instead. + // See https://bugzilla.gnome.org/show_bug.cgi?id=735748 for + // the reason for using >= 1.4.2 instead of >= 1.4.0. +@@ -2376,6 +2396,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin() + else + g_object_set(m_pipeline.get(), "audio-filter", scale, nullptr); + } ++#endif + + if (!m_renderingCanBeAccelerated) { + // If not using accelerated compositing, let GStreamer handle