| 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 26 matching lines...) Expand all Loading... |
| 37 VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, | 37 VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, |
| 38 webrtc::VideoRotation rotation, | 38 webrtc::VideoRotation rotation, |
| 39 int64_t timestamp_us); | 39 int64_t timestamp_us); |
| 40 | 40 |
| 41 // Preferred constructor. | 41 // Preferred constructor. |
| 42 VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, | 42 VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, |
| 43 uint32_t timestamp, | 43 uint32_t timestamp, |
| 44 int64_t render_time_ms, | 44 int64_t render_time_ms, |
| 45 VideoRotation rotation); | 45 VideoRotation rotation); |
| 46 | 46 |
| 47 // CreateEmptyFrame: Sets frame dimensions and allocates buffers based | |
| 48 // on set dimensions - height and plane stride. | |
| 49 // If required size is bigger than the allocated one, new buffers of adequate | |
| 50 // size will be allocated. | |
| 51 | |
| 52 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | |
| 53 // webrtc::VideoFrame merge. If you need to write into the frame, create a | |
| 54 // VideoFrameBuffer of the desired size, e.g, using I420Buffer::Create and | |
| 55 // write to that. And if you need to wrap it into a VideoFrame, pass it to the | |
| 56 // constructor. | |
| 57 void CreateEmptyFrame(int width, | |
| 58 int height, | |
| 59 int stride_y, | |
| 60 int stride_u, | |
| 61 int stride_v); | |
| 62 | |
| 63 // CreateFrame: Sets the frame's members and buffers. If required size is | 47 // 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. | 48 // bigger than allocated one, new buffers of adequate size will be allocated. |
| 65 | 49 |
| 66 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 50 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and |
| 67 // webrtc::VideoFrame merge. Instead, create a VideoFrameBuffer and pass to | 51 // webrtc::VideoFrame merge. Instead, create a VideoFrameBuffer and pass to |
| 68 // the constructor. E.g, use I420Buffer::Copy(WrappedI420Buffer(...)). | 52 // the constructor. E.g, use I420Buffer::Copy(WrappedI420Buffer(...)). |
| 69 void CreateFrame(const uint8_t* buffer_y, | 53 void CreateFrame(const uint8_t* buffer_y, |
| 70 const uint8_t* buffer_u, | 54 const uint8_t* buffer_u, |
| 71 const uint8_t* buffer_v, | 55 const uint8_t* buffer_v, |
| 72 int width, | 56 int width, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 int qp_ = -1; // Quantizer value. | 213 int qp_ = -1; // Quantizer value. |
| 230 | 214 |
| 231 // 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 |
| 232 // indication that all future frames will be constrained with those limits | 216 // indication that all future frames will be constrained with those limits |
| 233 // until the application indicates a change again. | 217 // until the application indicates a change again. |
| 234 PlayoutDelay playout_delay_ = {-1, -1}; | 218 PlayoutDelay playout_delay_ = {-1, -1}; |
| 235 }; | 219 }; |
| 236 | 220 |
| 237 } // namespace webrtc | 221 } // namespace webrtc |
| 238 #endif // WEBRTC_VIDEO_FRAME_H_ | 222 #endif // WEBRTC_VIDEO_FRAME_H_ |
| OLD | NEW |