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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { | 208 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { |
209 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 209 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
210 apply_rotation_ = wants.rotation_applied; | 210 apply_rotation_ = wants.rotation_applied; |
211 if (frame_factory_) { | 211 if (frame_factory_) { |
212 frame_factory_->SetApplyRotation(apply_rotation_); | 212 frame_factory_->SetApplyRotation(apply_rotation_); |
213 } | 213 } |
214 | 214 |
215 if (video_adapter()) { | 215 if (video_adapter()) { |
216 video_adapter()->OnCpuResolutionRequest(wants.max_pixel_count, | 216 video_adapter()->OnResolutionRequest(wants.max_pixel_count, |
217 wants.max_pixel_count_step_up); | 217 wants.max_pixel_count_step_up); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 void VideoCapturer::OnFrameCaptured(VideoCapturer*, | 221 void VideoCapturer::OnFrameCaptured(VideoCapturer*, |
222 const CapturedFrame* captured_frame) { | 222 const CapturedFrame* captured_frame) { |
223 if (!broadcaster_.frame_wanted()) { | 223 if (!broadcaster_.frame_wanted()) { |
224 return; | 224 return; |
225 } | 225 } |
226 | 226 |
227 // Use a temporary buffer to scale | 227 // Use a temporary buffer to scale |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 void VideoCapturer::UpdateInputSize(const CapturedFrame* captured_frame) { | 545 void VideoCapturer::UpdateInputSize(const CapturedFrame* captured_frame) { |
546 // Update stats protected from fetches from different thread. | 546 // Update stats protected from fetches from different thread. |
547 rtc::CritScope cs(&frame_stats_crit_); | 547 rtc::CritScope cs(&frame_stats_crit_); |
548 | 548 |
549 input_size_valid_ = true; | 549 input_size_valid_ = true; |
550 input_width_ = captured_frame->width; | 550 input_width_ = captured_frame->width; |
551 input_height_ = captured_frame->height; | 551 input_height_ = captured_frame->height; |
552 } | 552 } |
553 | 553 |
554 } // namespace cricket | 554 } // namespace cricket |
OLD | NEW |