| 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/video/video_capture_input.h" | 11 #include "webrtc/video/video_capture_input.h" |
| 12 | 12 |
| 13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" |
| 14 #include "webrtc/base/logging.h" | 14 #include "webrtc/base/logging.h" |
| 15 #include "webrtc/base/trace_event.h" | 15 #include "webrtc/base/trace_event.h" |
| 16 #include "webrtc/modules/include/module_common_types.h" | 16 #include "webrtc/modules/include/module_common_types.h" |
| 17 #include "webrtc/modules/video_capture/video_capture_factory.h" | 17 #include "webrtc/modules/video_capture/video_capture_factory.h" |
| 18 #include "webrtc/modules/video_processing/include/video_processing.h" | 18 #include "webrtc/modules/video_processing/include/video_processing.h" |
| 19 #include "webrtc/modules/video_render/video_render_defines.h" | 19 #include "webrtc/modules/video_render/video_render_defines.h" |
| 20 #include "webrtc/video/overuse_frame_detector.h" | 20 #include "webrtc/video/overuse_frame_detector.h" |
| 21 #include "webrtc/video/send_statistics_proxy.h" | 21 #include "webrtc/video/send_statistics_proxy.h" |
| 22 #include "webrtc/video/vie_encoder.h" | 22 #include "webrtc/video/vie_encoder.h" |
| 23 | 23 |
| 24 namespace webrtc { | 24 namespace webrtc { |
| 25 | 25 |
| 26 namespace internal { | 26 namespace internal { |
| 27 VideoCaptureInput::VideoCaptureInput(rtc::Event* capture_event, | 27 VideoCaptureInput::VideoCaptureInput( |
| 28 VideoRenderer* local_renderer, | 28 rtc::Event* capture_event, |
| 29 SendStatisticsProxy* stats_proxy, | 29 rtc::VideoSinkInterface<VideoFrame>* local_renderer, |
| 30 OveruseFrameDetector* overuse_detector) | 30 SendStatisticsProxy* stats_proxy, |
| 31 OveruseFrameDetector* overuse_detector) |
| 31 : local_renderer_(local_renderer), | 32 : local_renderer_(local_renderer), |
| 32 stats_proxy_(stats_proxy), | 33 stats_proxy_(stats_proxy), |
| 33 capture_event_(capture_event), | 34 capture_event_(capture_event), |
| 34 // TODO(danilchap): Pass clock from outside to ensure it is same clock | 35 // TODO(danilchap): Pass clock from outside to ensure it is same clock |
| 35 // rtcp module use to calculate offset since last frame captured | 36 // rtcp module use to calculate offset since last frame captured |
| 36 // to estimate rtp timestamp for SenderReport. | 37 // to estimate rtp timestamp for SenderReport. |
| 37 clock_(Clock::GetRealTimeClock()), | 38 clock_(Clock::GetRealTimeClock()), |
| 38 last_captured_timestamp_(0), | 39 last_captured_timestamp_(0), |
| 39 delta_ntp_internal_ms_(clock_->CurrentNtpInMilliseconds() - | 40 delta_ntp_internal_ms_(clock_->CurrentNtpInMilliseconds() - |
| 40 clock_->TimeInMilliseconds()), | 41 clock_->TimeInMilliseconds()), |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 if (captured_frame_.IsZeroSize()) | 100 if (captured_frame_.IsZeroSize()) |
| 100 return false; | 101 return false; |
| 101 | 102 |
| 102 *video_frame = captured_frame_; | 103 *video_frame = captured_frame_; |
| 103 captured_frame_.Reset(); | 104 captured_frame_.Reset(); |
| 104 return true; | 105 return true; |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace internal | 108 } // namespace internal |
| 108 } // namespace webrtc | 109 } // namespace webrtc |
| OLD | NEW |