OLD | NEW |
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 // Number of planes, typically 1 for packed RGB formats and 3 for planar | 144 // Number of planes, typically 1 for packed RGB formats and 3 for planar |
145 // YUV formats. | 145 // YUV formats. |
146 size_t planes; | 146 size_t planes; |
147 | 147 |
148 // Array of strides for each plane, typically greater or equal to the width | 148 // Array of strides for each plane, typically greater or equal to the width |
149 // of the surface divided by the horizontal sampling period. | 149 // of the surface divided by the horizontal sampling period. |
150 size_t strides[kMaxPlanes]; | 150 size_t strides[kMaxPlanes]; |
151 | 151 |
152 // Array of data pointers to each plane. | 152 // Array of data pointers to each plane. |
153 char* data[kMaxPlanes]; | 153 uint8* data[kMaxPlanes]; |
154 }; | 154 }; |
155 | 155 |
156 | 156 |
157 class VideoFrame : public StreamSample { | 157 class VideoFrame : public StreamSample { |
158 public: | 158 public: |
159 // Locks the underlying surface and fills out the given VideoSurface and | 159 // Locks the underlying surface and fills out the given VideoSurface and |
160 // returns true if successful, false otherwise. Any additional calls to Lock | 160 // returns true if successful, false otherwise. Any additional calls to Lock |
161 // will fail. | 161 // will fail. |
162 virtual bool Lock(VideoSurface* surface) = 0; | 162 virtual bool Lock(VideoSurface* surface) = 0; |
163 | 163 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 private: | 216 private: |
217 OwnerType* owner_; | 217 OwnerType* owner_; |
218 scoped_refptr<BufferType> buffer_; | 218 scoped_refptr<BufferType> buffer_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(AssignableBuffer); | 220 DISALLOW_COPY_AND_ASSIGN(AssignableBuffer); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace media | 223 } // namespace media |
224 | 224 |
225 #endif // MEDIA_BASE_BUFFERS_H_ | 225 #endif // MEDIA_BASE_BUFFERS_H_ |
OLD | NEW |