| 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 // Defines various types of timestamped media buffers used for transporting | 5 // Defines various types of timestamped media buffers used for transporting |
| 6 // data between filters. Every buffer contains a timestamp in microseconds | 6 // data between filters. Every buffer contains a timestamp in microseconds |
| 7 // describing the relative position of the buffer within the media stream, and | 7 // describing the relative position of the buffer within the media stream, and |
| 8 // the duration in microseconds for the length of time the buffer will be | 8 // the duration in microseconds for the length of time the buffer will be |
| 9 // rendered. | 9 // rendered. |
| 10 // | 10 // |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 private: | 85 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(StreamSample); | 86 DISALLOW_COPY_AND_ASSIGN(StreamSample); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 class MEDIA_EXPORT Buffer : public StreamSample { | 89 class MEDIA_EXPORT Buffer : public StreamSample { |
| 90 public: | 90 public: |
| 91 // Returns a read only pointer to the buffer data. | 91 // Returns a read only pointer to the buffer data. |
| 92 virtual const uint8* GetData() const = 0; | 92 virtual const uint8* GetData() const = 0; |
| 93 | 93 |
| 94 // Returns the size of valid data in bytes. | 94 // Returns the size of valid data in bytes. |
| 95 virtual size_t GetDataSize() const = 0; | 95 virtual int GetDataSize() const = 0; |
| 96 | 96 |
| 97 // If there's no data in this buffer, it represents end of stream. | 97 // If there's no data in this buffer, it represents end of stream. |
| 98 virtual bool IsEndOfStream() const OVERRIDE; | 98 virtual bool IsEndOfStream() const OVERRIDE; |
| 99 | 99 |
| 100 // Return DecryptConfig if buffer is encrypted, or NULL otherwise. | 100 // Return DecryptConfig if buffer is encrypted, or NULL otherwise. |
| 101 virtual const DecryptConfig* GetDecryptConfig() const; | 101 virtual const DecryptConfig* GetDecryptConfig() const; |
| 102 | 102 |
| 103 protected: | 103 protected: |
| 104 virtual ~Buffer() {} | 104 virtual ~Buffer() {} |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace media | 107 } // namespace media |
| 108 | 108 |
| 109 #endif // MEDIA_BASE_BUFFERS_H_ | 109 #endif // MEDIA_BASE_BUFFERS_H_ |
| OLD | NEW |