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); | |
60 ~VideoCaptureInput(); | 59 ~VideoCaptureInput(); |
61 | 60 |
62 void IncomingCapturedFrame(const VideoFrame& video_frame) override; | 61 void IncomingCapturedFrame(const VideoFrame& video_frame) override; |
63 | 62 |
64 private: | 63 private: |
65 // Thread functions for deliver captured frames to receivers. | 64 // Thread functions for deliver captured frames to receivers. |
66 static bool EncoderThreadFunction(void* obj); | 65 static bool EncoderThreadFunction(void* obj); |
67 bool EncoderProcess(); | 66 bool EncoderProcess(); |
68 | 67 |
69 void DeliverI420Frame(VideoFrame* video_frame); | 68 void DeliverI420Frame(VideoFrame* video_frame); |
(...skipping 14 matching lines...) Expand all Loading... |
84 | 83 |
85 volatile int stop_; | 84 volatile int stop_; |
86 | 85 |
87 VideoFrame captured_frame_ GUARDED_BY(capture_cs_.get()); | 86 VideoFrame captured_frame_ GUARDED_BY(capture_cs_.get()); |
88 // Used to make sure incoming time stamp is increasing for every frame. | 87 // Used to make sure incoming time stamp is increasing for every frame. |
89 int64_t last_captured_timestamp_; | 88 int64_t last_captured_timestamp_; |
90 // Delta used for translating between NTP and internal timestamps. | 89 // Delta used for translating between NTP and internal timestamps. |
91 const int64_t delta_ntp_internal_ms_; | 90 const int64_t delta_ntp_internal_ms_; |
92 | 91 |
93 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; | 92 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; |
94 EncodingTimeObserver* const encoding_time_observer_; | |
95 }; | 93 }; |
96 | 94 |
97 } // namespace internal | 95 } // namespace internal |
98 } // namespace webrtc | 96 } // namespace webrtc |
99 | 97 |
100 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ | 98 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ |
OLD | NEW |