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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 bool IsZeroSize() const; | 165 bool IsZeroSize() const; |
166 | 166 |
167 // Return the underlying buffer. Never nullptr for a properly | 167 // Return the underlying buffer. Never nullptr for a properly |
168 // initialized VideoFrame. | 168 // initialized VideoFrame. |
169 // Creating a new reference breaks the HasOneRef and IsMutable | 169 // Creating a new reference breaks the HasOneRef and IsMutable |
170 // logic. So return a const ref to our reference. | 170 // logic. So return a const ref to our reference. |
171 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() | 171 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() |
172 const; | 172 const; |
173 | 173 |
174 // Return true if the frame is stored in a texture. | 174 // Return true if the frame is stored in a texture. |
175 bool is_texture() { | 175 bool is_texture() const { |
176 return video_frame_buffer() && | 176 return video_frame_buffer() && |
177 video_frame_buffer()->native_handle() != nullptr; | 177 video_frame_buffer()->native_handle() != nullptr; |
178 } | 178 } |
179 | 179 |
180 private: | 180 private: |
181 // An opaque reference counted handle that stores the pixel data. | 181 // An opaque reference counted handle that stores the pixel data. |
182 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; | 182 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; |
183 uint32_t timestamp_rtp_; | 183 uint32_t timestamp_rtp_; |
184 int64_t ntp_time_ms_; | 184 int64_t ntp_time_ms_; |
185 int64_t timestamp_us_; | 185 int64_t timestamp_us_; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 int qp_ = -1; // Quantizer value. | 229 int qp_ = -1; // Quantizer value. |
230 | 230 |
231 // When an application indicates non-zero values here, it is taken as an | 231 // 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 | 232 // indication that all future frames will be constrained with those limits |
233 // until the application indicates a change again. | 233 // until the application indicates a change again. |
234 PlayoutDelay playout_delay_ = {-1, -1}; | 234 PlayoutDelay playout_delay_ = {-1, -1}; |
235 }; | 235 }; |
236 | 236 |
237 } // namespace webrtc | 237 } // namespace webrtc |
238 #endif // WEBRTC_VIDEO_FRAME_H_ | 238 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |