| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 OnSinkWantsChanged(broadcaster_.wants()); | 74 OnSinkWantsChanged(broadcaster_.wants()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool AdaptedVideoTrackSource::apply_rotation() { | 77 bool AdaptedVideoTrackSource::apply_rotation() { |
| 78 return broadcaster_.wants().rotation_applied; | 78 return broadcaster_.wants().rotation_applied; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void AdaptedVideoTrackSource::OnSinkWantsChanged( | 81 void AdaptedVideoTrackSource::OnSinkWantsChanged( |
| 82 const rtc::VideoSinkWants& wants) { | 82 const rtc::VideoSinkWants& wants) { |
| 83 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 83 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| 84 video_adapter_.OnResolutionRequest(wants.target_pixel_count, | 84 video_adapter_.OnResolutionFramerateRequest( |
| 85 wants.max_pixel_count); | 85 wants.target_pixel_count, wants.max_pixel_count, wants.max_framerate_fps); |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool AdaptedVideoTrackSource::AdaptFrame(int width, | 88 bool AdaptedVideoTrackSource::AdaptFrame(int width, |
| 89 int height, | 89 int height, |
| 90 int64_t time_us, | 90 int64_t time_us, |
| 91 int* out_width, | 91 int* out_width, |
| 92 int* out_height, | 92 int* out_height, |
| 93 int* crop_width, | 93 int* crop_width, |
| 94 int* crop_height, | 94 int* crop_height, |
| 95 int* crop_x, | 95 int* crop_x, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 109 // VideoAdapter dropped the frame. | 109 // VideoAdapter dropped the frame. |
| 110 return false; | 110 return false; |
| 111 } | 111 } |
| 112 | 112 |
| 113 *crop_x = (width - *crop_width) / 2; | 113 *crop_x = (width - *crop_width) / 2; |
| 114 *crop_y = (height - *crop_height) / 2; | 114 *crop_y = (height - *crop_height) / 2; |
| 115 return true; | 115 return true; |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace rtc | 118 } // namespace rtc |
| OLD | NEW |