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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // CreateFrame: Sets the frame's members and buffers. If required size is | 63 // CreateFrame: Sets the frame's members and buffers. If required size is |
64 // bigger than allocated one, new buffers of adequate size will be allocated. | 64 // bigger than allocated one, new buffers of adequate size will be allocated. |
65 // |buffer| must be a packed I420 buffer. | 65 // |buffer| must be a packed I420 buffer. |
66 | 66 |
67 // TODO(nisse): Deprecated, see above method for advice. | 67 // TODO(nisse): Deprecated, see above method for advice. |
68 void CreateFrame(const uint8_t* buffer, | 68 void CreateFrame(const uint8_t* buffer, |
69 int width, | 69 int width, |
70 int height, | 70 int height, |
71 VideoRotation rotation); | 71 VideoRotation rotation); |
72 | 72 |
| 73 // Deep copy frame: If required size is bigger than allocated one, new |
| 74 // buffers of adequate size will be allocated. |
| 75 // TODO(nisse): Should be deleted in the cricket::VideoFrame and |
| 76 // webrtc::VideoFrame merge. Instead, use I420Buffer::Copy to make a copy of |
| 77 // the pixel data, and use the constructor to wrap it into a VideoFrame. |
| 78 void CopyFrame(const VideoFrame& videoFrame); |
| 79 |
73 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a | 80 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a |
74 // reference to the video buffer also retained by |videoFrame|. | 81 // reference to the video buffer also retained by |videoFrame|. |
75 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 82 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and |
76 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps | 83 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps |
77 // to the constructor. | 84 // to the constructor. |
78 void ShallowCopy(const VideoFrame& videoFrame); | 85 void ShallowCopy(const VideoFrame& videoFrame); |
79 | 86 |
80 // Get frame width. | 87 // Get frame width. |
81 int width() const; | 88 int width() const; |
82 | 89 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 int qp_ = -1; // Quantizer value. | 213 int qp_ = -1; // Quantizer value. |
207 | 214 |
208 // When an application indicates non-zero values here, it is taken as an | 215 // When an application indicates non-zero values here, it is taken as an |
209 // indication that all future frames will be constrained with those limits | 216 // indication that all future frames will be constrained with those limits |
210 // until the application indicates a change again. | 217 // until the application indicates a change again. |
211 PlayoutDelay playout_delay_ = {-1, -1}; | 218 PlayoutDelay playout_delay_ = {-1, -1}; |
212 }; | 219 }; |
213 | 220 |
214 } // namespace webrtc | 221 } // namespace webrtc |
215 #endif // WEBRTC_VIDEO_FRAME_H_ | 222 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |