Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1596)

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR update. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 855041b44afd027ea000733d488d8d612845464e..777a13b0820e730d815fc94f21389e8eda9224f9 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -26,6 +26,7 @@ GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(
int32 host_route_id,
GpuCommandBufferStub* stub)
: sender_(sender),
+ init_done_msg_(NULL),
host_route_id_(host_route_id),
stub_(stub),
video_decode_accelerator_(NULL) {
@@ -92,10 +93,15 @@ void GpuVideoDecodeAccelerator::NotifyError(
}
}
-void GpuVideoDecodeAccelerator::Initialize(const std::vector<uint32>& configs) {
+void GpuVideoDecodeAccelerator::Initialize(
+ const std::vector<uint32>& configs,
+ IPC::Message* init_done_msg) {
DCHECK(!video_decode_accelerator_.get());
+ DCHECK(!init_done_msg_);
+ DCHECK(init_done_msg);
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
DCHECK(stub_ && stub_->scheduler());
+ init_done_msg_ = init_done_msg;
OmxVideoDecodeAccelerator* omx_decoder = new OmxVideoDecodeAccelerator(this);
omx_decoder->SetEglState(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
@@ -167,8 +173,9 @@ void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer(
}
void GpuVideoDecodeAccelerator::NotifyInitializeDone() {
- if (!Send(new AcceleratedVideoDecoderHostMsg_InitializeDone(host_route_id_)))
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_InitializeDone) failed";
+ if (!Send(init_done_msg_))
+ LOG(ERROR) << "Send(init_done_msg_) failed";
+ init_done_msg_ = NULL;
}
void GpuVideoDecodeAccelerator::NotifyFlushDone() {
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.h ('k') | content/renderer/gpu/gpu_video_decode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698