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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 EncodingTimeObserver* encoding_time_observer); | 56 EncodingTimeObserver* encoding_time_observer); |
57 ~VideoCaptureInput(); | 57 ~VideoCaptureInput(); |
58 | 58 |
59 void IncomingCapturedFrame(const VideoFrame& video_frame) override; | 59 void IncomingCapturedFrame(const VideoFrame& video_frame) override; |
60 | 60 |
61 private: | 61 private: |
62 // Thread functions for deliver captured frames to receivers. | 62 // Thread functions for deliver captured frames to receivers. |
63 static bool EncoderThreadFunction(void* obj); | 63 static bool EncoderThreadFunction(void* obj); |
64 bool EncoderProcess(); | 64 bool EncoderProcess(); |
65 | 65 |
66 mutable rtc::CriticalSection crit_; | 66 rtc::CriticalSection crit_; |
67 ProcessThread* const module_process_thread_; | 67 ProcessThread* const module_process_thread_; |
68 | 68 |
69 VideoCaptureCallback* const frame_callback_; | 69 VideoCaptureCallback* const frame_callback_; |
70 VideoRenderer* const local_renderer_; | 70 VideoRenderer* const local_renderer_; |
71 SendStatisticsProxy* const stats_proxy_; | 71 SendStatisticsProxy* const stats_proxy_; |
72 | 72 |
73 rtc::PlatformThread encoder_thread_; | 73 rtc::PlatformThread encoder_thread_; |
74 rtc::Event capture_event_; | 74 rtc::Event capture_event_; |
75 | 75 |
76 volatile int stop_; | 76 volatile int stop_; |
77 | 77 |
78 VideoFrame captured_frame_ GUARDED_BY(crit_); | 78 VideoFrame captured_frame_ GUARDED_BY(crit_); |
79 // Used to make sure incoming time stamp is increasing for every frame. | 79 // Used to make sure incoming time stamp is increasing for every frame. |
80 int64_t last_captured_timestamp_; | 80 int64_t last_captured_timestamp_; |
81 // Delta used for translating between NTP and internal timestamps. | 81 // Delta used for translating between NTP and internal timestamps. |
82 const int64_t delta_ntp_internal_ms_; | 82 const int64_t delta_ntp_internal_ms_; |
83 | 83 |
84 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; | 84 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; |
85 EncodingTimeObserver* const encoding_time_observer_; | 85 EncodingTimeObserver* const encoding_time_observer_; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace internal | 88 } // namespace internal |
89 } // namespace webrtc | 89 } // namespace webrtc |
90 | 90 |
91 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ | 91 #endif // WEBRTC_VIDEO_VIDEO_CAPTURE_INPUT_H_ |
OLD | NEW |