OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 // TODO(nisse): For the transition, we use default implementations | 41 // TODO(nisse): For the transition, we use default implementations |
42 // of the stride and data methods where the new methods calls the | 42 // of the stride and data methods where the new methods calls the |
43 // old method, and the old method calls the new methods. Subclasses | 43 // old method, and the old method calls the new methods. Subclasses |
44 // must override either the new methods or the old method, to break | 44 // must override either the new methods or the old method, to break |
45 // infinite recursion. And similarly for the strides. When | 45 // infinite recursion. And similarly for the strides. When |
46 // applications, in particular Chrome, are updated, delete the old | 46 // applications, in particular Chrome, are updated, delete the old |
47 // method and delete the default implementation of the new methods. | 47 // method and delete the default implementation of the new methods. |
48 | 48 |
49 // Returns pointer to the pixel data for a given plane. The memory is owned by | 49 // Returns pointer to the pixel data for a given plane. The memory is owned by |
50 // the VideoFrameBuffer object and must not be freed by the caller. | 50 // the VideoFrameBuffer object and must not be freed by the caller. |
51 virtual const uint8_t* DataY() const = 0; | 51 virtual const uint8_t* DataY() const; |
52 virtual const uint8_t* DataU() const = 0; | 52 virtual const uint8_t* DataU() const; |
53 virtual const uint8_t* DataV() const = 0; | 53 virtual const uint8_t* DataV() const; |
| 54 // Deprecated method. |
| 55 // TODO(nisse): Delete after all users are updated. |
| 56 virtual const uint8_t* data(PlaneType type) const; |
54 | 57 |
55 // TODO(nisse): Move MutableData methods to the I420Buffer subclass. | 58 // TODO(nisse): Move MutableData methods to the I420Buffer subclass. |
56 // Non-const data access. | 59 // Non-const data access. |
57 virtual uint8_t* MutableDataY(); | 60 virtual uint8_t* MutableDataY(); |
58 virtual uint8_t* MutableDataU(); | 61 virtual uint8_t* MutableDataU(); |
59 virtual uint8_t* MutableDataV(); | 62 virtual uint8_t* MutableDataV(); |
| 63 // Deprecated method. TODO(nisse): Delete after all users are updated. |
| 64 virtual uint8_t* MutableData(PlaneType type); |
60 | 65 |
61 // Returns the number of bytes between successive rows for a given plane. | 66 // Returns the number of bytes between successive rows for a given plane. |
62 virtual int StrideY() const = 0; | 67 virtual int StrideY() const; |
63 virtual int StrideU() const = 0; | 68 virtual int StrideU() const; |
64 virtual int StrideV() const = 0; | 69 virtual int StrideV() const; |
| 70 // Deprecated method. TODO(nisse): Delete after all users are updated. |
| 71 virtual int stride(PlaneType type) const; |
65 | 72 |
66 // Return the handle of the underlying video frame. This is used when the | 73 // Return the handle of the underlying video frame. This is used when the |
67 // frame is backed by a texture. | 74 // frame is backed by a texture. |
68 virtual void* native_handle() const = 0; | 75 virtual void* native_handle() const = 0; |
69 | 76 |
70 // Returns a new memory-backed frame buffer converted from this buffer's | 77 // Returns a new memory-backed frame buffer converted from this buffer's |
71 // native handle. | 78 // native handle. |
72 virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0; | 79 virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0; |
73 | 80 |
74 protected: | 81 protected: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 const uint8_t* const v_plane_; | 211 const uint8_t* const v_plane_; |
205 const int y_stride_; | 212 const int y_stride_; |
206 const int u_stride_; | 213 const int u_stride_; |
207 const int v_stride_; | 214 const int v_stride_; |
208 rtc::Callback0<void> no_longer_used_cb_; | 215 rtc::Callback0<void> no_longer_used_cb_; |
209 }; | 216 }; |
210 | 217 |
211 } // namespace webrtc | 218 } // namespace webrtc |
212 | 219 |
213 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ | 220 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ |
OLD | NEW |