summaryrefslogtreecommitdiff
path: root/voice_engine/channel_manager.cc
diff options
context:
space:
mode:
authorturaj@webrtc.org <turaj@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-11-13 00:02:48 +0000
committerturaj@webrtc.org <turaj@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-11-13 00:02:48 +0000
commitb43ac9f2c5d33f5613ad2757e1e62a0aa3c2d34f (patch)
tree5e7a8f53fbbf644e1efeb4155f630289a8dc4c44 /voice_engine/channel_manager.cc
parent591be3b50428e3c1ea6c29093d1d97e6b3743273 (diff)
downloadwebrtc-b43ac9f2c5d33f5613ad2757e1e62a0aa3c2d34f.tar.gz
Inject config when creating channels to override the existing one.
BUG= R=xians@webrtc.org Review URL: https://webrtc-codereview.appspot.com/3239004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5116 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/channel_manager.cc')
-rw-r--r--voice_engine/channel_manager.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/voice_engine/channel_manager.cc b/voice_engine/channel_manager.cc
index b56c54a8..93862574 100644
--- a/voice_engine/channel_manager.cc
+++ b/voice_engine/channel_manager.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/common.h"
#include "webrtc/voice_engine/channel_manager.h"
#include "webrtc/voice_engine/channel.h"
@@ -51,8 +52,16 @@ ChannelManager::ChannelManager(uint32_t instance_id, const Config& config)
config_(config) {}
ChannelOwner ChannelManager::CreateChannel() {
+ return CreateChannelInternal(config_);
+}
+
+ChannelOwner ChannelManager::CreateChannel(const Config& external_config) {
+ return CreateChannelInternal(external_config);
+}
+
+ChannelOwner ChannelManager::CreateChannelInternal(const Config& config) {
Channel* channel;
- Channel::CreateChannel(channel, ++last_channel_id_, instance_id_, config_);
+ Channel::CreateChannel(channel, ++last_channel_id_, instance_id_, config);
ChannelOwner channel_owner(channel);
CriticalSectionScoped crit(lock_.get());