Skip to content

Commit

Permalink
[acn]: Create both audio and video sink of brcm - replace videosink o…
Browse files Browse the repository at this point in the history
…nly patch with which includes both
  • Loading branch information
modeveci committed May 30, 2018
1 parent 13fc150 commit 394b3ed
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions package/wpe/wpewebkit/0006-brcm-force-sink-av-factories.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 394b3ed

Please sign in to comment.