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

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

Issue 7620003: Send error reply to GpuVideoDecodeAccelerator::Initialize when not available (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also send Initialize's reply from NotifyError Created 9 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a0c9eb947e0c4ce283a153a7456baf265ce924d9..de8c9ee072a73adba7ac1298bba45995454244ad 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -86,6 +86,13 @@ void GpuVideoDecodeAccelerator::NotifyEndOfStream() {
void GpuVideoDecodeAccelerator::NotifyError(
media::VideoDecodeAccelerator::Error error) {
+ if (init_done_msg_) {
+ // If we get an error while we're initializing, NotifyInitializeDone won't
+ // be called, so we need to send the reply (with an error) here.
+ init_done_msg_->set_reply_error();
+ Send(init_done_msg_);
+ init_done_msg_ = NULL;
+ }
if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification(
host_route_id_, error))) {
LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) "
@@ -110,6 +117,8 @@ void GpuVideoDecodeAccelerator::Initialize(
video_decode_accelerator_->Initialize(configs);
#else
NOTIMPLEMENTED() << "HW video decode acceleration not available.";
+ init_done_msg->set_reply_error();
Ami GONE FROM CHROMIUM 2011/08/11 21:04:11 FWIW, this can now call NotifyError() instead of d
piman 2011/08/11 22:48:48 Done.
+ Send(init_done_msg);
#endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698