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...) 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 // Creates a shallow copy of |videoFrame|, i.e, the this object will retain a | 47 // Support move and copy. |
48 // reference to the video buffer also retained by |videoFrame|. | 48 VideoFrame(const VideoFrame&) = default; |
49 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 49 VideoFrame(VideoFrame&&) = default; |
50 // webrtc::VideoFrame merge. Instead, pass video_frame_buffer() and timestamps | 50 VideoFrame& operator=(const VideoFrame&) = default; |
51 // to the constructor. | 51 VideoFrame& operator=(VideoFrame&&) = default; |
52 void ShallowCopy(const VideoFrame& videoFrame); | |
53 | 52 |
54 // Get frame width. | 53 // Get frame width. |
55 int width() const; | 54 int width() const; |
56 | 55 |
57 // Get frame height. | 56 // Get frame height. |
58 int height() const; | 57 int height() const; |
59 | 58 |
60 // System monotonic clock, same timebase as rtc::TimeMicros(). | 59 // System monotonic clock, same timebase as rtc::TimeMicros(). |
61 int64_t timestamp_us() const { return timestamp_us_; } | 60 int64_t timestamp_us() const { return timestamp_us_; } |
62 void set_timestamp_us(int64_t timestamp_us) { | 61 void set_timestamp_us(int64_t timestamp_us) { |
(...skipping 121 matching lines...) Loading... |
184 int qp_ = -1; // Quantizer value. | 183 int qp_ = -1; // Quantizer value. |
185 | 184 |
186 // When an application indicates non-zero values here, it is taken as an | 185 // When an application indicates non-zero values here, it is taken as an |
187 // indication that all future frames will be constrained with those limits | 186 // indication that all future frames will be constrained with those limits |
188 // until the application indicates a change again. | 187 // until the application indicates a change again. |
189 PlayoutDelay playout_delay_ = {-1, -1}; | 188 PlayoutDelay playout_delay_ = {-1, -1}; |
190 }; | 189 }; |
191 | 190 |
192 } // namespace webrtc | 191 } // namespace webrtc |
193 #endif // WEBRTC_VIDEO_FRAME_H_ | 192 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |