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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { | 202 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { |
203 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 203 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
204 apply_rotation_ = wants.rotation_applied; | 204 apply_rotation_ = wants.rotation_applied; |
205 if (frame_factory_) { | 205 if (frame_factory_) { |
206 frame_factory_->SetApplyRotation(apply_rotation_); | 206 frame_factory_->SetApplyRotation(apply_rotation_); |
207 } | 207 } |
208 | 208 |
209 if (video_adapter()) { | 209 if (video_adapter()) { |
210 video_adapter()->OnCpuResolutionRequest(wants.max_pixel_count, | 210 video_adapter()->OnResolutionRequest(wants.max_pixel_count, |
211 wants.max_pixel_count_step_up); | 211 wants.max_pixel_count_step_up); |
212 } | 212 } |
213 } | 213 } |
214 | 214 |
215 void VideoCapturer::OnFrameCaptured(VideoCapturer*, | 215 void VideoCapturer::OnFrameCaptured(VideoCapturer*, |
216 const CapturedFrame* captured_frame) { | 216 const CapturedFrame* captured_frame) { |
217 if (!broadcaster_.frame_wanted()) { | 217 if (!broadcaster_.frame_wanted()) { |
218 return; | 218 return; |
219 } | 219 } |
220 | 220 |
221 // Use a temporary buffer to scale | 221 // Use a temporary buffer to scale |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 rtc::CritScope cs(&frame_stats_crit_); | 541 rtc::CritScope cs(&frame_stats_crit_); |
542 | 542 |
543 last_captured_frame_format_.width = captured_frame->width; | 543 last_captured_frame_format_.width = captured_frame->width; |
544 last_captured_frame_format_.height = captured_frame->height; | 544 last_captured_frame_format_.height = captured_frame->height; |
545 // TODO(ronghuawu): Useful to report interval as well? | 545 // TODO(ronghuawu): Useful to report interval as well? |
546 last_captured_frame_format_.interval = 0; | 546 last_captured_frame_format_.interval = 0; |
547 last_captured_frame_format_.fourcc = captured_frame->fourcc; | 547 last_captured_frame_format_.fourcc = captured_frame->fourcc; |
548 } | 548 } |
549 | 549 |
550 } // namespace cricket | 550 } // namespace cricket |
OLD | NEW |