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

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

Issue 10704175: Add config change support to FFmpegVideoDecoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 const PictureBuffer& pb = it->second; 373 const PictureBuffer& pb = it->second;
374 374
375 // Update frame's timestamp. 375 // Update frame's timestamp.
376 base::TimeDelta timestamp; 376 base::TimeDelta timestamp;
377 base::TimeDelta duration; 377 base::TimeDelta duration;
378 GetBufferTimeData(picture.bitstream_buffer_id(), &timestamp, &duration); 378 GetBufferTimeData(picture.bitstream_buffer_id(), &timestamp, &duration);
379 379
380 DCHECK(decoder_texture_target_); 380 DCHECK(decoder_texture_target_);
381 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture( 381 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture(
382 pb.texture_id(), decoder_texture_target_, pb.size().width(), 382 pb.texture_id(), decoder_texture_target_, pb.size().width(),
383 pb.size().height(), timestamp, duration, 383 pb.size().height(), natural_size_.width(), natural_size_.height(),
384 timestamp, duration,
384 base::Bind(&GpuVideoDecoder::ReusePictureBuffer, this, 385 base::Bind(&GpuVideoDecoder::ReusePictureBuffer, this,
385 picture.picture_buffer_id()))); 386 picture.picture_buffer_id())));
386 387
387 EnqueueFrameAndTriggerFrameDelivery(frame); 388 EnqueueFrameAndTriggerFrameDelivery(frame);
388 } 389 }
389 390
390 void GpuVideoDecoder::EnqueueFrameAndTriggerFrameDelivery( 391 void GpuVideoDecoder::EnqueueFrameAndTriggerFrameDelivery(
391 const scoped_refptr<VideoFrame>& frame) { 392 const scoped_refptr<VideoFrame>& frame) {
392 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); 393 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
393 394
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 547
547 error_occured_ = true; 548 error_occured_ = true;
548 549
549 if (!pending_read_cb_.is_null()) { 550 if (!pending_read_cb_.is_null()) {
550 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); 551 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL);
551 return; 552 return;
552 } 553 }
553 } 554 }
554 555
555 } // namespace media 556 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698