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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // webrtc::CpuOveruseObserver implementation. | 68 // webrtc::CpuOveruseObserver implementation. |
69 void OveruseDetected() override; | 69 void OveruseDetected() override; |
70 void NormalUsage() override; | 70 void NormalUsage() override; |
71 | 71 |
72 typedef std::map<uint32_t, RtpState> RtpStateMap; | 72 typedef std::map<uint32_t, RtpState> RtpStateMap; |
73 RtpStateMap GetRtpStates() const; | 73 RtpStateMap GetRtpStates() const; |
74 | 74 |
75 int GetPaddingNeededBps() const; | 75 int GetPaddingNeededBps() const; |
76 | 76 |
77 private: | 77 private: |
| 78 static bool EncoderThreadFunction(void* obj); |
| 79 void EncoderProcess(); |
| 80 |
78 void ConfigureSsrcs(); | 81 void ConfigureSsrcs(); |
79 | 82 |
80 SendStatisticsProxy stats_proxy_; | 83 SendStatisticsProxy stats_proxy_; |
81 EncodedFrameCallbackAdapter encoded_frame_proxy_; | 84 EncodedFrameCallbackAdapter encoded_frame_proxy_; |
82 const VideoSendStream::Config config_; | 85 const VideoSendStream::Config config_; |
83 std::map<uint32_t, RtpState> suspended_ssrcs_; | 86 std::map<uint32_t, RtpState> suspended_ssrcs_; |
84 | 87 |
85 ProcessThread* const module_process_thread_; | 88 ProcessThread* const module_process_thread_; |
86 CallStats* const call_stats_; | 89 CallStats* const call_stats_; |
87 CongestionController* const congestion_controller_; | 90 CongestionController* const congestion_controller_; |
88 VieRemb* const remb_; | 91 VieRemb* const remb_; |
89 | 92 |
| 93 rtc::PlatformThread encoder_thread_; |
| 94 rtc::Event encoder_wakeup_event_; |
| 95 volatile int stop_encoder_thread_; |
| 96 |
90 OveruseFrameDetector overuse_detector_; | 97 OveruseFrameDetector overuse_detector_; |
91 PayloadRouter payload_router_; | 98 PayloadRouter payload_router_; |
92 EncoderStateFeedback encoder_feedback_; | 99 EncoderStateFeedback encoder_feedback_; |
93 ViEChannel vie_channel_; | 100 ViEChannel vie_channel_; |
94 ViEReceiver* const vie_receiver_; | 101 ViEReceiver* const vie_receiver_; |
95 ViEEncoder vie_encoder_; | 102 ViEEncoder vie_encoder_; |
96 VideoCodingModule* const vcm_; | 103 VideoCodingModule* const vcm_; |
97 // TODO(pbos): Move RtpRtcp ownership to VideoSendStream. | 104 // TODO(pbos): Move RtpRtcp ownership to VideoSendStream. |
98 // RtpRtcp modules, currently owned by ViEChannel but ownership should | 105 // RtpRtcp modules, currently owned by ViEChannel but ownership should |
99 // eventually move here. | 106 // eventually move here. |
100 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 107 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
101 VideoCaptureInput input_; | 108 VideoCaptureInput input_; |
102 }; | 109 }; |
103 } // namespace internal | 110 } // namespace internal |
104 } // namespace webrtc | 111 } // namespace webrtc |
105 | 112 |
106 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 113 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
OLD | NEW |