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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 ChannelConfig config_copy(config); | 367 ChannelConfig config_copy(config); |
368 config_copy.acm_config.decoder_factory = decoder_factory_; | 368 config_copy.acm_config.decoder_factory = decoder_factory_; |
369 voe::ChannelOwner channel_owner = | 369 voe::ChannelOwner channel_owner = |
370 shared_->channel_manager().CreateChannel(config_copy); | 370 shared_->channel_manager().CreateChannel(config_copy); |
371 return InitializeChannel(&channel_owner); | 371 return InitializeChannel(&channel_owner); |
372 } | 372 } |
373 | 373 |
374 int VoEBaseImpl::InitializeChannel(voe::ChannelOwner* channel_owner) { | 374 int VoEBaseImpl::InitializeChannel(voe::ChannelOwner* channel_owner) { |
375 if (channel_owner->channel()->SetEngineInformation( | 375 if (channel_owner->channel()->SetEngineInformation( |
376 shared_->statistics(), *shared_->output_mixer(), | 376 shared_->statistics(), *shared_->output_mixer(), |
377 *shared_->transmit_mixer(), *shared_->process_thread(), | 377 *shared_->process_thread(), *shared_->audio_device(), |
378 *shared_->audio_device(), voiceEngineObserverPtr_, | 378 voiceEngineObserverPtr_, &callbackCritSect_) != 0) { |
379 &callbackCritSect_) != 0) { | |
380 shared_->SetLastError( | 379 shared_->SetLastError( |
381 VE_CHANNEL_NOT_CREATED, kTraceError, | 380 VE_CHANNEL_NOT_CREATED, kTraceError, |
382 "CreateChannel() failed to associate engine and channel." | 381 "CreateChannel() failed to associate engine and channel." |
383 " Destroying channel."); | 382 " Destroying channel."); |
384 shared_->channel_manager().DestroyChannel( | 383 shared_->channel_manager().DestroyChannel( |
385 channel_owner->channel()->ChannelId()); | 384 channel_owner->channel()->ChannelId()); |
386 return -1; | 385 return -1; |
387 } else if (channel_owner->channel()->Init() != 0) { | 386 } else if (channel_owner->channel()->Init() != 0) { |
388 shared_->SetLastError( | 387 shared_->SetLastError( |
389 VE_CHANNEL_NOT_CREATED, kTraceError, | 388 VE_CHANNEL_NOT_CREATED, kTraceError, |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 765 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
767 "AssociateSendChannel() failed to locate accociate_send_channel"); | 766 "AssociateSendChannel() failed to locate accociate_send_channel"); |
768 return -1; | 767 return -1; |
769 } | 768 } |
770 | 769 |
771 channel_ptr->set_associate_send_channel(ch); | 770 channel_ptr->set_associate_send_channel(ch); |
772 return 0; | 771 return 0; |
773 } | 772 } |
774 | 773 |
775 } // namespace webrtc | 774 } // namespace webrtc |
OLD | NEW |