OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 VideoRotation rotation); | 58 VideoRotation rotation); |
59 | 59 |
60 // Deep copy frame: If required size is bigger than allocated one, new | 60 // Deep copy frame: If required size is bigger than allocated one, new |
61 // buffers of adequate size will be allocated. | 61 // buffers of adequate size will be allocated. |
62 void CopyFrame(const VideoFrame& videoFrame); | 62 void CopyFrame(const VideoFrame& videoFrame); |
63 | 63 |
64 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a | 64 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a |
65 // reference to the video buffer also retained by |videoFrame|. | 65 // reference to the video buffer also retained by |videoFrame|. |
66 void ShallowCopy(const VideoFrame& videoFrame); | 66 void ShallowCopy(const VideoFrame& videoFrame); |
67 | 67 |
68 // Release frame buffer and reset time stamps. | |
69 void Reset(); | |
70 | |
71 // Get pointer to buffer per plane. | 68 // Get pointer to buffer per plane. |
72 uint8_t* buffer(PlaneType type); | 69 uint8_t* buffer(PlaneType type); |
73 // Overloading with const. | 70 // Overloading with const. |
74 const uint8_t* buffer(PlaneType type) const; | 71 const uint8_t* buffer(PlaneType type) const; |
75 | 72 |
76 // Get allocated size per plane. | 73 // Get allocated size per plane. |
77 int allocated_size(PlaneType type) const; | 74 int allocated_size(PlaneType type) const; |
78 | 75 |
79 // Get allocated stride per plane. | 76 // Get allocated stride per plane. |
80 int stride(PlaneType type) const; | 77 int stride(PlaneType type) const; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 uint8_t* _buffer; | 183 uint8_t* _buffer; |
187 size_t _length; | 184 size_t _length; |
188 size_t _size; | 185 size_t _size; |
189 bool _completeFrame = false; | 186 bool _completeFrame = false; |
190 AdaptReason adapt_reason_; | 187 AdaptReason adapt_reason_; |
191 int qp_ = -1; // Quantizer value. | 188 int qp_ = -1; // Quantizer value. |
192 }; | 189 }; |
193 | 190 |
194 } // namespace webrtc | 191 } // namespace webrtc |
195 #endif // WEBRTC_VIDEO_FRAME_H_ | 192 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |