RESOLVED FIXED 206289
[GStreamer][WPE] Client-side video rendering support
https://bugs.webkit.org/show_bug.cgi?id=206289
Summary [GStreamer][WPE] Client-side video rendering support
Philippe Normand
Reported 2020-01-15 07:27:07 PST
Using the WPEBackend-FDO video-plane-display-dmabuf protocol, to be shipped in 1.6.
Attachments
Patch (19.17 KB, patch)
2020-01-15 07:38 PST, Philippe Normand
no flags
Patch (20.04 KB, patch)
2020-01-16 03:14 PST, Philippe Normand
calvaris: review+
Philippe Normand
Comment 1 2020-01-15 07:38:15 PST
Xabier Rodríguez Calvar
Comment 2 2020-01-15 08:41:04 PST
Comment on attachment 387790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387790&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:259 > + wpe_video_plane_display_dmabuf_source_update(videoPlaneDisplayDmaBufSource, m_dmabufFD, rect.x(), rect.y(), m_size.width(), m_size.height(), m_dmabufStride, [](void* data) { > + gst_buffer_unref(GST_BUFFER_CAST(data)); > + }, gst_buffer_ref(m_buffer.get())); Is this lambda a C callback? If not, then it would be nice to capture the smart pointer (by copy!) inside the lambda. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:487 > +#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) > + if (m_wpeVideoPlaneDisplayDmaBuf) > + wpe_video_plane_display_dmabuf_source_destroy(m_wpeVideoPlaneDisplayDmaBuf); > +#endif > + I think we can use GUniquePtr by defining this as deleter in GUniquePtrGStreamer.h, can't we? > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3146 > + GStreamerDMABufHolePunchClient(std::unique_ptr<GstVideoFrameHolder> frameHolder, struct wpe_video_plane_display_dmabuf_source* videoPlaneDisplayDmaBufSource) I think we should be taking a std::unique_ptr<GstVideoFrameHolder>&& frameHolder, specially with the way you call this constructor. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3181 > + proxy.pushNextBuffer(WTFMove(layerBuffer)); And from what I see, TextureMapperPlatformLayerProxy::pushNextBuffer lacks a && in the parameter as well. Either we add it or we are not taking advantage of all the WTFMove calling it.
Philippe Normand
Comment 3 2020-01-16 03:04:14 PST
Comment on attachment 387790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387790&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:259 >> + }, gst_buffer_ref(m_buffer.get())); > > Is this lambda a C callback? If not, then it would be nice to capture the smart pointer (by copy!) inside the lambda. I think it's what you call a C callback? https://github.com/Igalia/WPEBackend-fdo/blob/master/include/wpe-fdo/extensions/video-plane-display-dmabuf.h#L66
Philippe Normand
Comment 4 2020-01-16 03:14:39 PST
Xabier Rodríguez Calvar
Comment 5 2020-01-16 07:26:07 PST
(In reply to Xabier Rodríguez Calvar from comment #2) > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3181 > > + proxy.pushNextBuffer(WTFMove(layerBuffer)); > > And from what I see, TextureMapperPlatformLayerProxy::pushNextBuffer lacks a > && in the parameter as well. Either we add it or we are not taking advantage > of all the WTFMove calling it. Is this coming in a follow up or did you forget?
Philippe Normand
Comment 6 2020-01-16 07:57:52 PST
Radar WebKit Bug Importer
Comment 7 2020-01-16 07:58:11 PST
Andrey Lushnikov
Comment 8 2020-01-23 19:08:39 PST
Hi Philippe! This broke `//Tools/Scripts/update-webkitwpe-libs` script - the cmake config is complaining for libwpe. I filed the bug upstream to libwpe: https://github.com/WebPlatformForEmbedded/libwpe/issues/63 Meanwhile, is there anything we can do about this change to fix it? Thanks, Andrey
Zan Dobersek
Comment 9 2020-01-24 02:29:18 PST
(In reply to Andrey Lushnikov from comment #8) > This broke `//Tools/Scripts/update-webkitwpe-libs` script - the cmake config > is complaining for libwpe. > > I filed the bug upstream to libwpe: > https://github.com/WebPlatformForEmbedded/libwpe/issues/63 > I have a fix for this. I'll push it into libwpe and then update the jhbuild tag.
Zan Dobersek
Comment 10 2020-01-24 02:58:04 PST
(In reply to Zan Dobersek from comment #9) > (In reply to Andrey Lushnikov from comment #8) > > This broke `//Tools/Scripts/update-webkitwpe-libs` script - the cmake config > > is complaining for libwpe. > > > > I filed the bug upstream to libwpe: > > https://github.com/WebPlatformForEmbedded/libwpe/issues/63 > > > > I have a fix for this. I'll push it into libwpe and then update the jhbuild > tag. Done in r255062. http://trac.webkit.org/changeset/255062/webkit
Note You need to log in before you can comment on or make changes to this bug.