Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Side by Side Diff: webrtc/media/base/videocapturer.cc

Issue 2764133002: Revert of Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 142 RTC_DCHECK(thread_checker_.CalledOnValidThread());
143 broadcaster_.AddOrUpdateSink(sink, wants); 143 broadcaster_.AddOrUpdateSink(sink, wants);
144 OnSinkWantsChanged(broadcaster_.wants()); 144 OnSinkWantsChanged(broadcaster_.wants());
145 } 145 }
146 146
147 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { 147 void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) {
148 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 148 RTC_DCHECK(thread_checker_.CalledOnValidThread());
149 apply_rotation_ = wants.rotation_applied; 149 apply_rotation_ = wants.rotation_applied;
150 150
151 if (video_adapter()) { 151 if (video_adapter()) {
152 video_adapter()->OnResolutionFramerateRequest(wants.target_pixel_count, 152 video_adapter()->OnResolutionRequest(wants.target_pixel_count,
153 wants.max_pixel_count, 153 wants.max_pixel_count);
154 wants.max_framerate_fps);
155 } 154 }
156 } 155 }
157 156
158 bool VideoCapturer::AdaptFrame(int width, 157 bool VideoCapturer::AdaptFrame(int width,
159 int height, 158 int height,
160 int64_t camera_time_us, 159 int64_t camera_time_us,
161 int64_t system_time_us, 160 int64_t system_time_us,
162 int* out_width, 161 int* out_width,
163 int* out_height, 162 int* out_height,
164 int* crop_width, 163 int* crop_width,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void VideoCapturer::UpdateInputSize(int width, int height) { 363 void VideoCapturer::UpdateInputSize(int width, int height) {
365 // Update stats protected from fetches from different thread. 364 // Update stats protected from fetches from different thread.
366 rtc::CritScope cs(&frame_stats_crit_); 365 rtc::CritScope cs(&frame_stats_crit_);
367 366
368 input_size_valid_ = true; 367 input_size_valid_ = true;
369 input_width_ = width; 368 input_width_ = width;
370 input_height_ = height; 369 input_height_ = height;
371 } 370 }
372 371
373 } // namespace cricket 372 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/videobroadcaster_unittest.cc ('k') | webrtc/media/base/videocapturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698