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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // TODO(juberti): Determine if the VCM exposes any drop stats we can use. | 308 // TODO(juberti): Determine if the VCM exposes any drop stats we can use. |
309 double drop_ratio = 0.0; | 309 double drop_ratio = 0.0; |
310 LOG(LS_INFO) << "Camera '" << GetId() << "' stopped after capturing " | 310 LOG(LS_INFO) << "Camera '" << GetId() << "' stopped after capturing " |
311 << captured_frames_ << " frames and dropping " | 311 << captured_frames_ << " frames and dropping " |
312 << drop_ratio << "%"; | 312 << drop_ratio << "%"; |
313 | 313 |
314 // Clear any pending async invokes (that OnIncomingCapturedFrame may have | 314 // Clear any pending async invokes (that OnIncomingCapturedFrame may have |
315 // caused). | 315 // caused). |
316 async_invoker_.reset(); | 316 async_invoker_.reset(); |
317 | 317 |
318 SetCaptureFormat(NULL); | 318 SetCaptureFormat(nullptr); |
319 start_thread_ = nullptr; | 319 start_thread_ = nullptr; |
320 SetCaptureState(CS_STOPPED); | 320 SetCaptureState(CS_STOPPED); |
321 } | 321 } |
322 | 322 |
323 bool WebRtcVideoCapturer::IsRunning() { | 323 bool WebRtcVideoCapturer::IsRunning() { |
324 return (module_ != NULL && module_->CaptureStarted()); | 324 return (module_ != nullptr && module_->CaptureStarted()); |
325 } | 325 } |
326 | 326 |
327 bool WebRtcVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) { | 327 bool WebRtcVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) { |
328 if (!fourccs) { | 328 if (!fourccs) { |
329 return false; | 329 return false; |
330 } | 330 } |
331 | 331 |
332 fourccs->clear(); | 332 fourccs->clear(); |
333 for (size_t i = 0; i < arraysize(kSupportedFourCCs); ++i) { | 333 for (size_t i = 0; i < arraysize(kSupportedFourCCs); ++i) { |
334 fourccs->push_back(kSupportedFourCCs[i].fourcc); | 334 fourccs->push_back(kSupportedFourCCs[i].fourcc); |
(...skipping 12 matching lines...) Expand all Loading... |
347 if (1 == captured_frames_) { | 347 if (1 == captured_frames_) { |
348 LOG(LS_INFO) << "Captured frame size " | 348 LOG(LS_INFO) << "Captured frame size " |
349 << sample.width() << "x" << sample.height() | 349 << sample.width() << "x" << sample.height() |
350 << ". Expected format " << GetCaptureFormat()->ToString(); | 350 << ". Expected format " << GetCaptureFormat()->ToString(); |
351 } | 351 } |
352 | 352 |
353 VideoCapturer::OnFrame(sample, sample.width(), sample.height()); | 353 VideoCapturer::OnFrame(sample, sample.width(), sample.height()); |
354 } | 354 } |
355 | 355 |
356 } // namespace cricket | 356 } // namespace cricket |
OLD | NEW |