OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 << best_format->ToString(); | 223 << best_format->ToString(); |
224 } | 224 } |
225 return true; | 225 return true; |
226 } | 226 } |
227 void WebRtcVideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { | 227 void WebRtcVideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { |
228 // Can't take lock here as this will cause deadlock with | 228 // Can't take lock here as this will cause deadlock with |
229 // OnIncomingCapturedFrame. In fact, the whole method, including methods it | 229 // OnIncomingCapturedFrame. In fact, the whole method, including methods it |
230 // calls, can't take lock. | 230 // calls, can't take lock. |
231 RTC_DCHECK(module_); | 231 RTC_DCHECK(module_); |
232 | 232 |
233 const std::string group_name = | 233 if (webrtc::field_trial::FindFullName("WebRTC-CVO").find("Disabled") == 0) |
234 webrtc::field_trial::FindFullName("WebRTC-CVO"); | |
235 | |
236 if (group_name == "Disabled") { | |
237 return; | 234 return; |
238 } | |
239 | 235 |
240 VideoCapturer::OnSinkWantsChanged(wants); | 236 VideoCapturer::OnSinkWantsChanged(wants); |
241 bool result = module_->SetApplyRotation(wants.rotation_applied); | 237 bool result = module_->SetApplyRotation(wants.rotation_applied); |
242 RTC_CHECK(result); | 238 RTC_CHECK(result); |
243 | 239 |
244 return; | 240 return; |
245 } | 241 } |
246 | 242 |
247 CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) { | 243 CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) { |
248 if (!module_) { | 244 if (!module_) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 if (1 == captured_frames_) { | 341 if (1 == captured_frames_) { |
346 LOG(LS_INFO) << "Captured frame size " | 342 LOG(LS_INFO) << "Captured frame size " |
347 << sample.width() << "x" << sample.height() | 343 << sample.width() << "x" << sample.height() |
348 << ". Expected format " << GetCaptureFormat()->ToString(); | 344 << ". Expected format " << GetCaptureFormat()->ToString(); |
349 } | 345 } |
350 | 346 |
351 VideoCapturer::OnFrame(sample, sample.width(), sample.height()); | 347 VideoCapturer::OnFrame(sample, sample.width(), sample.height()); |
352 } | 348 } |
353 | 349 |
354 } // namespace cricket | 350 } // namespace cricket |
OLD | NEW |