| 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 &Pipeline::TeardownStateTransitionTask, this)); | 571 &Pipeline::TeardownStateTransitionTask, this)); |
| 572 } | 572 } |
| 573 | 573 |
| 574 // Called from any thread. | 574 // Called from any thread. |
| 575 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { | 575 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { |
| 576 base::AutoLock auto_lock(lock_); | 576 base::AutoLock auto_lock(lock_); |
| 577 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; | 577 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; |
| 578 statistics_.video_bytes_decoded += stats.video_bytes_decoded; | 578 statistics_.video_bytes_decoded += stats.video_bytes_decoded; |
| 579 statistics_.video_frames_decoded += stats.video_frames_decoded; | 579 statistics_.video_frames_decoded += stats.video_frames_decoded; |
| 580 statistics_.video_frames_dropped += stats.video_frames_dropped; | 580 statistics_.video_frames_dropped += stats.video_frames_dropped; |
| 581 media_log_->QueueStatisticsUpdatedEvent(statistics_); | |
| 582 } | 581 } |
| 583 | 582 |
| 584 void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection, | 583 void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection, |
| 585 const PipelineStatusCB& ended_cb, | 584 const PipelineStatusCB& ended_cb, |
| 586 const PipelineStatusCB& error_cb, | 585 const PipelineStatusCB& error_cb, |
| 587 const NetworkEventCB& network_cb, | 586 const NetworkEventCB& network_cb, |
| 588 const PipelineStatusCB& start_cb) { | 587 const PipelineStatusCB& start_cb) { |
| 589 DCHECK(message_loop_->BelongsToCurrentThread()); | 588 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 590 DCHECK_EQ(kCreated, state_); | 589 DCHECK_EQ(kCreated, state_); |
| 591 filter_collection_ = filter_collection.Pass(); | 590 filter_collection_ = filter_collection.Pass(); |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 1360 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 1362 lock_.AssertAcquired(); | 1361 lock_.AssertAcquired(); |
| 1363 if (!waiting_for_clock_update_) | 1362 if (!waiting_for_clock_update_) |
| 1364 return; | 1363 return; |
| 1365 | 1364 |
| 1366 waiting_for_clock_update_ = false; | 1365 waiting_for_clock_update_ = false; |
| 1367 clock_->Play(); | 1366 clock_->Play(); |
| 1368 } | 1367 } |
| 1369 | 1368 |
| 1370 } // namespace media | 1369 } // namespace media |
| OLD | NEW |