Summary: | WIP: [GStreamer][GPUProcess] enable GPUProcess through envvar | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Víctor M. Jáquez L. <vjaquez> | ||||||||
Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | cgarcia, pnormand, vjaquez | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=221883 https://bugs.webkit.org/show_bug.cgi?id=223155 |
||||||||||
Attachments: |
|
Comment on attachment 404700 [details]
Patch for GPUProcess enabling
I don't think we want to expose a setting in the API for this. Should the user decide about this and in a per web view basis?
(In reply to Carlos Garcia Campos from comment #1) > Comment on attachment 404700 [details] > Patch for GPUProcess enabling > > I don't think we want to expose a setting in the API for this. Should the > user decide about this and in a per web view basis? As far as I understand Mac code, it is decided by the user https://github.com/WebKit/webkit/blob/master/Source/WebKitLegacy/mac/WebView/WebView.mm#L3411 And, even it is configured per web view, it looks like a global thing. Also, I wonder if I should approach to use Pipewire for capture devices in GPUProcess rather than GStreamer as it is now. (In reply to Víctor M. Jáquez L. from comment #2) > Also, I wonder if I should approach to use Pipewire for capture devices in > GPUProcess rather than GStreamer as it is now. Phil commented it's too early to migrate to pipewire, in his opinion, since we need a very recent xdg-desktop-portal + working pipewire 0.3 daemon on the host, and in the SDK the versions used at too old currently. (In reply to Carlos Garcia Campos from comment #1) > Comment on attachment 404700 [details] > Patch for GPUProcess enabling > > I don't think we want to expose a setting in the API for this. Which other mechanisms do we have for handling these optional settings? Maybe instead of a setting you could enable the GPU process only when mediastream is being enabled? Because for the time being my understanding is that this process will be used only for capture devices in WPE/GTK. Right, I need to understand what the gpu process is for to answer the question. If the gpu process will handle all media eventually, (like network process handles networking) and we want a setting because it's not complete yet, then I don't think we want to expose a setting to decide, we can use internal API in WebProcessPool and use an env var or whatever to enable/disable it. If it's something the user really has to decide, then the user need to understand what the gpu process is to, know whether to enable it or not and when. If it's a global setting, it fits better as WebKitWebContext API, not a setting. Created attachment 405031 [details]
WIP: enable GPUProcess capture devices with envvar
This is another approach, using a environment variable, but not WebProcessPool, but in WebPreferencesDefaultValues.
This approach indeed enables the GPUProcess, and surprisingly, the camera stream is processed, though it does not live in the GPUProces but in the old WebProcess :(
Does this approach is more acceptable?
Yes, but it's not at the right place. Check the env vars in WebPreferences::platformInitializeStore() (in WebPreferencesGtk.cpp and you will have to add one for WPE) and just set the appropriate value for the preferences according to the env var. Created attachment 406007 [details]
WIP: a mechanism to enable the GPUProcess with an envvar
I think this approach is correct.
Comment on attachment 406007 [details] WIP: a mechanism to enable the GPUProcess with an envvar View in context: https://bugs.webkit.org/attachment.cgi?id=406007&action=review > Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp:33 > + bool webrtcEnableGPUProcess = (std::getenv("WEBKIT_WEBRTC_ENABLE_GPU_PROCESS") != nullptr); Perhaps check the env var contents too? |
Created attachment 404700 [details] Patch for GPUProcess enabling This is just a RFC of how to enable GPUProcess in webkitgtk/wpe. Is this approach correct?