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

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

Issue 10825194: Change Deryptor::DecryptStatus and VideoDecoder::DecoderStatus to *::Status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/video_renderer_base.h ('k') | webkit/media/crypto/proxy_decryptor.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/video_renderer_base.h" 5 #include "media/filters/video_renderer_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (state_ == kError || state_ == kStopped) { 375 if (state_ == kError || state_ == kStopped) {
376 DoStopOrError_Locked(); 376 DoStopOrError_Locked();
377 } 377 }
378 } 378 }
379 379
380 VideoRendererBase::~VideoRendererBase() { 380 VideoRendererBase::~VideoRendererBase() {
381 base::AutoLock auto_lock(lock_); 381 base::AutoLock auto_lock(lock_);
382 DCHECK(state_ == kUninitialized || state_ == kStopped) << state_; 382 DCHECK(state_ == kUninitialized || state_ == kStopped) << state_;
383 } 383 }
384 384
385 void VideoRendererBase::FrameReady(VideoDecoder::DecoderStatus status, 385 void VideoRendererBase::FrameReady(VideoDecoder::Status status,
386 const scoped_refptr<VideoFrame>& frame) { 386 const scoped_refptr<VideoFrame>& frame) {
387 base::AutoLock auto_lock(lock_); 387 base::AutoLock auto_lock(lock_);
388 DCHECK_NE(state_, kUninitialized); 388 DCHECK_NE(state_, kUninitialized);
389 389
390 CHECK(pending_read_); 390 CHECK(pending_read_);
391 pending_read_ = false; 391 pending_read_ = false;
392 392
393 if (status != VideoDecoder::kOk) { 393 if (status != VideoDecoder::kOk) {
394 DCHECK(!frame); 394 DCHECK(!frame);
395 PipelineStatus error = PIPELINE_ERROR_DECODE; 395 PipelineStatus error = PIPELINE_ERROR_DECODE;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 int VideoRendererBase::NumFrames_Locked() const { 558 int VideoRendererBase::NumFrames_Locked() const {
559 lock_.AssertAcquired(); 559 lock_.AssertAcquired();
560 int outstanding_frames = 560 int outstanding_frames =
561 (current_frame_ ? 1 : 0) + (last_available_frame_ ? 1 : 0) + 561 (current_frame_ ? 1 : 0) + (last_available_frame_ ? 1 : 0) +
562 (current_frame_ && (current_frame_ == last_available_frame_) ? -1 : 0); 562 (current_frame_ && (current_frame_ == last_available_frame_) ? -1 : 0);
563 return ready_frames_.size() + outstanding_frames; 563 return ready_frames_.size() + outstanding_frames;
564 } 564 }
565 565
566 } // namespace media 566 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_base.h ('k') | webkit/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698