summaryrefslogtreecommitdiffstats
path: root/media/video
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 05:12:18 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 05:12:18 +0000
commite1d69d7692a834914973d274b9752fc7b904f50b (patch)
tree8b677849f2e6cec5ede9508445f51a0d2653f26d /media/video
parent4d2f2709a295f51550237e6038debebb66d77d31 (diff)
downloadchromium_src-e1d69d7692a834914973d274b9752fc7b904f50b.zip
chromium_src-e1d69d7692a834914973d274b9752fc7b904f50b.tar.gz
chromium_src-e1d69d7692a834914973d274b9752fc7b904f50b.tar.bz2
<video> decode in hardware!
This uses the GpuVideoDecodeAccelerator machinery (already written to enable ppapi to take advantage of OpenMAX HW where available) to decode <video> data. This increases idle CPU from 20% to 45% on one particularly large (internal) test video (red0.mp4), on an ARM crosbook. HW decode is done on a best-effort basis; if the GPU code doesn't know how to deal with a codec/profile we still fall back to ffmpeg for decode. Because the vast majority of chrome installs will be on HW with no video decode support (yet) we only attempt HW video decode on platforms we know have a shot at it. This is a copy of http://codereview.chromium.org/8686010/ PS#13 to work around rietveld losing the "status" for some files in the patch. BUG=104579 TEST=manual testing w/ video test matrix, trybots. Review URL: http://codereview.chromium.org/8922010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video')
-rw-r--r--media/video/video_decode_accelerator.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index 9a31bfd..ab5d1fb 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/callback_old.h"
#include "media/base/bitstream_buffer.h"
+#include "media/base/video_decoder_config.h"
#include "media/video/picture.h"
#include "ui/gfx/size.h"
@@ -24,25 +25,8 @@ namespace media {
class MEDIA_EXPORT VideoDecodeAccelerator
: public base::RefCountedThreadSafe<VideoDecodeAccelerator> {
public:
- // Video stream profile. This *must* match PP_VideoDecoder_Profile.
- enum Profile {
- // Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
- // for example), and keep the values for a particular format grouped
- // together for clarity.
- H264PROFILE_MIN = 0,
- H264PROFILE_BASELINE = H264PROFILE_MIN,
- H264PROFILE_MAIN,
- H264PROFILE_EXTENDED,
- H264PROFILE_HIGH,
- H264PROFILE_HIGH10PROFILE,
- H264PROFILE_HIGH422PROFILE,
- H264PROFILE_HIGH444PREDICTIVEPROFILE,
- H264PROFILE_SCALABLEBASELINE,
- H264PROFILE_SCALABLEHIGH,
- H264PROFILE_STEREOHIGH,
- H264PROFILE_MULTIVIEWHIGH,
- H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
- };
+ // TODO(fischman): fix foreign references to this and get rid of this typedef.
+ typedef VideoCodecProfile Profile;
// Enumeration of potential errors generated by the API.
// Note: Keep these in sync with PP_VideoDecodeError_Dev.
@@ -64,7 +48,7 @@ class MEDIA_EXPORT VideoDecodeAccelerator
// This interface is extended by the various layers that relay messages back
// to the plugin, through the PPP_VideoDecode_Dev interface the plugin
// implements.
- class Client {
+ class MEDIA_EXPORT Client {
public:
virtual ~Client() {}