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