| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 // The pipeline is the public API clients use for playing back media. Clients | 5 // The pipeline is the public API clients use for playing back media. Clients |
| 6 // provide a filter factory containing the filters they want the pipeline to | 6 // provide a filter factory containing the filters they want the pipeline to |
| 7 // use to render media. | 7 // use to render media. |
| 8 | 8 |
| 9 #ifndef MEDIA_BASE_PIPELINE_H_ | 9 #ifndef MEDIA_BASE_PIPELINE_H_ |
| 10 #define MEDIA_BASE_PIPELINE_H_ | 10 #define MEDIA_BASE_PIPELINE_H_ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // the pipeline is started, this value will be 1.0f. Valid values range | 63 // the pipeline is started, this value will be 1.0f. Valid values range |
| 64 // from 0.0f to 1.0f. | 64 // from 0.0f to 1.0f. |
| 65 virtual float GetVolume() const = 0; | 65 virtual float GetVolume() const = 0; |
| 66 | 66 |
| 67 // Gets the current playback rate of the pipeline. When the pipeline is | 67 // Gets the current playback rate of the pipeline. When the pipeline is |
| 68 // started, the playback rate will be 0.0f. A rate of 1.0f indicates | 68 // started, the playback rate will be 0.0f. A rate of 1.0f indicates |
| 69 // that the pipeline is rendering the media at the standard rate. Valid | 69 // that the pipeline is rendering the media at the standard rate. Valid |
| 70 // values for playback rate are >= 0.0f. | 70 // values for playback rate are >= 0.0f. |
| 71 virtual float GetPlaybackRate() const = 0; | 71 virtual float GetPlaybackRate() const = 0; |
| 72 | 72 |
| 73 // Gets the current pipeline time in microseconds. For a pipeline "time" | 73 // Gets the current pipeline time in microseconds. For a pipeline "time" |
| 74 // progresses from 0 to the end of the media. | 74 // progresses from 0 to the end of the media. This time base is updated |
| 75 // by the audio renderer to allow for synchronization of audio and video. |
| 76 // Note that a more accurate time may be obtained by calling the |
| 77 // GetInterpolatedTime method which estimates the position of the audio |
| 78 // device based on a combination of the last time the audio device reported |
| 79 // it's position and the current system time. |
| 75 virtual base::TimeDelta GetTime() const = 0; | 80 virtual base::TimeDelta GetTime() const = 0; |
| 76 | 81 |
| 82 // Gets the current pipeline time in microseconds. For a pipeline "time" |
| 83 // progresses from 0 to the end of the media. Becuase this method provides |
| 84 // an estimated time, it is possible that subsequent calls to this method will |
| 85 // actually progress backwards slightly, so callers must not assume that this |
| 86 // method will always return times larger than the last one. |
| 87 virtual base::TimeDelta GetInterpolatedTime() const = 0; |
| 88 |
| 77 // Gets the current error status for the pipeline. If the pipeline is | 89 // Gets the current error status for the pipeline. If the pipeline is |
| 78 // operating correctly, this will return OK. | 90 // operating correctly, this will return OK. |
| 79 virtual PipelineError GetError() const = 0; | 91 virtual PipelineError GetError() const = 0; |
| 80 | 92 |
| 81 protected: | 93 protected: |
| 82 virtual ~PipelineStatus() {} | 94 virtual ~PipelineStatus() {} |
| 83 }; | 95 }; |
| 84 | 96 |
| 85 | 97 |
| 86 class Pipeline : public PipelineStatus { | 98 class Pipeline : public PipelineStatus { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // This method must be called only after initialization has completed. | 153 // This method must be called only after initialization has completed. |
| 142 virtual void SetVolume(float volume) = 0; | 154 virtual void SetVolume(float volume) = 0; |
| 143 | 155 |
| 144 protected: | 156 protected: |
| 145 virtual ~Pipeline() {} | 157 virtual ~Pipeline() {} |
| 146 }; | 158 }; |
| 147 | 159 |
| 148 } // namespace media | 160 } // namespace media |
| 149 | 161 |
| 150 #endif // MEDIA_BASE_PIPELINE_H_ | 162 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |