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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 214823005: Remove requirement of compositing a video frame for dropped frame count. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | « content/renderer/media/video_frame_compositor_unittest.cc ('k') | 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 "content/renderer/media/webmediaplayer_impl.h" 5 #include "content/renderer/media/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 } 570 }
571 571
572 unsigned WebMediaPlayerImpl::droppedFrameCount() const { 572 unsigned WebMediaPlayerImpl::droppedFrameCount() const {
573 DCHECK(main_loop_->BelongsToCurrentThread()); 573 DCHECK(main_loop_->BelongsToCurrentThread());
574 574
575 media::PipelineStatistics stats = pipeline_.GetStatistics(); 575 media::PipelineStatistics stats = pipeline_.GetStatistics();
576 576
577 unsigned frames_dropped = stats.video_frames_dropped; 577 unsigned frames_dropped = stats.video_frames_dropped;
578 578
579 frames_dropped += const_cast<VideoFrameCompositor&>(compositor_) 579 frames_dropped += const_cast<VideoFrameCompositor&>(compositor_)
580 .GetFramesDroppedBeforeComposite(); 580 .GetFramesDroppedBeforeCompositorWasNotified();
581 581
582 DCHECK_LE(frames_dropped, stats.video_frames_decoded); 582 DCHECK_LE(frames_dropped, stats.video_frames_decoded);
583 return frames_dropped; 583 return frames_dropped;
584 } 584 }
585 585
586 unsigned WebMediaPlayerImpl::audioDecodedByteCount() const { 586 unsigned WebMediaPlayerImpl::audioDecodedByteCount() const {
587 DCHECK(main_loop_->BelongsToCurrentThread()); 587 DCHECK(main_loop_->BelongsToCurrentThread());
588 588
589 media::PipelineStatistics stats = pipeline_.GetStatistics(); 589 media::PipelineStatistics stats = pipeline_.GetStatistics();
590 return stats.audio_bytes_decoded; 590 return stats.audio_bytes_decoded;
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 1315
1316 if (web_cdm_) { 1316 if (web_cdm_) {
1317 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); 1317 decryptor_ready_cb.Run(web_cdm_->GetDecryptor());
1318 return; 1318 return;
1319 } 1319 }
1320 1320
1321 decryptor_ready_cb_ = decryptor_ready_cb; 1321 decryptor_ready_cb_ = decryptor_ready_cb;
1322 } 1322 }
1323 1323
1324 } // namespace content 1324 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_frame_compositor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698