| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 duration_ = duration; | 69 duration_ = duration; |
| 70 } | 70 } |
| 71 | 71 |
| 72 // Sets the value returned by IsDiscontinuous(). | 72 // Sets the value returned by IsDiscontinuous(). |
| 73 void SetDiscontinuous(bool discontinuous) { | 73 void SetDiscontinuous(bool discontinuous) { |
| 74 discontinuous_ = discontinuous; | 74 discontinuous_ = discontinuous; |
| 75 } | 75 } |
| 76 | 76 |
| 77 protected: | 77 protected: |
| 78 friend class base::RefCountedThreadSafe<StreamSample>; | 78 friend class base::RefCountedThreadSafe<StreamSample>; |
| 79 StreamSample() | 79 StreamSample(); |
| 80 : discontinuous_(false) { | 80 virtual ~StreamSample(); |
| 81 } | |
| 82 virtual ~StreamSample() {} | |
| 83 | 81 |
| 84 base::TimeDelta timestamp_; | 82 base::TimeDelta timestamp_; |
| 85 base::TimeDelta duration_; | 83 base::TimeDelta duration_; |
| 86 bool discontinuous_; | 84 bool discontinuous_; |
| 87 | 85 |
| 88 private: | 86 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(StreamSample); | 87 DISALLOW_COPY_AND_ASSIGN(StreamSample); |
| 90 }; | 88 }; |
| 91 | 89 |
| 92 | 90 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 118 // Returns the size of the underlying buffer. | 116 // Returns the size of the underlying buffer. |
| 119 virtual size_t GetBufferSize() const = 0; | 117 virtual size_t GetBufferSize() const = 0; |
| 120 | 118 |
| 121 protected: | 119 protected: |
| 122 virtual ~WritableBuffer() {} | 120 virtual ~WritableBuffer() {} |
| 123 }; | 121 }; |
| 124 | 122 |
| 125 } // namespace media | 123 } // namespace media |
| 126 | 124 |
| 127 #endif // MEDIA_BASE_BUFFERS_H_ | 125 #endif // MEDIA_BASE_BUFFERS_H_ |
| OLD | NEW |