| 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 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual void DeliverFrame(VideoFrame video_frame) = 0; | 48 virtual void DeliverFrame(VideoFrame video_frame) = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 namespace internal { | 51 namespace internal { |
| 52 class VideoCaptureInput : public webrtc::VideoCaptureInput { | 52 class VideoCaptureInput : public webrtc::VideoCaptureInput { |
| 53 public: | 53 public: |
| 54 VideoCaptureInput(ProcessThread* module_process_thread, | 54 VideoCaptureInput(ProcessThread* module_process_thread, |
| 55 VideoCaptureCallback* frame_callback, | 55 VideoCaptureCallback* frame_callback, |
| 56 VideoRenderer* local_renderer, | 56 VideoRenderer* local_renderer, |
| 57 SendStatisticsProxy* send_stats_proxy, | 57 SendStatisticsProxy* send_stats_proxy, |
| 58 CpuOveruseObserver* overuse_observer); | 58 CpuOveruseObserver* overuse_observer, |
| 59 EncodingTimeObserver* encoding_time_observer); |
| 59 ~VideoCaptureInput(); | 60 ~VideoCaptureInput(); |
| 60 | 61 |
| 61 void IncomingCapturedFrame(const VideoFrame& video_frame) override; | 62 void IncomingCapturedFrame(const VideoFrame& video_frame) override; |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 // Thread functions for deliver captured frames to receivers. | 65 // Thread functions for deliver captured frames to receivers. |
| 65 static bool EncoderThreadFunction(void* obj); | 66 static bool EncoderThreadFunction(void* obj); |
| 66 bool EncoderProcess(); | 67 bool EncoderProcess(); |
| 67 | 68 |
| 68 void DeliverI420Frame(VideoFrame* video_frame); | 69 void DeliverI420Frame(VideoFrame* video_frame); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 83 | 84 |
| 84 volatile int stop_; | 85 volatile int stop_; |
| 85 | 86 |
| 86 VideoFrame captured_frame_ GUARDED_BY(capture_cs_.get()); | 87 VideoFrame captured_frame_ GUARDED_BY(capture_cs_.get()); |
| 87 // Used to make sure incoming time stamp is increasing for every frame. | 88 // Used to make sure incoming time stamp is increasing for every frame. |
| 88 int64_t last_captured_timestamp_; | 89 int64_t last_captured_timestamp_; |
| 89 // Delta used for translating between NTP and internal timestamps. | 90 // Delta used for translating between NTP and internal timestamps. |
| 90 const int64_t delta_ntp_internal_ms_; | 91 const int64_t delta_ntp_internal_ms_; |
| 91 | 92 |
| 92 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; | 93 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; |
| 94 EncodingTimeObserver* const encoding_time_observer_; |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace internal | 97 } // namespace internal |
| 96 } // namespace webrtc | 98 } // namespace webrtc |
| 97 | 99 |
| 98 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ | 100 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ |
| OLD | NEW |