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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 while (!video_channels_.empty()) { | 200 while (!video_channels_.empty()) { |
201 DestroyVideoChannel_w(video_channels_.back()); | 201 DestroyVideoChannel_w(video_channels_.back()); |
202 } | 202 } |
203 while (!voice_channels_.empty()) { | 203 while (!voice_channels_.empty()) { |
204 DestroyVoiceChannel_w(voice_channels_.back()); | 204 DestroyVoiceChannel_w(voice_channels_.back()); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 VoiceChannel* ChannelManager::CreateVoiceChannel( | 208 VoiceChannel* ChannelManager::CreateVoiceChannel( |
209 webrtc::MediaControllerInterface* media_controller, | 209 webrtc::MediaControllerInterface* media_controller, |
210 DtlsTransportInternal* rtp_transport, | 210 TransportChannel* rtp_transport, |
211 DtlsTransportInternal* rtcp_transport, | 211 TransportChannel* rtcp_transport, |
212 rtc::Thread* signaling_thread, | 212 rtc::Thread* signaling_thread, |
213 const std::string& content_name, | 213 const std::string& content_name, |
214 const std::string* bundle_transport_name, | 214 const std::string* bundle_transport_name, |
215 bool rtcp_mux_required, | 215 bool rtcp_mux_required, |
216 bool srtp_required, | 216 bool srtp_required, |
217 const AudioOptions& options) { | 217 const AudioOptions& options) { |
218 return worker_thread_->Invoke<VoiceChannel*>( | 218 return worker_thread_->Invoke<VoiceChannel*>( |
219 RTC_FROM_HERE, | 219 RTC_FROM_HERE, |
220 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller, | 220 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller, |
221 rtp_transport, rtcp_transport, signaling_thread, content_name, | 221 rtp_transport, rtcp_transport, signaling_thread, content_name, |
222 bundle_transport_name, rtcp_mux_required, srtp_required, options)); | 222 bundle_transport_name, rtcp_mux_required, srtp_required, options)); |
223 } | 223 } |
224 | 224 |
225 VoiceChannel* ChannelManager::CreateVoiceChannel_w( | 225 VoiceChannel* ChannelManager::CreateVoiceChannel_w( |
226 webrtc::MediaControllerInterface* media_controller, | 226 webrtc::MediaControllerInterface* media_controller, |
227 DtlsTransportInternal* rtp_transport, | 227 TransportChannel* rtp_transport, |
228 DtlsTransportInternal* rtcp_transport, | 228 TransportChannel* rtcp_transport, |
229 rtc::Thread* signaling_thread, | 229 rtc::Thread* signaling_thread, |
230 const std::string& content_name, | 230 const std::string& content_name, |
231 const std::string* bundle_transport_name, | 231 const std::string* bundle_transport_name, |
232 bool rtcp_mux_required, | 232 bool rtcp_mux_required, |
233 bool srtp_required, | 233 bool srtp_required, |
234 const AudioOptions& options) { | 234 const AudioOptions& options) { |
235 RTC_DCHECK(initialized_); | 235 RTC_DCHECK(initialized_); |
236 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 236 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
237 RTC_DCHECK(nullptr != media_controller); | 237 RTC_DCHECK(nullptr != media_controller); |
238 | 238 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 voice_channels_.end(), voice_channel); | 272 voice_channels_.end(), voice_channel); |
273 RTC_DCHECK(it != voice_channels_.end()); | 273 RTC_DCHECK(it != voice_channels_.end()); |
274 if (it == voice_channels_.end()) | 274 if (it == voice_channels_.end()) |
275 return; | 275 return; |
276 voice_channels_.erase(it); | 276 voice_channels_.erase(it); |
277 delete voice_channel; | 277 delete voice_channel; |
278 } | 278 } |
279 | 279 |
280 VideoChannel* ChannelManager::CreateVideoChannel( | 280 VideoChannel* ChannelManager::CreateVideoChannel( |
281 webrtc::MediaControllerInterface* media_controller, | 281 webrtc::MediaControllerInterface* media_controller, |
282 DtlsTransportInternal* rtp_transport, | 282 TransportChannel* rtp_transport, |
283 DtlsTransportInternal* rtcp_transport, | 283 TransportChannel* rtcp_transport, |
284 rtc::Thread* signaling_thread, | 284 rtc::Thread* signaling_thread, |
285 const std::string& content_name, | 285 const std::string& content_name, |
286 const std::string* bundle_transport_name, | 286 const std::string* bundle_transport_name, |
287 bool rtcp_mux_required, | 287 bool rtcp_mux_required, |
288 bool srtp_required, | 288 bool srtp_required, |
289 const VideoOptions& options) { | 289 const VideoOptions& options) { |
290 return worker_thread_->Invoke<VideoChannel*>( | 290 return worker_thread_->Invoke<VideoChannel*>( |
291 RTC_FROM_HERE, | 291 RTC_FROM_HERE, |
292 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller, | 292 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller, |
293 rtp_transport, rtcp_transport, signaling_thread, content_name, | 293 rtp_transport, rtcp_transport, signaling_thread, content_name, |
294 bundle_transport_name, rtcp_mux_required, srtp_required, options)); | 294 bundle_transport_name, rtcp_mux_required, srtp_required, options)); |
295 } | 295 } |
296 | 296 |
297 VideoChannel* ChannelManager::CreateVideoChannel_w( | 297 VideoChannel* ChannelManager::CreateVideoChannel_w( |
298 webrtc::MediaControllerInterface* media_controller, | 298 webrtc::MediaControllerInterface* media_controller, |
299 DtlsTransportInternal* rtp_transport, | 299 TransportChannel* rtp_transport, |
300 DtlsTransportInternal* rtcp_transport, | 300 TransportChannel* rtcp_transport, |
301 rtc::Thread* signaling_thread, | 301 rtc::Thread* signaling_thread, |
302 const std::string& content_name, | 302 const std::string& content_name, |
303 const std::string* bundle_transport_name, | 303 const std::string* bundle_transport_name, |
304 bool rtcp_mux_required, | 304 bool rtcp_mux_required, |
305 bool srtp_required, | 305 bool srtp_required, |
306 const VideoOptions& options) { | 306 const VideoOptions& options) { |
307 RTC_DCHECK(initialized_); | 307 RTC_DCHECK(initialized_); |
308 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 308 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
309 RTC_DCHECK(nullptr != media_controller); | 309 RTC_DCHECK(nullptr != media_controller); |
310 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( | 310 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 RTC_DCHECK(it != video_channels_.end()); | 344 RTC_DCHECK(it != video_channels_.end()); |
345 if (it == video_channels_.end()) | 345 if (it == video_channels_.end()) |
346 return; | 346 return; |
347 | 347 |
348 video_channels_.erase(it); | 348 video_channels_.erase(it); |
349 delete video_channel; | 349 delete video_channel; |
350 } | 350 } |
351 | 351 |
352 RtpDataChannel* ChannelManager::CreateRtpDataChannel( | 352 RtpDataChannel* ChannelManager::CreateRtpDataChannel( |
353 webrtc::MediaControllerInterface* media_controller, | 353 webrtc::MediaControllerInterface* media_controller, |
354 DtlsTransportInternal* rtp_transport, | 354 TransportChannel* rtp_transport, |
355 DtlsTransportInternal* rtcp_transport, | 355 TransportChannel* rtcp_transport, |
356 rtc::Thread* signaling_thread, | 356 rtc::Thread* signaling_thread, |
357 const std::string& content_name, | 357 const std::string& content_name, |
358 const std::string* bundle_transport_name, | 358 const std::string* bundle_transport_name, |
359 bool rtcp_mux_required, | 359 bool rtcp_mux_required, |
360 bool srtp_required) { | 360 bool srtp_required) { |
361 return worker_thread_->Invoke<RtpDataChannel*>( | 361 return worker_thread_->Invoke<RtpDataChannel*>( |
362 RTC_FROM_HERE, | 362 RTC_FROM_HERE, |
363 Bind(&ChannelManager::CreateRtpDataChannel_w, this, media_controller, | 363 Bind(&ChannelManager::CreateRtpDataChannel_w, this, media_controller, |
364 rtp_transport, rtcp_transport, signaling_thread, content_name, | 364 rtp_transport, rtcp_transport, signaling_thread, content_name, |
365 bundle_transport_name, rtcp_mux_required, srtp_required)); | 365 bundle_transport_name, rtcp_mux_required, srtp_required)); |
366 } | 366 } |
367 | 367 |
368 RtpDataChannel* ChannelManager::CreateRtpDataChannel_w( | 368 RtpDataChannel* ChannelManager::CreateRtpDataChannel_w( |
369 webrtc::MediaControllerInterface* media_controller, | 369 webrtc::MediaControllerInterface* media_controller, |
370 DtlsTransportInternal* rtp_transport, | 370 TransportChannel* rtp_transport, |
371 DtlsTransportInternal* rtcp_transport, | 371 TransportChannel* rtcp_transport, |
372 rtc::Thread* signaling_thread, | 372 rtc::Thread* signaling_thread, |
373 const std::string& content_name, | 373 const std::string& content_name, |
374 const std::string* bundle_transport_name, | 374 const std::string* bundle_transport_name, |
375 bool rtcp_mux_required, | 375 bool rtcp_mux_required, |
376 bool srtp_required) { | 376 bool srtp_required) { |
377 // This is ok to alloc from a thread other than the worker thread. | 377 // This is ok to alloc from a thread other than the worker thread. |
378 RTC_DCHECK(initialized_); | 378 RTC_DCHECK(initialized_); |
379 MediaConfig config; | 379 MediaConfig config; |
380 if (media_controller) { | 380 if (media_controller) { |
381 config = media_controller->config(); | 381 config = media_controller->config(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 media_engine_.get(), file, max_size_bytes)); | 429 media_engine_.get(), file, max_size_bytes)); |
430 } | 430 } |
431 | 431 |
432 void ChannelManager::StopAecDump() { | 432 void ChannelManager::StopAecDump() { |
433 worker_thread_->Invoke<void>( | 433 worker_thread_->Invoke<void>( |
434 RTC_FROM_HERE, | 434 RTC_FROM_HERE, |
435 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); | 435 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); |
436 } | 436 } |
437 | 437 |
438 } // namespace cricket | 438 } // namespace cricket |
OLD | NEW |