| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 // Implementation of Pipeline. | 5 // Implementation of Pipeline. |
| 6 | 6 |
| 7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ | 7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ |
| 8 #define MEDIA_BASE_PIPELINE_IMPL_H_ | 8 #define MEDIA_BASE_PIPELINE_IMPL_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 #include <set> | 12 #include <set> |
| 13 | 13 |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
| 16 #include "base/thread.h" | 16 #include "base/thread.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "media/base/clock_impl.h" |
| 18 #include "media/base/filter_host.h" | 19 #include "media/base/filter_host.h" |
| 19 #include "media/base/pipeline.h" | 20 #include "media/base/pipeline.h" |
| 20 | 21 |
| 21 namespace media { | 22 namespace media { |
| 22 | 23 |
| 23 | 24 |
| 24 // PipelineImpl runs the media pipeline. Filters are created and called on the | 25 // PipelineImpl runs the media pipeline. Filters are created and called on the |
| 25 // message loop injected into this object. PipelineImpl works like a state | 26 // message loop injected into this object. PipelineImpl works like a state |
| 26 // machine to perform asynchronous initialization, pausing, seeking and playing. | 27 // machine to perform asynchronous initialization, pausing, seeking and playing. |
| 27 // | 28 // |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 270 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
| 270 // via SetVolume() and a task is dispatched on the message loop to notify the | 271 // via SetVolume() and a task is dispatched on the message loop to notify the |
| 271 // filters. | 272 // filters. |
| 272 float volume_; | 273 float volume_; |
| 273 | 274 |
| 274 // Current playback rate (>= 0.0f). This value is set immediately via | 275 // Current playback rate (>= 0.0f). This value is set immediately via |
| 275 // SetPlaybackRate() and a task is dispatched on the message loop to notify | 276 // SetPlaybackRate() and a task is dispatched on the message loop to notify |
| 276 // the filters. | 277 // the filters. |
| 277 float playback_rate_; | 278 float playback_rate_; |
| 278 | 279 |
| 279 // Current playback time. Set by filters. | 280 // Reference clock. Keeps track of current playback time. Uses system |
| 280 base::TimeDelta time_; | 281 // clock and linear interpolation, but can have its time manually set |
| 282 // by filters. |
| 283 ClockImpl clock_; |
| 281 | 284 |
| 282 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that | 285 // Status of the pipeline. Initialized to PIPELINE_OK which indicates that |
| 283 // the pipeline is operating correctly. Any other value indicates that the | 286 // the pipeline is operating correctly. Any other value indicates that the |
| 284 // pipeline is stopped or is stopping. Clients can call the Stop() method to | 287 // pipeline is stopped or is stopping. Clients can call the Stop() method to |
| 285 // reset the pipeline state, and restore this to PIPELINE_OK. | 288 // reset the pipeline state, and restore this to PIPELINE_OK. |
| 286 PipelineError error_; | 289 PipelineError error_; |
| 287 | 290 |
| 288 // Vector of major mime types that have been rendered by this pipeline. | 291 // Vector of major mime types that have been rendered by this pipeline. |
| 289 typedef std::set<std::string> RenderedMimeTypesSet; | 292 typedef std::set<std::string> RenderedMimeTypesSet; |
| 290 RenderedMimeTypesSet rendered_mime_types_; | 293 RenderedMimeTypesSet rendered_mime_types_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // Vector of threads owned by the pipeline and being used by filters. | 329 // Vector of threads owned by the pipeline and being used by filters. |
| 327 typedef std::vector<base::Thread*> FilterThreadVector; | 330 typedef std::vector<base::Thread*> FilterThreadVector; |
| 328 FilterThreadVector filter_threads_; | 331 FilterThreadVector filter_threads_; |
| 329 | 332 |
| 330 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 333 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 331 }; | 334 }; |
| 332 | 335 |
| 333 } // namespace media | 336 } // namespace media |
| 334 | 337 |
| 335 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 338 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |