| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 | 950 |
| 951 #if defined(OS_ANDROID) | 951 #if defined(OS_ANDROID) |
| 952 if (isRemote()) { | 952 if (isRemote()) { |
| 953 scoped_refptr<VideoFrame> frame = cast_impl_.GetCastingBanner(); | 953 scoped_refptr<VideoFrame> frame = cast_impl_.GetCastingBanner(); |
| 954 if (frame) { | 954 if (frame) { |
| 955 compositor_->PaintFrameUsingOldRenderingPath(frame); | 955 compositor_->PaintFrameUsingOldRenderingPath(frame); |
| 956 } | 956 } |
| 957 } | 957 } |
| 958 #endif | 958 #endif |
| 959 | 959 |
| 960 if (delegate_) | |
| 961 delegate_->PlayerGone(delegate_id_); | |
| 962 memory_usage_reporting_timer_.Stop(); | 960 memory_usage_reporting_timer_.Stop(); |
| 963 ReportMemoryUsage(); | 961 ReportMemoryUsage(); |
| 964 | 962 |
| 965 if (pending_suspend_resume_cycle_) { | 963 if (pending_resume_ || pending_suspend_resume_cycle_) { |
| 966 » pending_resume_ = false; | 964 pending_resume_ = false; |
| 967 pending_suspend_resume_cycle_ = false; | 965 pending_suspend_resume_cycle_ = false; |
| 968 Resume(); | 966 Resume(); |
| 969 return; | 967 return; |
| 970 } | 968 } |
| 971 } | 969 } |
| 972 | 970 |
| 973 void WebMediaPlayerImpl::OnPipelineEnded() { | 971 void WebMediaPlayerImpl::OnPipelineEnded() { |
| 974 DVLOG(1) << __FUNCTION__; | 972 DVLOG(1) << __FUNCTION__; |
| 975 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 973 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 976 | 974 |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 << ", Video: " << stats.video_memory_usage << ", DataSource: " | 1612 << ", Video: " << stats.video_memory_usage << ", DataSource: " |
| 1615 << (data_source_ ? data_source_->GetMemoryUsage() : 0) | 1613 << (data_source_ ? data_source_->GetMemoryUsage() : 0) |
| 1616 << ", Demuxer: " << demuxer_memory_usage; | 1614 << ", Demuxer: " << demuxer_memory_usage; |
| 1617 | 1615 |
| 1618 const int64_t delta = current_memory_usage - last_reported_memory_usage_; | 1616 const int64_t delta = current_memory_usage - last_reported_memory_usage_; |
| 1619 last_reported_memory_usage_ = current_memory_usage; | 1617 last_reported_memory_usage_ = current_memory_usage; |
| 1620 adjust_allocated_memory_cb_.Run(delta); | 1618 adjust_allocated_memory_cb_.Run(delta); |
| 1621 } | 1619 } |
| 1622 | 1620 |
| 1623 } // namespace media | 1621 } // namespace media |
| OLD | NEW |