Hello Pepper-Dev,
I have a crazy question. Is it possible to use PPAPI from a non-main thread in the render process?
For the context, the media decoders runs on a separate media thread in the render process. For encrypted media, we need to use PPP_ContentDecryptor_Private and PPB_ContentDecryptor_Private to do decryption/decoding. Since PPAPI works on the main thread, we have to post tasks from the media thread to the main thread to decode/decrypt, and post the decoded result from the main thread back to the media thread. This works well in most cases, but in some cases when the render main thread gets busy (e.g. executing some V8 function, major garbage collection), the decoding could get delayed and user could see dropped frames.
For our use case, if we could run PPAPI on the media thread directly (which will send IPC to the PPAPI process through I/O thread of course), then we will not be blocked by the main thread, and the performance could be much better.
But I don't know whether this is possible at all. Any comments/thoughts?
Xiaohan