Bug 207208

Summary: [GStreamer] Client-side video rendering doesn't fallback to internal compositing
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: PlatformAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, jer.noble, menard, philipj, sergio, vjaquez, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch calvaris: review+, calvaris: commit-queue-

Philippe Normand
Reported 2020-02-04 09:52:43 PST
For instance when the EGLImage export fails, we should fallback to internal compositing (eg, no hole punching).
Attachments
Patch (8.72 KB, patch)
2020-02-04 09:56 PST, Philippe Normand
calvaris: review+
calvaris: commit-queue-
Philippe Normand
Comment 1 2020-02-04 09:56:37 PST
Xabier Rodríguez Calvar
Comment 2 2020-02-04 10:47:48 PST
Comment on attachment 389674 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389674&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3172 > + auto internalCompositingOperation = [this](TextureMapperPlatformLayerProxy& proxy, std::unique_ptr<GstVideoFrameHolder> frameHolder) { You're moving the frameholder when calling this, so I guess you should make this && as well. Anyway, why do you create a lambda instead of a method considering that we are only capturing this?
Zan Dobersek
Comment 3 2020-02-05 01:08:49 PST
Comment on attachment 389674 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389674&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:218 > + static std::once_flag onceFlag; > + std::call_once(onceFlag, [] { Nit: I'd recommend using `s_onceFlag` as the name, the `s_` prefix more explicitly describing the storage nature. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:372 > + return m_dmabufFD; This should test for m_dmabufFD being >= 0, i.e. a valid fd. Related to this, m_dmabufFD should be initialized to -1 and in handoffVideoDmaBuf() reset to -1 after the hand-off and closure. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3203 > + std::unique_ptr<GstVideoFrameHolder> frameHolder = makeUnique<GstVideoFrameHolder>(m_sample.get(), m_videoDecoderPlatform, m_textureMapperFlags, !m_isUsingFallbackVideoSink); > + if (frameHolder->hasDMABuf()) { > + std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(0, m_size, TextureMapperGL::ShouldNotBlend, GL_DONT_CARE); Could use `auto object = makeUnique<>()` in both cases.
Philippe Normand
Comment 4 2020-02-05 01:21:42 PST
Comment on attachment 389674 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389674&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3172 >> + auto internalCompositingOperation = [this](TextureMapperPlatformLayerProxy& proxy, std::unique_ptr<GstVideoFrameHolder> frameHolder) { > > You're moving the frameholder when calling this, so I guess you should make this && as well. > > Anyway, why do you create a lambda instead of a method considering that we are only capturing this? I don't really see the point of adding a method for this. As the logic remains self-contained in pushTextureToCompositor() anyway. This new closure is an implementation detail of it.
Philippe Normand
Comment 5 2020-02-05 02:00:08 PST
Radar WebKit Bug Importer
Comment 6 2020-02-05 02:01:14 PST
Note You need to log in before you can comment on or make changes to this bug.