OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |