PPB_VideoDecoder issues Chromebook / Windows

41 views
Skip to first unread message

Andy Yanok

unread,
Jul 1, 2016, 10:34:47 AM7/1/16
to Native-Client-Discuss
I have an H264 stream that I have successfully got working on Mac, however when attempt to run this code on a Chromebook / Windows (All up to date), I get a dead lock on the decoder_interface->GetPicture call.  (This happens on the first decode.) The decoder_interface->Decode call returns successfully with PP_Ok. Any ideas as to why this would work fine on Mac but deadlock on Windows / Chromebook?

I also have noticed that whenever I pass a PP_CompletionCallback structure with an actual pointer to a function the nacl module will crash. For example if I pass this callback structure struct PP_CompletionCallback callback = { NULL, self, PP_COMPLETIONCALLBACK_FLAG_NONE }; the module will not crash and if I call one of the functions with an actual callback function it will simply crash.

I have also noticed that on the Chromebook if I attempt to use hardware accelerated decoding it will fail to initialize the decoder, even though chrome://gpu states that hardware accelerated decoding is available.

I am building the module using pepper_49.

And as a reference I am setting up the decoder like so:

    struct PP_CompletionCallback callback = { NULL, self, PP_COMPLETIONCALLBACK_FLAG_NONE };

    int32_t status = ppb_decoder_interface->Initialize(priv->decoder_context,

                                                       priv->graphics_context,

                                                       PP_VIDEOPROFILE_H264MAIN,

                                                       //PP_HARDWAREACCELERATION_ONLY,

                                                       PP_HARDWAREACCELERATION_WITHFALLBACK,

                                                       10,

                                                       callback);


If anyone can answer the main question as to why the GetPicture call will deadlock, on Windows / Chromebook, and works fine on Mac that would be fantastic.

Bill Budge

unread,
Jul 8, 2016, 6:52:00 PM7/8/16
to Native-Client-Discuss
What is the status when your call to Initialize returns?

You may have to call Decode multiple times before a pending call to GetPicture returns.

Not all codecs / profiles are available on all platforms. I would expect Chrome to support H264 on most platforms though.

Can you give more information about your program?
Reply all
Reply to author
Forward
0 new messages