| 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 // CreateFrame: Sets the frame's members and buffers. If required size is | |
| 48 // bigger than allocated one, new buffers of adequate size will be allocated. | |
| 49 | |
| 50 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | |
| 51 // webrtc::VideoFrame merge. Instead, create a VideoFrameBuffer and pass to | |
| 52 // the constructor. E.g, use I420Buffer::Copy(WrappedI420Buffer(...)). | |
| 53 void CreateFrame(const uint8_t* buffer_y, | |
| 54 const uint8_t* buffer_u, | |
| 55 const uint8_t* buffer_v, | |
| 56 int width, | |
| 57 int height, | |
| 58 int stride_y, | |
| 59 int stride_u, | |
| 60 int stride_v, | |
| 61 VideoRotation rotation); | |
| 62 | |
| 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. | |
| 65 // |buffer| must be a packed I420 buffer. | |
| 66 | |
| 67 // TODO(nisse): Deprecated, see above method for advice. | |
| 68 void CreateFrame(const uint8_t* buffer, | |
| 69 int width, | |
| 70 int height, | |
| 71 VideoRotation rotation); | |
| 72 | |
| 73 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a | 47 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a |
| 74 // reference to the video buffer also retained by |videoFrame|. | 48 // reference to the video buffer also retained by |videoFrame|. |
| 75 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 49 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and |
| 76 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps | 50 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps |
| 77 // to the constructor. | 51 // to the constructor. |
| 78 void ShallowCopy(const VideoFrame& videoFrame); | 52 void ShallowCopy(const VideoFrame& videoFrame); |
| 79 | 53 |
| 80 // Get frame width. | 54 // Get frame width. |
| 81 int width() const; | 55 int width() const; |
| 82 | 56 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 int qp_ = -1; // Quantizer value. | 184 int qp_ = -1; // Quantizer value. |
| 211 | 185 |
| 212 // When an application indicates non-zero values here, it is taken as an | 186 // When an application indicates non-zero values here, it is taken as an |
| 213 // indication that all future frames will be constrained with those limits | 187 // indication that all future frames will be constrained with those limits |
| 214 // until the application indicates a change again. | 188 // until the application indicates a change again. |
| 215 PlayoutDelay playout_delay_ = {-1, -1}; | 189 PlayoutDelay playout_delay_ = {-1, -1}; |
| 216 }; | 190 }; |
| 217 | 191 |
| 218 } // namespace webrtc | 192 } // namespace webrtc |
| 219 #endif // WEBRTC_VIDEO_FRAME_H_ | 193 #endif // WEBRTC_VIDEO_FRAME_H_ |
| OLD | NEW |