| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // seconds. | 46 // seconds. |
| 47 virtual void SetBufferedTime(base::TimeDelta buffered_time) = 0; | 47 virtual void SetBufferedTime(base::TimeDelta buffered_time) = 0; |
| 48 | 48 |
| 49 // Set the total size of the media file. | 49 // Set the total size of the media file. |
| 50 virtual void SetTotalBytes(int64 total_bytes) = 0; | 50 virtual void SetTotalBytes(int64 total_bytes) = 0; |
| 51 | 51 |
| 52 // Sets the total number of bytes that are buffered on the client and ready to | 52 // Sets the total number of bytes that are buffered on the client and ready to |
| 53 // be played. | 53 // be played. |
| 54 virtual void SetBufferedBytes(int64 buffered_bytes) = 0; | 54 virtual void SetBufferedBytes(int64 buffered_bytes) = 0; |
| 55 | 55 |
| 56 // Sets the size of the video output in pixel units. | 56 // Sets the natural size of the video output in pixel units. |
| 57 virtual void SetVideoSize(size_t width, size_t height) = 0; | 57 virtual void SetNaturalVideoSize(const gfx::Size& size) = 0; |
| 58 | 58 |
| 59 // Sets the flag to indicate that we are doing streaming. | 59 // Sets the flag to indicate that we are doing streaming. |
| 60 virtual void SetStreaming(bool streaming) = 0; | 60 virtual void SetStreaming(bool streaming) = 0; |
| 61 | 61 |
| 62 // Notifies that this filter has ended, typically only called by filter graph | 62 // Notifies that this filter has ended, typically only called by filter graph |
| 63 // endpoints such as renderers. | 63 // endpoints such as renderers. |
| 64 virtual void NotifyEnded() = 0; | 64 virtual void NotifyEnded() = 0; |
| 65 | 65 |
| 66 // Sets the flag to indicate that our media is now loaded. | 66 // Sets the flag to indicate that our media is now loaded. |
| 67 virtual void SetLoaded(bool loaded) = 0; | 67 virtual void SetLoaded(bool loaded) = 0; |
| (...skipping 11 matching lines...) Expand all 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 |