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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const; | 122 const; |
123 | 123 |
124 // Set the underlying buffer. | 124 // Set the underlying buffer. |
125 void set_video_frame_buffer( | 125 void set_video_frame_buffer( |
126 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer); | 126 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer); |
127 | 127 |
128 // Convert native-handle frame to memory-backed I420 frame. Should not be | 128 // Convert native-handle frame to memory-backed I420 frame. Should not be |
129 // called on a non-native-handle frame. | 129 // called on a non-native-handle frame. |
130 VideoFrame ConvertNativeToI420Frame() const; | 130 VideoFrame ConvertNativeToI420Frame() const; |
131 | 131 |
| 132 // Return true if the frame is stored in a texture. |
| 133 bool is_texture() { |
| 134 return video_frame_buffer() && |
| 135 video_frame_buffer()->native_handle() != nullptr; |
| 136 } |
| 137 |
132 private: | 138 private: |
133 // An opaque reference counted handle that stores the pixel data. | 139 // An opaque reference counted handle that stores the pixel data. |
134 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; | 140 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; |
135 uint32_t timestamp_; | 141 uint32_t timestamp_; |
136 int64_t ntp_time_ms_; | 142 int64_t ntp_time_ms_; |
137 int64_t render_time_ms_; | 143 int64_t render_time_ms_; |
138 VideoRotation rotation_; | 144 VideoRotation rotation_; |
139 }; | 145 }; |
140 | 146 |
141 | 147 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 int qp_ = -1; // Quantizer value. | 187 int qp_ = -1; // Quantizer value. |
182 | 188 |
183 // When an application indicates non-zero values here, it is taken as an | 189 // When an application indicates non-zero values here, it is taken as an |
184 // indication that all future frames will be constrained with those limits | 190 // indication that all future frames will be constrained with those limits |
185 // until the application indicates a change again. | 191 // until the application indicates a change again. |
186 PlayoutDelay playout_delay_ = {-1, -1}; | 192 PlayoutDelay playout_delay_ = {-1, -1}; |
187 }; | 193 }; |
188 | 194 |
189 } // namespace webrtc | 195 } // namespace webrtc |
190 #endif // WEBRTC_VIDEO_FRAME_H_ | 196 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |