RESOLVED FIXED 162872
[GStreamer] Drain query support
https://bugs.webkit.org/show_bug.cgi?id=162872
Summary [GStreamer] Drain query support
Enrique Ocaña
Reported 2016-10-03 11:22:57 PDT
Under some circumstances, GStreamer deadlocks completely during MSE seeks on OpenGL ES systems. This is because the video sink still holds samples. Proper DRAIN support would fix this issue.
Attachments
Patch (4.46 KB, patch)
2016-10-03 11:28 PDT, Enrique Ocaña
no flags
Patch (7.57 KB, patch)
2016-10-05 09:21 PDT, Enrique Ocaña
no flags
Patch (7.53 KB, patch)
2016-10-16 11:26 PDT, Enrique Ocaña
no flags
Patch (7.53 KB, patch)
2016-10-26 01:18 PDT, Enrique Ocaña
no flags
Enrique Ocaña
Comment 1 2016-10-03 11:28:28 PDT
Xabier Rodríguez Calvar
Comment 2 2016-10-04 06:32:59 PDT
Comment on attachment 290497 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290497&action=review These things can be fixed at landing time. No need to upload the patch again. > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:374 > + WebKitVideoSinkPrivate* priv = sink->priv; > + priv->scheduler.drain(); Since you are using priv just once, you can collapse these two lines. > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:432 > + 0, // Class offset > + 0, // Accumulator > + 0, // Accumulator data > + g_cclosure_marshal_generic, > + G_TYPE_NONE, // Return type > + 0); // No parameters Add period at the end of the comments.
Xabier Rodríguez Calvar
Comment 3 2016-10-04 06:34:18 PDT
We don't need to wait for other MSE patches to land this one, do we?
Zan Dobersek
Comment 4 2016-10-04 06:55:48 PDT
Comment on attachment 290497 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290497&action=review > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:376 > + LOG_MEDIA_MESSAGE("Flush-start, emitting DRAIN signal and releasing EGL samples"); This shouldn't build -- LOG_MEDIA_MESSAGE stuff was removed.
Xabier Rodríguez Calvar
Comment 5 2016-10-04 07:25:34 PDT
(In reply to comment #4) > > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:376 > > + LOG_MEDIA_MESSAGE("Flush-start, emitting DRAIN signal and releasing EGL samples"); > > This shouldn't build -- LOG_MEDIA_MESSAGE stuff was removed. Yes, I missed that, sorry. Still, this can be fixed at landing time.
Philippe Normand
Comment 6 2016-10-05 05:28:58 PDT
Comment on attachment 290497 [details] Patch Adding the signal without any handler connected from the player makes little sense
Enrique Ocaña
Comment 7 2016-10-05 09:21:21 PDT
Enrique Ocaña
Comment 8 2016-10-05 09:25:50 PDT
Addressed all the suggestions, added VideoRenderRequestScheduler::drain() to release the internal m_sample and subscribed to the drain signal from the base player to release the other m_sample held by the player. Now it really does a proper drain, particularly on flushes. The changes are relevant enough for a review.
Zan Dobersek
Comment 9 2016-10-05 09:46:30 PDT
Comment on attachment 290713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290713&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:615 > + m_videoSize.setWidth(0); > + m_videoSize.setHeight(0); Just assign a new FloatSize() to m_videoSize, essentially resetting it to (0, 0). > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:389 > + break; Unnecessary.
Zan Dobersek
Comment 10 2016-10-06 06:50:15 PDT
Comment on attachment 290713 [details] Patch Address the comments please.
Enrique Ocaña
Comment 11 2016-10-16 11:26:04 PDT
Enrique Ocaña
Comment 12 2016-10-26 01:18:01 PDT
Enrique Ocaña
Comment 13 2016-10-26 01:40:02 PDT
Comment on attachment 292887 [details] Patch Clearing flags on attachment: 292887 Committed r207874: <http://trac.webkit.org/changeset/207874>
Enrique Ocaña
Comment 14 2016-10-26 01:40:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.