Implement software fallback for PPB_VideoDecoder.
commite1ae7eb4b0b42edf62e95954df32fcf5a4abc722
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 13 Jun 2014 13:43:11 +0000 (13 13:43 +0000)
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 13 Jun 2014 13:43:11 +0000 (13 13:43 +0000)
tree0acd834e570443d4e33c3e3b2fa57f5a63d9e945
parentc0e812718db5b971ccbb4ddda3f212d91927e3f6
Implement software fallback for PPB_VideoDecoder.
This modifies the proxy to implement software fallback mode.
The main change is to the host, which now can work with
media::VideoDecoders.

media::VideoDecoder works differently from media::VideoDecodeAccelerator
so an adapter object, content::VideoDecoderShim is defined. It lives on the main thread and drives the actual decoder on the media thread via a child DecoderImpl class, which sends back frames of video. VideoDecoderShim receives those and converts frames to GL textures.

gpu::Mailboxes are used so the host can create textures that are aliased
to the plugin's textures.

The test plugin has been changed to include bitstream data for VP8 in order to
test the software decoder. The data is in ppapi/examples/video_decode/testdata.h
alongside the H264 data. The file diff is too large for this site but is structured
something like this:

const unsigned char kData[] = {
#if defined USE_VP8_TESTDATA_INSTEAD_OF_H264
...  lots of VP8 data

#else  // !USE_VP8_TESTDATA_INSTEAD_OF_H264
...  lots of H264 data

#endif  // USE_VP8_TESTDATA_INSTEAD_OF_H264
};

There is a TODO to convert the example to load a file. I'm not sure how to go
about that but am willing to do the work if someone can point the way.

BUG=281689
R=dmichael@chromium.org, fischman@chromium.org, sievers@chromium.org, tsepez@chromium.org

Review URL: https://codereview.chromium.org/311853005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277012 0039d316-1c4b-4281-b951-d872f2087c98
18 files changed:
chrome/test/ppapi/ppapi_browsertest.cc
content/content_renderer.gypi
content/renderer/pepper/pepper_video_decoder_host.cc
content/renderer/pepper/pepper_video_decoder_host.h
content/renderer/pepper/video_decoder_shim.cc [new file with mode: 0644]
content/renderer/pepper/video_decoder_shim.h [new file with mode: 0644]
content/test/ppapi/ppapi_browsertest.cc
gpu/command_buffer/common/cmd_buffer_common.cc
gpu/gpu.gyp
ppapi/examples/video_decode/testdata.h
ppapi/examples/video_decode/video_decode.cc
ppapi/ppapi_sources.gypi
ppapi/proxy/ppapi_messages.h
ppapi/proxy/video_decoder_resource.cc
ppapi/proxy/video_decoder_resource.h
ppapi/proxy/video_decoder_resource_unittest.cc
ppapi/tests/test_video_decoder.cc [new file with mode: 0644]
ppapi/tests/test_video_decoder.h [new file with mode: 0644]