OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 << best_format->ToString(); | 258 << best_format->ToString(); |
259 } | 259 } |
260 return true; | 260 return true; |
261 } | 261 } |
262 bool WebRtcVideoCapturer::SetApplyRotation(bool enable) { | 262 bool WebRtcVideoCapturer::SetApplyRotation(bool enable) { |
263 // Can't take lock here as this will cause deadlock with | 263 // Can't take lock here as this will cause deadlock with |
264 // OnIncomingCapturedFrame. In fact, the whole method, including methods it | 264 // OnIncomingCapturedFrame. In fact, the whole method, including methods it |
265 // calls, can't take lock. | 265 // calls, can't take lock. |
266 DCHECK(module_); | 266 DCHECK(module_); |
267 | 267 |
268 const std::string group_name = | 268 const std::string& group_name = |
269 webrtc::field_trial::FindFullName("WebRTC-CVO"); | 269 webrtc::field_trial::FindFullName("WebRTC-CVO"); |
270 | 270 |
271 if (group_name == "Disabled") { | 271 if (group_name == "Disabled") { |
272 return true; | 272 return true; |
273 } | 273 } |
274 | 274 |
275 if (!VideoCapturer::SetApplyRotation(enable)) { | 275 if (!VideoCapturer::SetApplyRotation(enable)) { |
276 return false; | 276 return false; |
277 } | 277 } |
278 return module_->SetApplyRotation(enable); | 278 return module_->SetApplyRotation(enable); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 elapsed_time = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; | 437 elapsed_time = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; |
438 time_stamp = elapsed_time; | 438 time_stamp = elapsed_time; |
439 data_size = rtc::checked_cast<uint32>(length); | 439 data_size = rtc::checked_cast<uint32>(length); |
440 data = buffer; | 440 data = buffer; |
441 rotation = sample.rotation(); | 441 rotation = sample.rotation(); |
442 } | 442 } |
443 | 443 |
444 } // namespace cricket | 444 } // namespace cricket |
445 | 445 |
446 #endif // HAVE_WEBRTC_VIDEO | 446 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |