OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 static const bool kEnableFrameRecording = false; | 131 static const bool kEnableFrameRecording = false; |
132 static const int kMaxLayers = 3; | 132 static const int kMaxLayers = 3; |
133 std::unique_ptr<IvfFileWriter> file_writers_[kMaxLayers]; | 133 std::unique_ptr<IvfFileWriter> file_writers_[kMaxLayers]; |
134 | 134 |
135 rtc::PlatformThread encoder_thread_; | 135 rtc::PlatformThread encoder_thread_; |
136 rtc::Event encoder_wakeup_event_; | 136 rtc::Event encoder_wakeup_event_; |
137 volatile int stop_encoder_thread_; | 137 volatile int stop_encoder_thread_; |
138 rtc::CriticalSection encoder_settings_crit_; | 138 rtc::CriticalSection encoder_settings_crit_; |
139 std::unique_ptr<EncoderSettings> pending_encoder_settings_ | 139 std::unique_ptr<EncoderSettings> pending_encoder_settings_ |
140 GUARDED_BY(encoder_settings_crit_); | 140 GUARDED_BY(encoder_settings_crit_); |
141 | |
142 rtc::Optional<bool> pending_state_change_ GUARDED_BY(encoder_settings_crit_); | |
pbos-webrtc
2016/06/17 12:38:21
Can you make this Optional<State> and just not use
perkj_webrtc
2016/06/17 13:06:32
Done.
| |
143 | |
144 enum State { | |
145 kStopped, // VideoSendStream::Start has not yet been called. | |
146 kStarted, // VideoSendStream::Start has been called. | |
147 // VideoSendStream::Start has been called but the encoder have timed out. | |
148 kEncoderTimedOut, | |
149 }; | |
150 | |
141 // Only used on the encoder thread. | 151 // Only used on the encoder thread. |
142 bool send_stream_registered_as_observer_; | 152 State state_; |
pbos-webrtc
2016/06/17 12:38:21
Can you make this GUARDED_BY a thread checker for
perkj_webrtc
2016/06/17 13:06:32
Done.
| |
153 | |
143 std::unique_ptr<EncoderSettings> current_encoder_settings_; | 154 std::unique_ptr<EncoderSettings> current_encoder_settings_; |
144 | 155 |
145 OveruseFrameDetector overuse_detector_; | 156 OveruseFrameDetector overuse_detector_; |
146 ViEEncoder vie_encoder_; | 157 ViEEncoder vie_encoder_; |
147 EncoderStateFeedback encoder_feedback_; | 158 EncoderStateFeedback encoder_feedback_; |
148 ProtectionBitrateCalculator protection_bitrate_calculator_; | 159 ProtectionBitrateCalculator protection_bitrate_calculator_; |
149 | 160 |
150 vcm::VideoSender* const video_sender_; | 161 vcm::VideoSender* const video_sender_; |
151 | 162 |
152 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; | 163 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; |
153 // RtpRtcp modules, declared here as they use other members on construction. | 164 // RtpRtcp modules, declared here as they use other members on construction. |
154 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 165 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
155 PayloadRouter payload_router_; | 166 PayloadRouter payload_router_; |
156 VideoCaptureInput input_; | 167 VideoCaptureInput input_; |
157 }; | 168 }; |
158 } // namespace internal | 169 } // namespace internal |
159 } // namespace webrtc | 170 } // namespace webrtc |
160 | 171 |
161 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 172 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
OLD | NEW |