| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "media/base/text_renderer.h" | 26 #include "media/base/text_renderer.h" |
| 27 #include "media/base/text_track_config.h" | 27 #include "media/base/text_track_config.h" |
| 28 #include "media/base/timestamp_constants.h" | 28 #include "media/base/timestamp_constants.h" |
| 29 #include "media/base/video_decoder_config.h" | 29 #include "media/base/video_decoder_config.h" |
| 30 | 30 |
| 31 using base::TimeDelta; | 31 using base::TimeDelta; |
| 32 | 32 |
| 33 namespace media { | 33 namespace media { |
| 34 | 34 |
| 35 PipelineImpl::PipelineImpl( | 35 PipelineImpl::PipelineImpl( |
| 36 PipelineClient* client, |
| 36 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 37 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 37 MediaLog* media_log) | 38 MediaLog* media_log) |
| 38 : task_runner_(task_runner), | 39 : Pipeline(client), |
| 40 task_runner_(task_runner), |
| 39 media_log_(media_log), | 41 media_log_(media_log), |
| 40 running_(false), | 42 running_(false), |
| 41 did_loading_progress_(false), | 43 did_loading_progress_(false), |
| 42 volume_(1.0f), | 44 volume_(1.0f), |
| 43 playback_rate_(0.0), | 45 playback_rate_(0.0), |
| 44 status_(PIPELINE_OK), | 46 status_(PIPELINE_OK), |
| 45 state_(kCreated), | 47 state_(kCreated), |
| 46 suspend_timestamp_(kNoTimestamp()), | 48 suspend_timestamp_(kNoTimestamp()), |
| 47 renderer_ended_(false), | 49 renderer_ended_(false), |
| 48 text_renderer_ended_(false), | 50 text_renderer_ended_(false), |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 metadata_cb_.Run(metadata); | 865 metadata_cb_.Run(metadata); |
| 864 } | 866 } |
| 865 | 867 |
| 866 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) { | 868 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) { |
| 867 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; | 869 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; |
| 868 DCHECK(task_runner_->BelongsToCurrentThread()); | 870 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 869 buffering_state_cb_.Run(new_buffering_state); | 871 buffering_state_cb_.Run(new_buffering_state); |
| 870 } | 872 } |
| 871 | 873 |
| 872 } // namespace media | 874 } // namespace media |
| OLD | NEW |