| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 &Pipeline::TeardownStateTransitionTask, this)); | 558 &Pipeline::TeardownStateTransitionTask, this)); |
| 559 } | 559 } |
| 560 | 560 |
| 561 // Called from any thread. | 561 // Called from any thread. |
| 562 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { | 562 void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) { |
| 563 base::AutoLock auto_lock(lock_); | 563 base::AutoLock auto_lock(lock_); |
| 564 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; | 564 statistics_.audio_bytes_decoded += stats.audio_bytes_decoded; |
| 565 statistics_.video_bytes_decoded += stats.video_bytes_decoded; | 565 statistics_.video_bytes_decoded += stats.video_bytes_decoded; |
| 566 statistics_.video_frames_decoded += stats.video_frames_decoded; | 566 statistics_.video_frames_decoded += stats.video_frames_decoded; |
| 567 statistics_.video_frames_dropped += stats.video_frames_dropped; | 567 statistics_.video_frames_dropped += stats.video_frames_dropped; |
| 568 media_log_->QueueStatisticsUpdatedEvent(statistics_); | |
| 569 } | 568 } |
| 570 | 569 |
| 571 void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection, | 570 void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection, |
| 572 const PipelineStatusCB& ended_cb, | 571 const PipelineStatusCB& ended_cb, |
| 573 const PipelineStatusCB& error_cb, | 572 const PipelineStatusCB& error_cb, |
| 574 const NetworkEventCB& network_cb, | 573 const NetworkEventCB& network_cb, |
| 575 const PipelineStatusCB& start_cb) { | 574 const PipelineStatusCB& start_cb) { |
| 576 DCHECK(message_loop_->BelongsToCurrentThread()); | 575 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 577 DCHECK_EQ(kCreated, state_); | 576 DCHECK_EQ(kCreated, state_); |
| 578 filter_collection_ = filter_collection.Pass(); | 577 filter_collection_ = filter_collection.Pass(); |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 1346 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
| 1348 lock_.AssertAcquired(); | 1347 lock_.AssertAcquired(); |
| 1349 if (!waiting_for_clock_update_) | 1348 if (!waiting_for_clock_update_) |
| 1350 return; | 1349 return; |
| 1351 | 1350 |
| 1352 waiting_for_clock_update_ = false; | 1351 waiting_for_clock_update_ = false; |
| 1353 clock_->Play(); | 1352 clock_->Play(); |
| 1354 } | 1353 } |
| 1355 | 1354 |
| 1356 } // namespace media | 1355 } // namespace media |
| OLD | NEW |