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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 LOG(LS_INFO) << "Camera '" << GetId() << "' stopped after capturing " | 343 LOG(LS_INFO) << "Camera '" << GetId() << "' stopped after capturing " |
344 << captured_frames_ << " frames and dropping " | 344 << captured_frames_ << " frames and dropping " |
345 << drop_ratio << "%"; | 345 << drop_ratio << "%"; |
346 | 346 |
347 // Clear any pending async invokes (that OnIncomingCapturedFrame may have | 347 // Clear any pending async invokes (that OnIncomingCapturedFrame may have |
348 // caused). | 348 // caused). |
349 async_invoker_.reset(); | 349 async_invoker_.reset(); |
350 | 350 |
351 SetCaptureFormat(NULL); | 351 SetCaptureFormat(NULL); |
352 start_thread_ = nullptr; | 352 start_thread_ = nullptr; |
| 353 SetCaptureState(CS_STOPPED); |
353 } | 354 } |
354 | 355 |
355 bool WebRtcVideoCapturer::IsRunning() { | 356 bool WebRtcVideoCapturer::IsRunning() { |
356 return (module_ != NULL && module_->CaptureStarted()); | 357 return (module_ != NULL && module_->CaptureStarted()); |
357 } | 358 } |
358 | 359 |
359 bool WebRtcVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) { | 360 bool WebRtcVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) { |
360 if (!fourccs) { | 361 if (!fourccs) { |
361 return false; | 362 return false; |
362 } | 363 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). | 439 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). |
439 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; | 440 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; |
440 data_size = rtc::checked_cast<uint32_t>(length); | 441 data_size = rtc::checked_cast<uint32_t>(length); |
441 data = buffer; | 442 data = buffer; |
442 rotation = sample.rotation(); | 443 rotation = sample.rotation(); |
443 } | 444 } |
444 | 445 |
445 } // namespace cricket | 446 } // namespace cricket |
446 | 447 |
447 #endif // HAVE_WEBRTC_VIDEO | 448 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |