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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 if (start_thread_->IsCurrent()) { | 352 if (start_thread_->IsCurrent()) { |
353 SignalFrameCapturedOnStartThread(sample); | 353 SignalFrameCapturedOnStartThread(sample); |
354 } else { | 354 } else { |
355 // This currently happens on with at least VideoCaptureModuleV4L2 and | 355 // This currently happens on with at least VideoCaptureModuleV4L2 and |
356 // possibly other implementations of WebRTC's VideoCaptureModule. | 356 // possibly other implementations of WebRTC's VideoCaptureModule. |
357 // In order to maintain the threading contract with the upper layers and | 357 // In order to maintain the threading contract with the upper layers and |
358 // consistency with other capturers such as in Chrome, we need to do a | 358 // consistency with other capturers such as in Chrome, we need to do a |
359 // thread hop. | 359 // thread hop. |
360 // Note that Stop() can cause the async invoke call to be cancelled. | 360 // Note that Stop() can cause the async invoke call to be cancelled. |
361 async_invoker_->AsyncInvoke<void>( | 361 async_invoker_->AsyncInvoke<void>( |
362 start_thread_, | 362 RTC_FROM_HERE, start_thread_, |
363 // Note that Bind captures by value, so there's an intermediate copy | 363 // Note that Bind captures by value, so there's an intermediate copy |
364 // of sample. | 364 // of sample. |
365 rtc::Bind(&WebRtcVideoCapturer::SignalFrameCapturedOnStartThread, this, | 365 rtc::Bind(&WebRtcVideoCapturer::SignalFrameCapturedOnStartThread, this, |
366 sample)); | 366 sample)); |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 void WebRtcVideoCapturer::OnCaptureDelayChanged(const int32_t id, | 370 void WebRtcVideoCapturer::OnCaptureDelayChanged(const int32_t id, |
371 const int32_t delay) { | 371 const int32_t delay) { |
372 LOG(LS_INFO) << "Capture delay changed to " << delay << " ms"; | 372 LOG(LS_INFO) << "Capture delay changed to " << delay << " ms"; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 pixel_width = 1; | 411 pixel_width = 1; |
412 pixel_height = 1; | 412 pixel_height = 1; |
413 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). | 413 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). |
414 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; | 414 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; |
415 data_size = rtc::checked_cast<uint32_t>(length); | 415 data_size = rtc::checked_cast<uint32_t>(length); |
416 data = buffer; | 416 data = buffer; |
417 rotation = sample.rotation(); | 417 rotation = sample.rotation(); |
418 } | 418 } |
419 | 419 |
420 } // namespace cricket | 420 } // namespace cricket |
OLD | NEW |