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

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

Issue 7545014: Implement PPAPI VideoDecode out-of-process support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responding to brettw 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 | « ppapi/c/dev/ppb_video_decoder_dev.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/gles2/gles2.cc
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index e9173749f63b0902daf32f1e186e0b7f25b4fb37..aa3a4fbc2e59ef0eddc1d40b5c29cd209f2d9bb1 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -298,7 +298,8 @@ void GLES2DemoInstance::DecodeNextNALU() {
}
void GLES2DemoInstance::ProvidePictureBuffers(
- PP_Resource /* decoder */, uint32_t req_num_of_bufs, PP_Size dimensions) {
+ PP_Resource decoder, uint32_t req_num_of_bufs, PP_Size dimensions) {
+ assert(decoder == video_decoder_->pp_resource());
std::vector<PP_PictureBuffer_Dev> buffers;
for (uint32_t i = 0; i < req_num_of_bufs; i++) {
PP_PictureBuffer_Dev buffer;
@@ -311,16 +312,18 @@ void GLES2DemoInstance::ProvidePictureBuffers(
video_decoder_->AssignPictureBuffers(buffers);
}
-void GLES2DemoInstance::DismissPictureBuffer(PP_Resource /* decoder */,
+void GLES2DemoInstance::DismissPictureBuffer(PP_Resource decoder,
int32_t picture_buffer_id) {
+ assert(decoder == video_decoder_->pp_resource());
PictureBufferMap::iterator it = buffers_by_id_.find(picture_buffer_id);
assert(it != buffers_by_id_.end());
DeleteTexture(it->second.texture_id);
buffers_by_id_.erase(it);
}
-void GLES2DemoInstance::PictureReady(PP_Resource /* decoder */,
+void GLES2DemoInstance::PictureReady(PP_Resource decoder,
const PP_Picture_Dev& picture) {
+ assert(decoder == video_decoder_->pp_resource());
if (first_frame_delivered_ticks_ == -1)
assert((first_frame_delivered_ticks_ = core_if_->GetTimeTicks()) != -1);
if (is_painting_) {
@@ -333,11 +336,13 @@ void GLES2DemoInstance::PictureReady(PP_Resource /* decoder */,
Render(it->second);
}
-void GLES2DemoInstance::EndOfStream(PP_Resource /* decoder */) {
+void GLES2DemoInstance::EndOfStream(PP_Resource decoder) {
+ assert(decoder == video_decoder_->pp_resource());
}
-void GLES2DemoInstance::NotifyError(PP_Resource /* decoder */,
+void GLES2DemoInstance::NotifyError(PP_Resource decoder,
PP_VideoDecodeError_Dev error) {
+ assert(decoder == video_decoder_->pp_resource());
LogError(this).s() << "Received error: " << error;
assert(!"Unexpected error; see stderr for details");
}
@@ -414,7 +419,7 @@ void GLES2DemoInstance::PaintFinished(int32_t result, int picture_buffer_id) {
while (!pictures_pending_paint_.empty() && !is_painting_) {
PP_Picture_Dev picture = pictures_pending_paint_.front();
pictures_pending_paint_.pop_front();
- PictureReady(0 /* ignored */, picture);
+ PictureReady(video_decoder_->pp_resource(), picture);
}
}
« no previous file with comments | « ppapi/c/dev/ppb_video_decoder_dev.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698