Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
acolwell GONE FROM CHROMIUM
2011/03/15 03:56:28
copyright
Ami GONE FROM CHROMIUM
2011/03/15 17:37:18
Done. Next CL: presubmit that checks this for me.
| |
| 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 // FilterHost describes an interface for individual filters to access and | 5 // FilterHost describes an interface for individual filters to access and |
| 6 // modify global playback information. Every filter is given a filter host | 6 // modify global playback information. Every filter is given a filter host |
| 7 // reference as part of initialization. | 7 // reference as part of initialization. |
| 8 // | 8 // |
| 9 // This interface is intentionally verbose to cover the needs for the different | 9 // This interface is intentionally verbose to cover the needs for the different |
| 10 // types of filters (see media/base/filters.h for filter definitionss). Filters | 10 // types of filters (see media/base/filters.h for filter definitions). Filters |
| 11 // typically use parts of the interface that are relevant to their function. | 11 // typically use parts of the interface that are relevant to their function. |
| 12 // For example, an audio renderer filter typically calls SetTime as it feeds | 12 // For example, an audio renderer filter typically calls SetTime as it feeds |
| 13 // data to the audio hardware. A video renderer filter typically calls GetTime | 13 // data to the audio hardware. A video renderer filter typically calls GetTime |
| 14 // to synchronize video with audio. An audio and video decoder would typically | 14 // to synchronize video with audio. An audio and video decoder would typically |
| 15 // have no need to call either SetTime or GetTime. | 15 // have no need to call either SetTime or GetTime. |
| 16 | 16 |
| 17 #ifndef MEDIA_BASE_FILTER_HOST_H_ | 17 #ifndef MEDIA_BASE_FILTER_HOST_H_ |
| 18 #define MEDIA_BASE_FILTER_HOST_H_ | 18 #define MEDIA_BASE_FILTER_HOST_H_ |
| 19 | 19 |
| 20 #include "media/base/filters.h" | 20 #include "media/base/filters.h" |
| 21 #include "media/base/pipeline.h" | 21 #include "media/base/pipeline.h" |
| 22 | 22 |
| 23 namespace media { | 23 namespace media { |
| 24 | 24 |
| 25 class FilterHost { | 25 class FilterHost { |
| 26 public: | 26 public: |
| 27 // Stops execution of the pipeline due to a fatal error. Do not call this | 27 // Stops execution of the pipeline due to a fatal error. Do not call this |
| 28 // method with PIPELINE_OK. | 28 // method with PIPELINE_OK. |
| 29 virtual void SetError(PipelineError error) = 0; | 29 virtual void SetError(PipelineStatus error) = 0; |
| 30 | 30 |
| 31 // Gets the current time in microseconds. | 31 // Gets the current time in microseconds. |
| 32 virtual base::TimeDelta GetTime() const = 0; | 32 virtual base::TimeDelta GetTime() const = 0; |
| 33 | 33 |
| 34 // Gets the duration in microseconds. | 34 // Gets the duration in microseconds. |
| 35 virtual base::TimeDelta GetDuration() const = 0; | 35 virtual base::TimeDelta GetDuration() const = 0; |
| 36 | 36 |
| 37 // Updates the current time. Other filters should poll to examine the updated | 37 // Updates the current time. Other filters should poll to examine the updated |
| 38 // time. | 38 // time. |
| 39 virtual void SetTime(base::TimeDelta time) = 0; | 39 virtual void SetTime(base::TimeDelta time) = 0; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // Gets the byte offset at which the client is requesting the video. | 79 // Gets the byte offset at which the client is requesting the video. |
| 80 virtual int64 GetCurrentReadPosition() = 0; | 80 virtual int64 GetCurrentReadPosition() = 0; |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 virtual ~FilterHost() {} | 83 virtual ~FilterHost() {} |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace media | 86 } // namespace media |
| 87 | 87 |
| 88 #endif // MEDIA_BASE_FILTER_HOST_H_ | 88 #endif // MEDIA_BASE_FILTER_HOST_H_ |
| OLD | NEW |