| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 VideoCapturer::OnSinkWantsChanged(wants); | 255 VideoCapturer::OnSinkWantsChanged(wants); |
| 256 bool result = module_->SetApplyRotation(wants.rotation_applied); | 256 bool result = module_->SetApplyRotation(wants.rotation_applied); |
| 257 RTC_CHECK(result); | 257 RTC_CHECK(result); |
| 258 | 258 |
| 259 return; | 259 return; |
| 260 } | 260 } |
| 261 | 261 |
| 262 CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) { | 262 CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) { |
| 263 if (!module_) { | 263 if (!module_) { |
| 264 LOG(LS_ERROR) << "The capturer has not been initialized"; | 264 LOG(LS_ERROR) << "The capturer has not been initialized"; |
| 265 return CS_NO_DEVICE; | 265 return CS_FAILED; |
| 266 } | 266 } |
| 267 if (start_thread_) { | 267 if (start_thread_) { |
| 268 LOG(LS_ERROR) << "The capturer is already running"; | 268 LOG(LS_ERROR) << "The capturer is already running"; |
| 269 RTC_DCHECK(start_thread_->IsCurrent()) | 269 RTC_DCHECK(start_thread_->IsCurrent()) |
| 270 << "Trying to start capturer on different threads"; | 270 << "Trying to start capturer on different threads"; |
| 271 return CS_FAILED; | 271 return CS_FAILED; |
| 272 } | 272 } |
| 273 | 273 |
| 274 start_thread_ = rtc::Thread::Current(); | 274 start_thread_ = rtc::Thread::Current(); |
| 275 RTC_DCHECK(!async_invoker_); | 275 RTC_DCHECK(!async_invoker_); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 pixel_width = 1; | 417 pixel_width = 1; |
| 418 pixel_height = 1; | 418 pixel_height = 1; |
| 419 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). | 419 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). |
| 420 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; | 420 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; |
| 421 data_size = rtc::checked_cast<uint32_t>(length); | 421 data_size = rtc::checked_cast<uint32_t>(length); |
| 422 data = buffer; | 422 data = buffer; |
| 423 rotation = sample.rotation(); | 423 rotation = sample.rotation(); |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace cricket | 426 } // namespace cricket |
| OLD | NEW |