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

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

Issue 1145553002: Add extra crash logging for starting the sink with no frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderers/video_renderer_impl.h" 5 #include "media/renderers/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/command_line.h" 10 #include "base/command_line.h"
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 // we ensure that frames_queued() doesn't get excessive. 690 // we ensure that frames_queued() doesn't get excessive.
691 return algorithm_->EffectiveFramesQueued() >= kMaxVideoFrames || 691 return algorithm_->EffectiveFramesQueued() >= kMaxVideoFrames ||
692 algorithm_->frames_queued() >= 3 * kMaxVideoFrames; 692 algorithm_->frames_queued() >= 3 * kMaxVideoFrames;
693 } 693 }
694 694
695 return ready_frames_.size() >= kMaxVideoFrames; 695 return ready_frames_.size() >= kMaxVideoFrames;
696 } 696 }
697 697
698 void VideoRendererImpl::StartSink() { 698 void VideoRendererImpl::StartSink() {
699 DCHECK(task_runner_->BelongsToCurrentThread()); 699 DCHECK(task_runner_->BelongsToCurrentThread());
700 CHECK_GT(algorithm_->frames_queued(), 0u);
700 sink_->Start(this); 701 sink_->Start(this);
701 sink_started_ = true; 702 sink_started_ = true;
702 was_background_rendering_ = false; 703 was_background_rendering_ = false;
703 } 704 }
704 705
705 void VideoRendererImpl::StopSink() { 706 void VideoRendererImpl::StopSink() {
706 DCHECK(task_runner_->BelongsToCurrentThread()); 707 DCHECK(task_runner_->BelongsToCurrentThread());
707 sink_->Stop(); 708 sink_->Stop();
708 sink_started_ = false; 709 sink_started_ = false;
709 was_background_rendering_ = false; 710 was_background_rendering_ = false;
(...skipping 28 matching lines...) Expand all
738 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp( 739 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp(
739 base::TimeDelta media_time) { 740 base::TimeDelta media_time) {
740 std::vector<base::TimeDelta> media_times(1, media_time); 741 std::vector<base::TimeDelta> media_times(1, media_time);
741 std::vector<base::TimeTicks> wall_clock_times; 742 std::vector<base::TimeTicks> wall_clock_times;
742 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times)) 743 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times))
743 return base::TimeTicks(); 744 return base::TimeTicks();
744 return wall_clock_times[0]; 745 return wall_clock_times[0];
745 } 746 }
746 747
747 } // namespace media 748 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698