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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 10392141: Plumb texture target to VideoDecodeAccelerator::Client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return; 291 return;
292 } 292 }
293 shutting_down_ = true; 293 shutting_down_ = true;
294 } 294 }
295 295
296 void GpuVideoDecoder::NotifyInitializeDone() { 296 void GpuVideoDecoder::NotifyInitializeDone() {
297 NOTREACHED() << "GpuVideoDecodeAcceleratorHost::Initialize is synchronous!"; 297 NOTREACHED() << "GpuVideoDecodeAcceleratorHost::Initialize is synchronous!";
298 } 298 }
299 299
300 void GpuVideoDecoder::ProvidePictureBuffers(uint32 count, 300 void GpuVideoDecoder::ProvidePictureBuffers(uint32 count,
301 const gfx::Size& size) { 301 const gfx::Size& size,
302 uint32 texture_target) {
302 if (!gvd_loop_proxy_->BelongsToCurrentThread()) { 303 if (!gvd_loop_proxy_->BelongsToCurrentThread()) {
303 gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind( 304 gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind(
304 &GpuVideoDecoder::ProvidePictureBuffers, this, count, size)); 305 &GpuVideoDecoder::ProvidePictureBuffers, this, count, size,
306 texture_target));
305 return; 307 return;
306 } 308 }
307 309
308 std::vector<uint32> texture_ids; 310 std::vector<uint32> texture_ids;
311 decoder_texture_target_ = texture_target;
309 if (!factories_->CreateTextures( 312 if (!factories_->CreateTextures(
310 count, size, &texture_ids, &decoder_texture_target_)) { 313 count, size, &texture_ids, decoder_texture_target_)) {
311 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); 314 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE);
312 return; 315 return;
313 } 316 }
314 317
315 if (!vda_) 318 if (!vda_)
316 return; 319 return;
317 320
318 std::vector<PictureBuffer> picture_buffers; 321 std::vector<PictureBuffer> picture_buffers;
319 for (size_t i = 0; i < texture_ids.size(); ++i) { 322 for (size_t i = 0; i < texture_ids.size(); ++i) {
320 picture_buffers.push_back(PictureBuffer( 323 picture_buffers.push_back(PictureBuffer(
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 535
533 error_occured_ = true; 536 error_occured_ = true;
534 537
535 if (!pending_read_cb_.is_null()) { 538 if (!pending_read_cb_.is_null()) {
536 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); 539 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL);
537 return; 540 return;
538 } 541 }
539 } 542 }
540 543
541 } // namespace media 544 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698