| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // 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 definitions). Filters | 10 // types of filters (see media/base/filters.h for filter definitions). Filters |
| (...skipping 16 matching lines...) Expand all Loading... |
| 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(PipelineStatus error) = 0; | 29 virtual void SetError(PipelineStatus error) = 0; |
| 30 | 30 |
| 31 // Gets the current time. | 31 // Gets the current time. |
| 32 virtual base::TimeDelta GetTime() const = 0; | 32 virtual base::TimeDelta GetTime() const = 0; |
| 33 | 33 |
| 34 // Gets the duration. | 34 // Gets the duration. |
| 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 | |
| 38 // time. | |
| 39 virtual void SetTime(base::TimeDelta time) = 0; | |
| 40 | |
| 41 // Sets the natural size of the video output in pixel units. | 37 // Sets the natural size of the video output in pixel units. |
| 42 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0; | 38 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0; |
| 43 | 39 |
| 44 // Notifies that this filter has ended, typically only called by filter graph | 40 // Notifies that this filter has ended, typically only called by filter graph |
| 45 // endpoints such as renderers. | 41 // endpoints such as renderers. |
| 46 virtual void NotifyEnded() = 0; | 42 virtual void NotifyEnded() = 0; |
| 47 | 43 |
| 48 // Disable audio renderer by calling OnAudioRendererDisabled() on all | 44 // Disable audio renderer by calling OnAudioRendererDisabled() on all |
| 49 // filters. | 45 // filters. |
| 50 virtual void DisableAudioRenderer() = 0; | 46 virtual void DisableAudioRenderer() = 0; |
| 51 | 47 |
| 52 protected: | 48 protected: |
| 53 virtual ~FilterHost() {} | 49 virtual ~FilterHost() {} |
| 54 }; | 50 }; |
| 55 | 51 |
| 56 } // namespace media | 52 } // namespace media |
| 57 | 53 |
| 58 #endif // MEDIA_BASE_FILTER_HOST_H_ | 54 #endif // MEDIA_BASE_FILTER_HOST_H_ |
| OLD | NEW |