| 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" |
| 16 #include "webrtc/base/refcount.h" | 17 #include "webrtc/base/refcount.h" |
| 17 #include "webrtc/base/timeutils.h" | 18 #include "webrtc/base/timeutils.h" |
| 18 #include "webrtc/base/trace_event.h" | 19 #include "webrtc/base/trace_event.h" |
| 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 20 #include "webrtc/modules/include/module_common_types.h" | 21 #include "webrtc/modules/include/module_common_types.h" |
| 21 #include "webrtc/modules/video_capture/video_capture_config.h" | 22 #include "webrtc/modules/video_capture/video_capture_config.h" |
| 22 #include "webrtc/system_wrappers/include/clock.h" | 23 #include "webrtc/system_wrappers/include/clock.h" |
| 23 #include "webrtc/system_wrappers/include/logging.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; |
| 33 } | 33 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (diff > 0) | 247 if (diff > 0) |
| 248 { | 248 { |
| 249 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); | 249 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); |
| 250 } | 250 } |
| 251 } | 251 } |
| 252 | 252 |
| 253 return nrOfFrames; | 253 return nrOfFrames; |
| 254 } | 254 } |
| 255 } // namespace videocapturemodule | 255 } // namespace videocapturemodule |
| 256 } // namespace webrtc | 256 } // namespace webrtc |
| OLD | NEW |