OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 int64_t time_stamp) { | 182 int64_t time_stamp) { |
183 RTC_CHECK(thread_checker_.CalledOnValidThread()); | 183 RTC_CHECK(thread_checker_.CalledOnValidThread()); |
184 frame_factory_->UpdateCapturedFrame(buffer, rotation, time_stamp); | 184 frame_factory_->UpdateCapturedFrame(buffer, rotation, time_stamp); |
185 SignalFrameCaptured(this, frame_factory_->GetCapturedFrame()); | 185 SignalFrameCaptured(this, frame_factory_->GetCapturedFrame()); |
186 frame_factory_->ClearCapturedFrame(); | 186 frame_factory_->ClearCapturedFrame(); |
187 } | 187 } |
188 | 188 |
189 void AndroidVideoCapturer::OnOutputFormatRequest( | 189 void AndroidVideoCapturer::OnOutputFormatRequest( |
190 int width, int height, int fps) { | 190 int width, int height, int fps) { |
191 RTC_CHECK(thread_checker_.CalledOnValidThread()); | 191 RTC_CHECK(thread_checker_.CalledOnValidThread()); |
192 const cricket::VideoFormat& current = video_adapter()->output_format(); | 192 cricket::VideoFormat format(width, height, |
193 cricket::VideoFormat format( | 193 cricket::VideoFormat::FpsToInterval(fps), 0); |
194 width, height, cricket::VideoFormat::FpsToInterval(fps), current.fourcc); | |
195 video_adapter()->OnOutputFormatRequest(format); | 194 video_adapter()->OnOutputFormatRequest(format); |
196 } | 195 } |
197 | 196 |
198 bool AndroidVideoCapturer::GetBestCaptureFormat( | 197 bool AndroidVideoCapturer::GetBestCaptureFormat( |
199 const cricket::VideoFormat& desired, | 198 const cricket::VideoFormat& desired, |
200 cricket::VideoFormat* best_format) { | 199 cricket::VideoFormat* best_format) { |
201 // Delegate this choice to VideoCapturer.startCapture(). | 200 // Delegate this choice to VideoCapturer.startCapture(). |
202 *best_format = desired; | 201 *best_format = desired; |
203 return true; | 202 return true; |
204 } | 203 } |
205 | 204 |
206 } // namespace webrtc | 205 } // namespace webrtc |
OLD | NEW |