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

Unified Diff: ppapi/examples/gles2/gles2.cc

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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: ppapi/examples/gles2/gles2.cc
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index e46f02dca3a84315e9a9bac3ddcf61d06e779ffc..e9173749f63b0902daf32f1e186e0b7f25b4fb37 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -213,16 +213,12 @@ void GLES2DemoInstance::DidChangeView(
}
void GLES2DemoInstance::InitializeDecoder() {
- assert(!video_decoder_);
- video_decoder_ = new pp::VideoDecoder_Dev(*this);
-
PP_VideoConfigElement configs = PP_VIDEOATTR_DICTIONARY_TERMINATOR;
- pp::CompletionCallback cb =
- callback_factory_.NewCallback(&GLES2DemoInstance::DecoderInitDone);
- video_decoder_->Initialize(&configs, *context_, cb);
-}
-void GLES2DemoInstance::DecoderInitDone(int32_t result) {
+ assert(!video_decoder_);
+ video_decoder_ = new pp::VideoDecoder_Dev(*this, *context_, &configs);
+ assert(!video_decoder_->is_null());
vrk (LEFT CHROMIUM) 2011/07/29 18:11:02 nit: is there any way for this to fail?
Ami GONE FROM CHROMIUM 2011/07/29 18:20:41 In this plugin, not really, b/c we already assert
+
DecodeNextNALUs();
}

Powered by Google App Engine
This is Rietveld 408576698