| 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.h" | 5 #include "media/base/pipeline.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 did_loading_progress_ = true; | 577 did_loading_progress_ = true; |
| 578 } | 578 } |
| 579 | 579 |
| 580 // Called from any thread. | 580 // Called from any thread. |
| 581 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { | 581 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { |
| 582 base::AutoLock auto_lock(lock_); | 582 base::AutoLock auto_lock(lock_); |
| 583 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; | 583 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; |
| 584 statistics_.video_bytes_decoded += stats.video_bytes_decoded; | 584 statistics_.video_bytes_decoded += stats.video_bytes_decoded; |
| 585 statistics_.video_frames_decoded += stats.video_frames_decoded; | 585 statistics_.video_frames_decoded += stats.video_frames_decoded; |
| 586 statistics_.video_frames_dropped += stats.video_frames_dropped; | 586 statistics_.video_frames_dropped += stats.video_frames_dropped; |
| 587 statistics_.total_frame_delay += stats.total_frame_delay; |
| 587 } | 588 } |
| 588 | 589 |
| 589 void Pipeline::StartTask() { | 590 void Pipeline::StartTask() { |
| 590 DCHECK(task_runner_->BelongsToCurrentThread()); | 591 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 591 | 592 |
| 592 CHECK_EQ(kCreated, state_) | 593 CHECK_EQ(kCreated, state_) |
| 593 << "Media pipeline cannot be started more than once"; | 594 << "Media pipeline cannot be started more than once"; |
| 594 | 595 |
| 595 text_renderer_ = filter_collection_->GetTextRenderer(); | 596 text_renderer_ = filter_collection_->GetTextRenderer(); |
| 596 | 597 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 924 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 924 lock_.AssertAcquired(); | 925 lock_.AssertAcquired(); |
| 925 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) | 926 if (interpolation_state_ != INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE) |
| 926 return; | 927 return; |
| 927 | 928 |
| 928 interpolation_state_ = INTERPOLATION_STARTED; | 929 interpolation_state_ = INTERPOLATION_STARTED; |
| 929 interpolator_->StartInterpolating(); | 930 interpolator_->StartInterpolating(); |
| 930 } | 931 } |
| 931 | 932 |
| 932 } // namespace media | 933 } // namespace media |
| OLD | NEW |