summaryrefslogtreecommitdiffstats
path: root/content/renderer
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 /content/renderer
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 'content/renderer')
-rw-r--r--content/renderer/gpu/gpu_video_decode_accelerator_host.cc3
-rw-r--r--content/renderer/gpu/gpu_video_decode_accelerator_host.h2
-rw-r--r--content/renderer/pepper_platform_video_decoder_impl.cc3
-rw-r--r--content/renderer/pepper_platform_video_decoder_impl.h2
4 files changed, 6 insertions, 4 deletions
diff --git a/content/renderer/gpu/gpu_video_decode_accelerator_host.cc b/content/renderer/gpu/gpu_video_decode_accelerator_host.cc
index 8a03cda..4f08dab 100644
--- a/content/renderer/gpu/gpu_video_decode_accelerator_host.cc
+++ b/content/renderer/gpu/gpu_video_decode_accelerator_host.cc
@@ -65,11 +65,12 @@ bool GpuVideoDecodeAcceleratorHost::OnMessageReceived(const IPC::Message& msg) {
return handled;
}
-void GpuVideoDecodeAcceleratorHost::GetConfigs(
+bool GpuVideoDecodeAcceleratorHost::GetConfigs(
const std::vector<uint32>& requested_configs,
std::vector<uint32>* matched_configs) {
// TODO(vrk): Need to rethink GetConfigs.
NOTIMPLEMENTED();
+ return true;
}
bool GpuVideoDecodeAcceleratorHost::Initialize(
diff --git a/content/renderer/gpu/gpu_video_decode_accelerator_host.h b/content/renderer/gpu/gpu_video_decode_accelerator_host.h
index 8b4a4c3..ea73da0 100644
--- a/content/renderer/gpu/gpu_video_decode_accelerator_host.h
+++ b/content/renderer/gpu/gpu_video_decode_accelerator_host.h
@@ -35,7 +35,7 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener,
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// media::VideoDecodeAccelerator implementation.
- virtual void GetConfigs(
+ virtual bool GetConfigs(
const std::vector<uint32>& requested_configs,
std::vector<uint32>* matched_configs) OVERRIDE;
virtual bool Initialize(const std::vector<uint32>& configs) OVERRIDE;
diff --git a/content/renderer/pepper_platform_video_decoder_impl.cc b/content/renderer/pepper_platform_video_decoder_impl.cc
index 27fd963..009571d 100644
--- a/content/renderer/pepper_platform_video_decoder_impl.cc
+++ b/content/renderer/pepper_platform_video_decoder_impl.cc
@@ -27,11 +27,12 @@ PlatformVideoDecoderImpl::PlatformVideoDecoderImpl(
PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {}
-void PlatformVideoDecoderImpl::GetConfigs(
+bool PlatformVideoDecoderImpl::GetConfigs(
const std::vector<uint32>& requested_configs,
std::vector<uint32>* matched_configs) {
// TODO(vrk): Implement.
NOTIMPLEMENTED();
+ return true;
}
bool PlatformVideoDecoderImpl::Initialize(const std::vector<uint32>& config) {
diff --git a/content/renderer/pepper_platform_video_decoder_impl.h b/content/renderer/pepper_platform_video_decoder_impl.h
index c119437..02ca25e 100644
--- a/content/renderer/pepper_platform_video_decoder_impl.h
+++ b/content/renderer/pepper_platform_video_decoder_impl.h
@@ -26,7 +26,7 @@ class PlatformVideoDecoderImpl
virtual ~PlatformVideoDecoderImpl();
// PlatformVideoDecoder implementation.
- virtual void GetConfigs(
+ virtual bool GetConfigs(
const std::vector<uint32>& requested_configs,
std::vector<uint32>* matched_configs) OVERRIDE;
virtual bool Initialize(const std::vector<uint32>& config) OVERRIDE;