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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 DVLOG(3) << __func__; | 630 DVLOG(3) << __func__; |
631 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 631 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
632 | 632 |
633 base::AutoLock auto_lock(shared_state_lock_); | 633 base::AutoLock auto_lock(shared_state_lock_); |
634 shared_state_.statistics.audio_bytes_decoded += stats.audio_bytes_decoded; | 634 shared_state_.statistics.audio_bytes_decoded += stats.audio_bytes_decoded; |
635 shared_state_.statistics.video_bytes_decoded += stats.video_bytes_decoded; | 635 shared_state_.statistics.video_bytes_decoded += stats.video_bytes_decoded; |
636 shared_state_.statistics.video_frames_decoded += stats.video_frames_decoded; | 636 shared_state_.statistics.video_frames_decoded += stats.video_frames_decoded; |
637 shared_state_.statistics.video_frames_dropped += stats.video_frames_dropped; | 637 shared_state_.statistics.video_frames_dropped += stats.video_frames_dropped; |
638 shared_state_.statistics.audio_memory_usage += stats.audio_memory_usage; | 638 shared_state_.statistics.audio_memory_usage += stats.audio_memory_usage; |
639 shared_state_.statistics.video_memory_usage += stats.video_memory_usage; | 639 shared_state_.statistics.video_memory_usage += stats.video_memory_usage; |
| 640 shared_state_.statistics.video_keyframe_distance_average = |
| 641 stats.video_keyframe_distance_average; |
640 } | 642 } |
641 | 643 |
642 void PipelineImpl::RendererWrapper::OnBufferingStateChange( | 644 void PipelineImpl::RendererWrapper::OnBufferingStateChange( |
643 BufferingState state) { | 645 BufferingState state) { |
644 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 646 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
645 DVLOG(2) << __func__ << "(" << state << ") "; | 647 DVLOG(2) << __func__ << "(" << state << ") "; |
646 | 648 |
647 main_task_runner_->PostTask( | 649 main_task_runner_->PostTask( |
648 FROM_HERE, | 650 FROM_HERE, |
649 base::Bind(&PipelineImpl::OnBufferingStateChange, weak_pipeline_, state)); | 651 base::Bind(&PipelineImpl::OnBufferingStateChange, weak_pipeline_, state)); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 void PipelineImpl::OnSuspendDone() { | 1323 void PipelineImpl::OnSuspendDone() { |
1322 DVLOG(3) << __func__; | 1324 DVLOG(3) << __func__; |
1323 DCHECK(thread_checker_.CalledOnValidThread()); | 1325 DCHECK(thread_checker_.CalledOnValidThread()); |
1324 DCHECK(IsRunning()); | 1326 DCHECK(IsRunning()); |
1325 | 1327 |
1326 DCHECK(!suspend_cb_.is_null()); | 1328 DCHECK(!suspend_cb_.is_null()); |
1327 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); | 1329 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); |
1328 } | 1330 } |
1329 | 1331 |
1330 } // namespace media | 1332 } // namespace media |
OLD | NEW |