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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 protected: | 81 protected: |
82 virtual ~VideoFrameBuffer(); | 82 virtual ~VideoFrameBuffer(); |
83 }; | 83 }; |
84 | 84 |
85 // Plain I420 buffer in standard memory. | 85 // Plain I420 buffer in standard memory. |
86 class I420Buffer : public VideoFrameBuffer { | 86 class I420Buffer : public VideoFrameBuffer { |
87 public: | 87 public: |
88 I420Buffer(int width, int height); | 88 I420Buffer(int width, int height); |
89 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); | 89 I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v); |
90 | 90 |
| 91 static rtc::scoped_refptr<I420Buffer> Create(int width, int height); |
| 92 static rtc::scoped_refptr<I420Buffer> Create(int width, |
| 93 int height, |
| 94 int stride_y, |
| 95 int stride_u, |
| 96 int stride_v); |
| 97 |
91 // Sets all three planes to all zeros. Used to work around for | 98 // Sets all three planes to all zeros. Used to work around for |
92 // quirks in memory checkers | 99 // quirks in memory checkers |
93 // (https://bugs.chromium.org/p/libyuv/issues/detail?id=377) and | 100 // (https://bugs.chromium.org/p/libyuv/issues/detail?id=377) and |
94 // ffmpeg (http://crbug.com/390941). | 101 // ffmpeg (http://crbug.com/390941). |
95 // TODO(nisse): Should be deleted if/when those issues are resolved | 102 // TODO(nisse): Should be deleted if/when those issues are resolved |
96 // in a better way. | 103 // in a better way. |
97 void InitializeData(); | 104 void InitializeData(); |
98 | 105 |
99 // Sets the frame buffer to all black. | 106 // Sets the frame buffer to all black. |
100 void SetToBlack(); | 107 void SetToBlack(); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 const uint8_t* const v_plane_; | 218 const uint8_t* const v_plane_; |
212 const int y_stride_; | 219 const int y_stride_; |
213 const int u_stride_; | 220 const int u_stride_; |
214 const int v_stride_; | 221 const int v_stride_; |
215 rtc::Callback0<void> no_longer_used_cb_; | 222 rtc::Callback0<void> no_longer_used_cb_; |
216 }; | 223 }; |
217 | 224 |
218 } // namespace webrtc | 225 } // namespace webrtc |
219 | 226 |
220 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ | 227 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ |
OLD | NEW |