PPAPI plugin not loading

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

PPAPI plugin not loading

Postby Biohazard » Thu Dec 21, 2023 2:01 pm

I'm upgrading from 4844 to 6167 and a custom PPAPI plugin that I need for my application does not load anymore.

I noticed that the "plugins" member to enable or disable plugins has been removed from _cef_browser_settings_t entirely, but PPAPI related code is still present in Chromium, so I am assuming that plugins are still available somehow.

This is how I have activated the plugin successfully before:

Code: Select all
command_line->AppendSwitchWithValue("register-pepper-plugins", "ppapi_window_stream.dll;application/x-ppapi-window-stream");


Do I need to recompile or upgrade the plugin or am I missing something else?

Should plugin support really have been removed entirely, how would I go about efficiently sending an RGB stream into the renderer process to display as an element as part of the DOM? I have previously used shared memory and rendered this directly from the plugin, which gave me sufficient performance for my use case. So I don't need the best possible performance here, but sending the data via V8 and using JavaScript to display it through a canvas, for example, would be inadequate.

(FYI encoding it as a video and then letting Chromium decode it again right away is also a thought I had, but it's really not a good solution and also just not good enough for my requirements regarding latency and FPS.)
Biohazard
Techie
 
Posts: 15
Joined: Mon Jun 15, 2020 10:01 am

Re: PPAPI plugin not loading

Postby ndesktop » Thu Dec 21, 2023 2:38 pm

In cs source code, kRegisterPepperPlugins is still present. Maybe the plugin needs indeed to be rebuild/re-registered somehow?
But PPAPI should have been deprecated in June 2022, and is on its way out since 2017.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: PPAPI plugin not loading

Postby magreenblatt » Thu Dec 21, 2023 3:47 pm

PPAPI is effectively removed from Chromium (unless you’re using NaCL, which is also removed for most OSes — I think ChromeOS is the only one that still supports it).

Should plugin support really have been removed entirely, how would I go about efficiently sending an RGB stream into the renderer process to display as an element as part of the DOM?

I suggest looking at the new shared memory IPC capability in CEF. You can feed it directly into a V8 ArrayBuffer without copies. See https://github.com/chromiumembedded/cef/issues/3502
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: PPAPI plugin not loading

Postby Biohazard » Thu Dec 21, 2023 9:41 pm

Thank you for your replies.

I've had a brief look at CefSharedMemoryRegion and it seems to be produced by using CefSharedProcessMessageBuilder. It looks like I can only write the data before producing the message, after which it is marked as read-only immediately. This would imply that I would have to create a new message for every single frame instead of being able to re-use messages, which would already create too much overhead for my use case. Is my understanding of this correct or is there a way to write to a message again after using it?

I suppose alternatively I could use my own shared memory handle - just like I have been doing before - and connect it to the renderer process manually to feed it into a V8 array buffer. I'll still have the issue of concurrent read/write access then, because I can't control read timing, but this should only result in mild screen tearing, which I can probably live with.

Also, finally, will CanvasRenderingContext2D::putImageData be the only/best method for me to actually display the RGB stream then? In theory it shouldn't perform worse than what my plugin was doing, but I'm wondering if there is a better method that I don't know about yet.
Biohazard
Techie
 
Posts: 15
Joined: Mon Jun 15, 2020 10:01 am

Re: PPAPI plugin not loading

Postby Biohazard » Wed Dec 27, 2023 11:29 pm

It looks like WebGPU is going to get native shared texture importing which would be a perfect solution for my use case: https://dawn.googlesource.com/dawn/+/5a ... ac931bf240
https://dawn.googlesource.com/dawn/+/5a ... _memory.md

It seems to be experimental in Dawn and so still completely missing from Chromium. Is there a way for me to find a mailing list or timeline for this feature anywhere? Unfortunately I haven't been successful in finding any discussions on it yet.

Maybe I could try to add an intermittent API if I can figure it out at all.
Biohazard
Techie
 
Posts: 15
Joined: Mon Jun 15, 2020 10:01 am

Re: PPAPI plugin not loading

Postby Biohazard » Sat Apr 20, 2024 9:16 am

I ended up solving this issue by implementing support for external shared texture rendering in the Dx11 backend of ANGLE and exposed it to JS through the WebGL2 interface. (Skipped WebGPU since that's still experimental.)

Available as a patch here in case someone else might find it useful: https://github.com/Biohazard90/chromium ... ed-texture
Biohazard
Techie
 
Posts: 15
Joined: Mon Jun 15, 2020 10:01 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 189 guests