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 | |
80 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a | 73 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a |
81 // reference to the video buffer also retained by |videoFrame|. | 74 // reference to the video buffer also retained by |videoFrame|. |
82 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 75 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and |
83 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps | 76 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps |
84 // to the constructor. | 77 // to the constructor. |
85 void ShallowCopy(const VideoFrame& videoFrame); | 78 void ShallowCopy(const VideoFrame& videoFrame); |
86 | 79 |
87 // Get frame width. | 80 // Get frame width. |
88 int width() const; | 81 int width() const; |
89 | 82 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 int qp_ = -1; // Quantizer value. | 206 int qp_ = -1; // Quantizer value. |
214 | 207 |
215 // When an application indicates non-zero values here, it is taken as an | 208 // When an application indicates non-zero values here, it is taken as an |
216 // indication that all future frames will be constrained with those limits | 209 // indication that all future frames will be constrained with those limits |
217 // until the application indicates a change again. | 210 // until the application indicates a change again. |
218 PlayoutDelay playout_delay_ = {-1, -1}; | 211 PlayoutDelay playout_delay_ = {-1, -1}; |
219 }; | 212 }; |
220 | 213 |
221 } // namespace webrtc | 214 } // namespace webrtc |
222 #endif // WEBRTC_VIDEO_FRAME_H_ | 215 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |