OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 int cropped_width = captured_frame->width; | 223 int cropped_width = captured_frame->width; |
224 int cropped_height = captured_frame->height; | 224 int cropped_height = captured_frame->height; |
225 int out_width = captured_frame->width; | 225 int out_width = captured_frame->width; |
226 int out_height = captured_frame->height; | 226 int out_height = captured_frame->height; |
227 if (enable_video_adapter_ && !IsScreencast()) { | 227 if (enable_video_adapter_ && !IsScreencast()) { |
228 video_adapter_.AdaptFrameResolution( | 228 video_adapter_.AdaptFrameResolution( |
229 captured_frame->width, captured_frame->height, | 229 captured_frame->width, captured_frame->height, |
| 230 captured_frame->time_stamp, |
230 &cropped_width, &cropped_height, | 231 &cropped_width, &cropped_height, |
231 &out_width, &out_height); | 232 &out_width, &out_height); |
232 if (out_width == 0 || out_height == 0) { | 233 if (out_width == 0 || out_height == 0) { |
233 // VideoAdapter dropped the frame. | 234 // VideoAdapter dropped the frame. |
234 return; | 235 return; |
235 } | 236 } |
236 } | 237 } |
237 | 238 |
238 if (!frame_factory_) { | 239 if (!frame_factory_) { |
239 LOG(LS_ERROR) << "No video frame factory."; | 240 LOG(LS_ERROR) << "No video frame factory."; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 void VideoCapturer::UpdateInputSize(const CapturedFrame* captured_frame) { | 402 void VideoCapturer::UpdateInputSize(const CapturedFrame* captured_frame) { |
402 // Update stats protected from fetches from different thread. | 403 // Update stats protected from fetches from different thread. |
403 rtc::CritScope cs(&frame_stats_crit_); | 404 rtc::CritScope cs(&frame_stats_crit_); |
404 | 405 |
405 input_size_valid_ = true; | 406 input_size_valid_ = true; |
406 input_width_ = captured_frame->width; | 407 input_width_ = captured_frame->width; |
407 input_height_ = captured_frame->height; | 408 input_height_ = captured_frame->height; |
408 } | 409 } |
409 | 410 |
410 } // namespace cricket | 411 } // namespace cricket |
OLD | NEW |