Skip to content

Commit 20af321

Browse files
committed
[acn][wpewebkit]: - Add patches to fix seek to buffered position issue on BRCM platform
- Manually assign video sink factory for brcm platform - Introduce dropped frames for brcm platform - Remove previous sync media sample selection, not necessary anymore!
1 parent efacd11 commit 20af321

File tree

4 files changed

+85
-88
lines changed

4 files changed

+85
-88
lines changed

package/wpe/wpewebkit/0002-use-next-sync-sample-for-seek-to-time.patch

Lines changed: 0 additions & 88 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
2+
index a65bf63..f93a3cb 100644
3+
--- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
4+
+++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
5+
@@ -352,6 +352,16 @@ bool MediaPlayerPrivateGStreamerMSE::doSeek()
6+
return m_seeking;
7+
}
8+
9+
+#if PLATFORM(BCM_NEXUS)
10+
+ // When performing bufferedSeek, if the state is still playing, make it paused
11+
+ // Seek will trigger state_change to Playing again
12+
+ getStateResult = gst_element_get_state(m_pipeline.get(), &state, &newState, 0);
13+
+ GST_DEBUG("StateResult:%d CurrentState:%s NewState:%s",getStateResult, gst_element_state_get_name(state), gst_element_state_get_name(newState));
14+
+ if (state == GST_STATE_PLAYING) {
15+
+ gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED);
16+
+ }
17+
+#endif
18+
+
19+
GST_DEBUG("We can seek now");
20+
21+
MediaTime startTime = seekTime, endTime = MediaTime::invalidTime();
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
2+
index 0a875d2..d7815f7 100644
3+
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
4+
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
5+
@@ -2359,12 +2359,29 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
6+
m_videoSink = gst_element_factory_make( "db410csink", "optimized vsink");
7+
g_object_set(m_pipeline.get(), "video-sink", m_videoSink.get(), nullptr);
8+
#endif
9+
+
10+
+#if PLATFORM(BCM_NEXUS)
11+
+ m_videoSink = gst_element_factory_make( "brcmvideosink", "brcmvideosink");
12+
+ g_object_set(m_pipeline.get(), "video-sink", m_videoSink.get(), nullptr);
13+
14+
-#if !USE(WESTEROS_SINK) && !USE(FUSION_SINK)
15+
+ GValue window_set = {0, };
16+
+ static char str[40];
17+
+ snprintf(str, 40, "%d,%d,%d,%d", 0,0, 1280, 720);
18+
+
19+
+ g_value_init(&window_set, G_TYPE_STRING);
20+
+ g_value_set_static_string(&window_set, str);
21+
+ g_object_set(m_videoSink.get(), "window_set", str, nullptr);
22+
+ g_object_set(m_videoSink.get(), "zorder", 0, nullptr);
23+
+
24+
+#endif
25+
+
26+
+#if !USE(WESTEROS_SINK) && !USE(FUSION_SINK) && !PLATFORM(BCM_NEXUS)
27+
+
28+
g_object_set(m_pipeline.get(), "audio-sink", createAudioSink(), nullptr);
29+
#endif
30+
configurePlaySink();
31+
32+
+#if !PLATFORM(BCM_NEXUS)
33+
// On 1.4.2 and newer we use the audio-filter property instead.
34+
// See https://bugzilla.gnome.org/show_bug.cgi?id=735748 for
35+
// the reason for using >= 1.4.2 instead of >= 1.4.0.
36+
@@ -2376,6 +2393,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
37+
else
38+
g_object_set(m_pipeline.get(), "audio-filter", scale, nullptr);
39+
}
40+
+#endif
41+
42+
if (!m_renderingCanBeAccelerated) {
43+
// If not using accelerated compositing, let GStreamer handle
44+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
2+
index af8e858..4b2f313 100644
3+
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
4+
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
5+
@@ -1221,6 +1221,15 @@ unsigned MediaPlayerPrivateGStreamerBase::droppedFrameCount() const
6+
guint64 framesDropped = 0;
7+
if (m_fpsSink)
8+
g_object_get(m_fpsSink.get(), "frames-dropped", &framesDropped, nullptr);
9+
+
10+
+#if PLATFORM(BCM_NEXUS)
11+
+ GstElement* videoSink = nullptr;
12+
+ videoSink = findVideoSink(m_pipeline.get());
13+
+ if (videoSink) {
14+
+ g_object_get(videoSink, "frames-dropped", &framesDropped, nullptr);
15+
+ GST_DEBUG("frames dropped: %llu", framesDropped);
16+
+ }
17+
+#endif
18+
return static_cast<unsigned>(framesDropped);
19+
}
20+

0 commit comments

Comments
 (0)