Possible to use Pepper from a non-main thread directly?

11 views
Skip to first unread message

Xiaohan Wang (王消寒)

unread,
Aug 7, 2014, 8:25:51 PM8/7/14
to peppe...@chromium.org
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

Brett Wilson

unread,
Aug 7, 2014, 9:08:58 PM8/7/14
to Xiaohan Wang (王消寒), peppe...@chromium.org
On Thu, Aug 7, 2014 at 5:25 PM, Xiaohan Wang (王消寒) <xhw...@chromium.org> wrote:
> Hello Pepper-Dev,
>
> I have a crazy question. Is it possible to use PPAPI from a non-main thread
> in the render process?

No, this is not possible. The multithreading support is in the
out-of-process proxy layer.

Brett
Reply all
Reply to author
Forward
0 new messages