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 #ifndef MEDIA_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/default_clock.h" |
10 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
11 #include "base/synchronization/condition_variable.h" | 12 #include "base/synchronization/condition_variable.h" |
12 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
14 #include "media/base/audio_renderer.h" | 15 #include "media/base/audio_renderer.h" |
15 #include "media/base/demuxer.h" | 16 #include "media/base/demuxer.h" |
16 #include "media/base/media_export.h" | 17 #include "media/base/media_export.h" |
17 #include "media/base/pipeline_status.h" | 18 #include "media/base/pipeline_status.h" |
18 #include "media/base/ranges.h" | 19 #include "media/base/ranges.h" |
19 #include "media/base/serial_runner.h" | 20 #include "media/base/serial_runner.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // Current volume level (from 0.0f to 1.0f). This value is set immediately | 394 // Current volume level (from 0.0f to 1.0f). This value is set immediately |
394 // via SetVolume() and a task is dispatched on the message loop to notify the | 395 // via SetVolume() and a task is dispatched on the message loop to notify the |
395 // filters. | 396 // filters. |
396 float volume_; | 397 float volume_; |
397 | 398 |
398 // Current playback rate (>= 0.0f). This value is set immediately via | 399 // Current playback rate (>= 0.0f). This value is set immediately via |
399 // SetPlaybackRate() and a task is dispatched on the message loop to notify | 400 // SetPlaybackRate() and a task is dispatched on the message loop to notify |
400 // the filters. | 401 // the filters. |
401 float playback_rate_; | 402 float playback_rate_; |
402 | 403 |
| 404 // base::Clock used by |clock_|. |
| 405 base::DefaultClock default_clock_; |
| 406 |
403 // Reference clock. Keeps track of current playback time. Uses system | 407 // Reference clock. Keeps track of current playback time. Uses system |
404 // clock and linear interpolation, but can have its time manually set | 408 // clock and linear interpolation, but can have its time manually set |
405 // by filters. | 409 // by filters. |
406 scoped_ptr<Clock> clock_; | 410 scoped_ptr<Clock> clock_; |
407 | 411 |
408 // If this value is set to true, then |clock_| is paused and we are waiting | 412 // If this value is set to true, then |clock_| is paused and we are waiting |
409 // for an update of the clock greater than or equal to the elapsed time to | 413 // for an update of the clock greater than or equal to the elapsed time to |
410 // start the clock. | 414 // start the clock. |
411 bool waiting_for_clock_update_; | 415 bool waiting_for_clock_update_; |
412 | 416 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 scoped_ptr<SerialRunner> pending_callbacks_; | 470 scoped_ptr<SerialRunner> pending_callbacks_; |
467 | 471 |
468 base::ThreadChecker thread_checker_; | 472 base::ThreadChecker thread_checker_; |
469 | 473 |
470 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 474 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
471 }; | 475 }; |
472 | 476 |
473 } // namespace media | 477 } // namespace media |
474 | 478 |
475 #endif // MEDIA_BASE_PIPELINE_H_ | 479 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |