VoE: Initialize WebRtcVoiceMediaChannel with AudioOptions during creation

BUG=4690

Changes:
1. In MediaEngineInterface changed CreateChannel() to CreateChannel(const AudioOptions&). Plan is to eventually remove Get/SetAudioOptions and the cousins SetDelayOffset and SetDevices.
2. In ChannelManager changed CreateVoiceChannel(...) to CreateVoiceChannel(..., const AudioOptions&).
3. In ChannelManager removed SetEngineAudioOptions, because it is not used and we want to eventually remove SetAudioOptions.
4. Updated MediaEngineInterface implementations and unit tests accordingly.
5. In WebRtcVoiceEngine changed access of Set/ClearOptionOverrides to protected. These are only used by WebRtcVoiceMediaChannel (now a friend). Plan is to rethink the logic behind option overrides.
6. Cosmetics: replaced NULL with nullptr in touched code

R=solenberg@google.com, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/56499004

Cr-Commit-Position: refs/heads/master@{#9330}
This commit is contained in:
Jelena Marusic
2015-05-29 15:05:44 +02:00
parent bf738d7130
commit c28a896a7b
14 changed files with 113 additions and 139 deletions

View File

@@ -763,12 +763,13 @@ class FakeVoiceEngine : public FakeBaseEngine {
return true;
}
VoiceMediaChannel* CreateChannel() {
VoiceMediaChannel* CreateChannel(const AudioOptions& options) {
if (fail_create_channel_) {
return NULL;
return nullptr;
}
FakeVoiceMediaChannel* ch = new FakeVoiceMediaChannel(this);
ch->SetOptions(options);
channels_.push_back(ch);
return ch;
}