Bug 255912 - [GStreamer] DMABUF sink not available for GStreamer 1.20 runtime
Summary: [GStreamer] DMABUF sink not available for GStreamer 1.20 runtime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-25 01:23 PDT by Kdwk
Modified: 2023-04-27 09:47 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kdwk 2023-04-25 01:23:09 PDT
When watching a video on youtube.com, the following line is printed: `** (WebKitWebProcess:2): WARNING **: 16:18:40.081: WebKit wasn't able to find the DMABuf video sink dependencies. Hardware-accelerated zero-copy video rendering won't be achievable with this plugin.` CPU usage is through the roof.
Comment 1 Kdwk 2023-04-25 01:23:55 PDT
This can be observed on Epiphany Technology Preview 44.0-39-g93250d36f+/ WebKitGTK 2.41.3
Comment 2 Kdwk 2023-04-25 01:24:30 PDT
This cannot be observed on Gnome Web 44.2/ WebKitGTK 2.40.1
Comment 3 Philippe Normand 2023-04-25 05:55:29 PDT
Your runtime doesn't ship GStreamer 1.22 I guess. You can check by loading webkit://gpu

The sink is disabled for older versions. I might work for older versions, or it might not. It's untested.


bool webKitDMABufVideoSinkProbePlatform()
{
    return webkitGstCheckVersion(1, 22, 0) && isGStreamerPluginAvailable("app");
}
Comment 4 Kdwk 2023-04-25 06:23:58 PDT
If it doesn't work for GStreamer 1.20.x perhaps DMABUF sink could be disabled there.
Comment 5 Philippe Normand 2023-04-25 06:25:25 PDT
Who said it doesn´t?
Comment 6 Kdwk 2023-04-25 06:26:42 PDT
Can confirm: this message does not appear with WEBKIT_GST_DMABUF_SINK_ENABLED=1 in Tech Preview
Comment 7 Michael Catanzaro 2023-04-25 06:45:17 PDT
Probably should not print the error message if GStreamer version is less than 1.22?
Comment 8 Philippe Normand 2023-04-25 08:26:16 PDT
(In reply to kdwkleung from comment #6)
> Can confirm: this message does not appear with
> WEBKIT_GST_DMABUF_SINK_ENABLED=1 in Tech Preview

I'm confused now. WEBKIT_GST_DMABUF_SINK_ENABLED was afaik replaced by WEBKIT_GST_DMABUF_SINK_DISABLED in 2.41. To sum-up, again, the sink is opt-in in versions < 2.40 and opt-out in > 2.40.
Comment 9 Kdwk 2023-04-25 19:23:24 PDT
Oh now that I test it again the message shows up even with WEBKIT_GST_DMABUF_SINK_ENABLED=1 on Tech Preview.
Comment 10 Philippe Normand 2023-04-26 00:54:36 PDT
(In reply to kdwkleung from comment #9)
> Oh now that I test it again the message shows up even with
> WEBKIT_GST_DMABUF_SINK_ENABLED=1 on Tech Preview.

That env var is not used by 2.41, in case it wasn't clear from previous comments.
Comment 11 Philippe Normand 2023-04-27 08:51:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13240
Comment 12 EWS 2023-04-27 09:47:30 PDT
Committed 263459@main (4c8196fde7da): <https://commits.webkit.org/263459@main>

Reviewed commits have been landed. Closing PR #13240 and removing active labels.