OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // Indicates whether any channels exist. | 119 // Indicates whether any channels exist. |
120 bool has_channels() const { | 120 bool has_channels() const { |
121 return (!voice_channels_.empty() || !video_channels_.empty()); | 121 return (!voice_channels_.empty() || !video_channels_.empty()); |
122 } | 122 } |
123 | 123 |
124 // RTX will be enabled/disabled in engines that support it. The supporting | 124 // RTX will be enabled/disabled in engines that support it. The supporting |
125 // engines will start offering an RTX codec. Must be called before Init(). | 125 // engines will start offering an RTX codec. Must be called before Init(). |
126 bool SetVideoRtxEnabled(bool enable); | 126 bool SetVideoRtxEnabled(bool enable); |
127 | 127 |
| 128 // Define crypto options to set on newly created channels. Doesn't change |
| 129 // options on already created channels. |
| 130 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); |
| 131 |
128 // Starts/stops the local microphone and enables polling of the input level. | 132 // Starts/stops the local microphone and enables polling of the input level. |
129 bool capturing() const { return capturing_; } | 133 bool capturing() const { return capturing_; } |
130 | 134 |
131 // The operations below occur on the main thread. | 135 // The operations below occur on the main thread. |
132 | 136 |
133 // Starts AEC dump using existing file, with a specified maximum file size in | 137 // Starts AEC dump using existing file, with a specified maximum file size in |
134 // bytes. When the limit is reached, logging will stop and the file will be | 138 // bytes. When the limit is reached, logging will stop and the file will be |
135 // closed. If max_size_bytes is set to <= 0, no limit will be used. | 139 // closed. If max_size_bytes is set to <= 0, no limit will be used. |
136 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); | 140 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); |
137 | 141 |
138 // Stops recording AEC dump. | 142 // Stops recording AEC dump. |
139 void StopAecDump(); | 143 void StopAecDump(); |
140 | 144 |
141 private: | 145 private: |
142 typedef std::vector<VoiceChannel*> VoiceChannels; | 146 typedef std::vector<VoiceChannel*> VoiceChannels; |
143 typedef std::vector<VideoChannel*> VideoChannels; | 147 typedef std::vector<VideoChannel*> VideoChannels; |
144 typedef std::vector<DataChannel*> DataChannels; | 148 typedef std::vector<DataChannel*> DataChannels; |
145 | 149 |
146 void Construct(MediaEngineInterface* me, | 150 void Construct(MediaEngineInterface* me, |
147 DataEngineInterface* dme, | 151 DataEngineInterface* dme, |
148 rtc::Thread* worker_thread, | 152 rtc::Thread* worker_thread, |
149 rtc::Thread* network_thread); | 153 rtc::Thread* network_thread); |
150 bool InitMediaEngine_w(); | 154 bool InitMediaEngine_w(); |
151 void DestructorDeletes_w(); | 155 void DestructorDeletes_w(); |
152 void Terminate_w(); | 156 void Terminate_w(); |
| 157 bool SetCryptoOptions_w(const rtc::CryptoOptions& crypto_options); |
153 VoiceChannel* CreateVoiceChannel_w( | 158 VoiceChannel* CreateVoiceChannel_w( |
154 webrtc::MediaControllerInterface* media_controller, | 159 webrtc::MediaControllerInterface* media_controller, |
155 TransportController* transport_controller, | 160 TransportController* transport_controller, |
156 const std::string& content_name, | 161 const std::string& content_name, |
157 const std::string* bundle_transport_name, | 162 const std::string* bundle_transport_name, |
158 bool rtcp, | 163 bool rtcp, |
159 const AudioOptions& options); | 164 const AudioOptions& options); |
160 void DestroyVoiceChannel_w(VoiceChannel* voice_channel); | 165 void DestroyVoiceChannel_w(VoiceChannel* voice_channel); |
161 VideoChannel* CreateVideoChannel_w( | 166 VideoChannel* CreateVideoChannel_w( |
162 webrtc::MediaControllerInterface* media_controller, | 167 webrtc::MediaControllerInterface* media_controller, |
(...skipping 15 matching lines...) Expand all Loading... |
178 bool initialized_; | 183 bool initialized_; |
179 rtc::Thread* main_thread_; | 184 rtc::Thread* main_thread_; |
180 rtc::Thread* worker_thread_; | 185 rtc::Thread* worker_thread_; |
181 rtc::Thread* network_thread_; | 186 rtc::Thread* network_thread_; |
182 | 187 |
183 VoiceChannels voice_channels_; | 188 VoiceChannels voice_channels_; |
184 VideoChannels video_channels_; | 189 VideoChannels video_channels_; |
185 DataChannels data_channels_; | 190 DataChannels data_channels_; |
186 | 191 |
187 bool enable_rtx_; | 192 bool enable_rtx_; |
| 193 rtc::CryptoOptions crypto_options_; |
188 | 194 |
189 bool capturing_; | 195 bool capturing_; |
190 }; | 196 }; |
191 | 197 |
192 } // namespace cricket | 198 } // namespace cricket |
193 | 199 |
194 #endif // WEBRTC_PC_CHANNELMANAGER_H_ | 200 #endif // WEBRTC_PC_CHANNELMANAGER_H_ |
OLD | NEW |