summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 21:30:08 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 21:30:08 +0000
commitb8629c3292978dfbaf1391451f35cb1d1c7adea5 (patch)
tree4d1daa64f4fd1f78810ca24ef3143b2b9b8a5de7 /media
parentd551f73f1f007cd40074168d27f5d3de6ac3cc04 (diff)
downloadchromium_src-b8629c3292978dfbaf1391451f35cb1d1c7adea5.zip
chromium_src-b8629c3292978dfbaf1391451f35cb1d1c7adea5.tar.gz
chromium_src-b8629c3292978dfbaf1391451f35cb1d1c7adea5.tar.bz2
Move ProvidePictureBuffers out of initialization and into the decode path.
This is required for various reasons: - Clients don't necessarily know the dimensions of the video they feed to the decoder. It's the decoder's job to figure it out from the encoded stream, but it only gets a crack at that once Decode() is called, after initialization is done. - PPAPI plugins get to call PPB_* functions at will, which means that (to avoid having to code re-entrancy into everything on the browser side) PPB_* functions aren't allowed to call into PPP_* functions. So the previous call sequence of Initialize->ProvidePictureBuffers->CreateTextures would deadlock (requiring plugins to pre-create any textures they were going to get asked for in the future). Also a bit of minor cleanup & added TODOs for future cleanup, and changed GetConfigs()' signature to match the PPAPI version of itself (return bool instead of void). BUG=none TEST=OVDATest passes on kaen. Review URL: http://codereview.chromium.org/7147006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/video/video_decode_accelerator.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index 032ee24..c50da97 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -229,14 +229,17 @@ class VideoDecodeAccelerator {
};
// Video decoder functions.
+
// GetConfigs returns the supported configurations that is a subset of the
- // given |requested_configs|.
+ // given |requested_configs|. Unrecognized or malformed |requested_configs|
+ // elements return false and represent a failure; the client must not pass
+ // unknown request elements to Initialize.
// Parameters:
// |requested_configs| is the set of configurations the plugin is querying
// for support.
// |matched_configs| is the subset of |requested_configs| that the decoder
// supports.
- virtual void GetConfigs(
+ virtual bool GetConfigs(
const std::vector<uint32>& requested_configs,
std::vector<uint32>* matched_configs) = 0;