| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 #include "webrtc/modules/video_capture/video_capture_impl.h" | 11 #include "webrtc/modules/video_capture/video_capture_impl.h" |
| 12 | 12 |
| 13 #include <stdlib.h> | 13 #include <stdlib.h> |
| 14 | 14 |
| 15 #include "webrtc/api/video/i420_buffer.h" | 15 #include "webrtc/api/video/i420_buffer.h" |
| 16 #include "webrtc/base/logging.h" | |
| 17 #include "webrtc/base/refcount.h" | |
| 18 #include "webrtc/base/timeutils.h" | |
| 19 #include "webrtc/base/trace_event.h" | |
| 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 21 #include "webrtc/modules/include/module_common_types.h" | 17 #include "webrtc/modules/include/module_common_types.h" |
| 22 #include "webrtc/modules/video_capture/video_capture_config.h" | 18 #include "webrtc/modules/video_capture/video_capture_config.h" |
| 19 #include "webrtc/rtc_base/logging.h" |
| 20 #include "webrtc/rtc_base/refcount.h" |
| 21 #include "webrtc/rtc_base/timeutils.h" |
| 22 #include "webrtc/rtc_base/trace_event.h" |
| 23 #include "webrtc/system_wrappers/include/clock.h" | 23 #include "webrtc/system_wrappers/include/clock.h" |
| 24 | 24 |
| 25 namespace webrtc { | 25 namespace webrtc { |
| 26 namespace videocapturemodule { | 26 namespace videocapturemodule { |
| 27 rtc::scoped_refptr<VideoCaptureModule> VideoCaptureImpl::Create( | 27 rtc::scoped_refptr<VideoCaptureModule> VideoCaptureImpl::Create( |
| 28 VideoCaptureExternal*& externalCapture) { | 28 VideoCaptureExternal*& externalCapture) { |
| 29 rtc::scoped_refptr<VideoCaptureImpl> implementation( | 29 rtc::scoped_refptr<VideoCaptureImpl> implementation( |
| 30 new rtc::RefCountedObject<VideoCaptureImpl>()); | 30 new rtc::RefCountedObject<VideoCaptureImpl>()); |
| 31 externalCapture = implementation.get(); | 31 externalCapture = implementation.get(); |
| 32 return implementation; | 32 return implementation; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 rtc::kNumNanosecsPerMillisec; | 228 rtc::kNumNanosecsPerMillisec; |
| 229 if (diff > 0) { | 229 if (diff > 0) { |
| 230 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); | 230 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 | 233 |
| 234 return nrOfFrames; | 234 return nrOfFrames; |
| 235 } | 235 } |
| 236 } // namespace videocapturemodule | 236 } // namespace videocapturemodule |
| 237 } // namespace webrtc | 237 } // namespace webrtc |
| OLD | NEW |