| 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 "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 return stats.video_frames_decoded; | 743 return stats.video_frames_decoded; |
| 744 } | 744 } |
| 745 | 745 |
| 746 unsigned WebMediaPlayerImpl::droppedFrameCount() const { | 746 unsigned WebMediaPlayerImpl::droppedFrameCount() const { |
| 747 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 747 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 748 | 748 |
| 749 PipelineStatistics stats = pipeline_.GetStatistics(); | 749 PipelineStatistics stats = pipeline_.GetStatistics(); |
| 750 return stats.video_frames_dropped; | 750 return stats.video_frames_dropped; |
| 751 } | 751 } |
| 752 | 752 |
| 753 unsigned WebMediaPlayerImpl::audioDecodedByteCount() const { | 753 size_t WebMediaPlayerImpl::audioDecodedByteCount() const { |
| 754 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 754 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 755 | 755 |
| 756 PipelineStatistics stats = pipeline_.GetStatistics(); | 756 PipelineStatistics stats = pipeline_.GetStatistics(); |
| 757 return stats.audio_bytes_decoded; | 757 return stats.audio_bytes_decoded; |
| 758 } | 758 } |
| 759 | 759 |
| 760 unsigned WebMediaPlayerImpl::videoDecodedByteCount() const { | 760 size_t WebMediaPlayerImpl::videoDecodedByteCount() const { |
| 761 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 761 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 762 | 762 |
| 763 PipelineStatistics stats = pipeline_.GetStatistics(); | 763 PipelineStatistics stats = pipeline_.GetStatistics(); |
| 764 return stats.video_bytes_decoded; | 764 return stats.video_bytes_decoded; |
| 765 } | 765 } |
| 766 | 766 |
| 767 bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( | 767 bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( |
| 768 blink::WebGraphicsContext3D* web_graphics_context, | 768 blink::WebGraphicsContext3D* web_graphics_context, |
| 769 unsigned int texture, | 769 unsigned int texture, |
| 770 unsigned int internal_format, | 770 unsigned int internal_format, |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 << ", Video: " << stats.video_memory_usage << ", DataSource: " | 1580 << ", Video: " << stats.video_memory_usage << ", DataSource: " |
| 1581 << (data_source_ ? data_source_->GetMemoryUsage() : 0) | 1581 << (data_source_ ? data_source_->GetMemoryUsage() : 0) |
| 1582 << ", Demuxer: " << demuxer_memory_usage; | 1582 << ", Demuxer: " << demuxer_memory_usage; |
| 1583 | 1583 |
| 1584 const int64_t delta = current_memory_usage - last_reported_memory_usage_; | 1584 const int64_t delta = current_memory_usage - last_reported_memory_usage_; |
| 1585 last_reported_memory_usage_ = current_memory_usage; | 1585 last_reported_memory_usage_ = current_memory_usage; |
| 1586 adjust_allocated_memory_cb_.Run(delta); | 1586 adjust_allocated_memory_cb_.Run(delta); |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 } // namespace media | 1589 } // namespace media |
| OLD | NEW |