| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/pipeline_impl.h" | 5 #include "media/base/pipeline_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 DVLOG(3) << __func__; | 640 DVLOG(3) << __func__; |
| 641 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 641 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
| 642 | 642 |
| 643 base::AutoLock auto_lock(shared_state_lock_); | 643 base::AutoLock auto_lock(shared_state_lock_); |
| 644 shared_state_.statistics.audio_bytes_decoded += stats.audio_bytes_decoded; | 644 shared_state_.statistics.audio_bytes_decoded += stats.audio_bytes_decoded; |
| 645 shared_state_.statistics.video_bytes_decoded += stats.video_bytes_decoded; | 645 shared_state_.statistics.video_bytes_decoded += stats.video_bytes_decoded; |
| 646 shared_state_.statistics.video_frames_decoded += stats.video_frames_decoded; | 646 shared_state_.statistics.video_frames_decoded += stats.video_frames_decoded; |
| 647 shared_state_.statistics.video_frames_dropped += stats.video_frames_dropped; | 647 shared_state_.statistics.video_frames_dropped += stats.video_frames_dropped; |
| 648 shared_state_.statistics.audio_memory_usage += stats.audio_memory_usage; | 648 shared_state_.statistics.audio_memory_usage += stats.audio_memory_usage; |
| 649 shared_state_.statistics.video_memory_usage += stats.video_memory_usage; | 649 shared_state_.statistics.video_memory_usage += stats.video_memory_usage; |
| 650 shared_state_.statistics.video_keyframe_distance_average = |
| 651 stats.video_keyframe_distance_average; |
| 650 } | 652 } |
| 651 | 653 |
| 652 void PipelineImpl::RendererWrapper::OnBufferingStateChange( | 654 void PipelineImpl::RendererWrapper::OnBufferingStateChange( |
| 653 BufferingState state) { | 655 BufferingState state) { |
| 654 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 656 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
| 655 DVLOG(2) << __func__ << "(" << state << ") "; | 657 DVLOG(2) << __func__ << "(" << state << ") "; |
| 656 | 658 |
| 657 main_task_runner_->PostTask( | 659 main_task_runner_->PostTask( |
| 658 FROM_HERE, | 660 FROM_HERE, |
| 659 base::Bind(&PipelineImpl::OnBufferingStateChange, weak_pipeline_, state)); | 661 base::Bind(&PipelineImpl::OnBufferingStateChange, weak_pipeline_, state)); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 void PipelineImpl::OnSuspendDone() { | 1335 void PipelineImpl::OnSuspendDone() { |
| 1334 DVLOG(3) << __func__; | 1336 DVLOG(3) << __func__; |
| 1335 DCHECK(thread_checker_.CalledOnValidThread()); | 1337 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1336 DCHECK(IsRunning()); | 1338 DCHECK(IsRunning()); |
| 1337 | 1339 |
| 1338 DCHECK(!suspend_cb_.is_null()); | 1340 DCHECK(!suspend_cb_.is_null()); |
| 1339 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); | 1341 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); |
| 1340 } | 1342 } |
| 1341 | 1343 |
| 1342 } // namespace media | 1344 } // namespace media |
| OLD | NEW |