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

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

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_impl.h" 5 #include "media/filters/video_renderer_impl.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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } 315 }
316 316
317 // Already-queued VideoFrameStream ReadCB's can fire after various state 317 // Already-queued VideoFrameStream ReadCB's can fire after various state
318 // transitions have happened; in that case just drop those frames immediately. 318 // transitions have happened; in that case just drop those frames immediately.
319 if (state_ == kFlushing) 319 if (state_ == kFlushing)
320 return; 320 return;
321 321
322 DCHECK_EQ(state_, kPlaying); 322 DCHECK_EQ(state_, kPlaying);
323 323
324 // Can happen when demuxers are preparing for a new Seek(). 324 // Can happen when demuxers are preparing for a new Seek().
325 if (!frame) { 325 if (!frame.get()) {
326 DCHECK_EQ(status, VideoFrameStream::DEMUXER_READ_ABORTED); 326 DCHECK_EQ(status, VideoFrameStream::DEMUXER_READ_ABORTED);
327 return; 327 return;
328 } 328 }
329 329
330 if (frame->end_of_stream()) { 330 if (frame->end_of_stream()) {
331 DCHECK(!received_end_of_stream_); 331 DCHECK(!received_end_of_stream_);
332 received_end_of_stream_ = true; 332 received_end_of_stream_ = true;
333 } else { 333 } else {
334 // Maintain the latest frame decoded so the correct frame is displayed after 334 // Maintain the latest frame decoded so the correct frame is displayed after
335 // prerolling has completed. 335 // prerolling has completed.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 task_runner_->PostTask(FROM_HERE, base::Bind(statistics_cb_, statistics)); 474 task_runner_->PostTask(FROM_HERE, base::Bind(statistics_cb_, statistics));
475 475
476 frames_decoded_ = 0; 476 frames_decoded_ = 0;
477 frames_dropped_ = 0; 477 frames_dropped_ = 0;
478 } 478 }
479 479
480 frame_available_.TimedWait(wait_duration); 480 frame_available_.TimedWait(wait_duration);
481 } 481 }
482 482
483 } // namespace media 483 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698