Index: webrtc/media/webrtc/webrtcvoiceengine.cc |
diff --git a/webrtc/media/webrtc/webrtcvoiceengine.cc b/webrtc/media/webrtc/webrtcvoiceengine.cc |
index afdc6783ace9434805574425bf6e2ecaa46b9af1..dfb79f08a0d263741069c478b494be140dd469ff 100644 |
--- a/webrtc/media/webrtc/webrtcvoiceengine.cc |
+++ b/webrtc/media/webrtc/webrtcvoiceengine.cc |
@@ -667,9 +667,10 @@ rtc::scoped_refptr<webrtc::AudioState> |
} |
VoiceMediaChannel* WebRtcVoiceEngine::CreateChannel(webrtc::Call* call, |
- const AudioOptions& options) { |
+ const MediaChannelOptions& options, |
+ const AudioOptions& audio_options) { |
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
- return new WebRtcVoiceMediaChannel(this, options, call); |
+ return new WebRtcVoiceMediaChannel(this, options, audio_options, call); |
} |
bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
@@ -1382,14 +1383,16 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream { |
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioReceiveStream); |
}; |
-WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, |
- const AudioOptions& options, |
- webrtc::Call* call) |
- : engine_(engine), call_(call) { |
+WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel( |
+ WebRtcVoiceEngine* engine, |
+ const MediaChannelOptions& options, |
+ const AudioOptions& audio_options, |
+ webrtc::Call* call) |
+ : VoiceMediaChannel(options), engine_(engine), call_(call) { |
LOG(LS_VERBOSE) << "WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel"; |
RTC_DCHECK(call); |
engine->RegisterChannel(this); |
- SetOptions(options); |
+ SetOptions(audio_options); |
} |
WebRtcVoiceMediaChannel::~WebRtcVoiceMediaChannel() { |
@@ -1407,6 +1410,10 @@ WebRtcVoiceMediaChannel::~WebRtcVoiceMediaChannel() { |
engine()->UnregisterChannel(this); |
} |
+rtc::DiffServCodePoint WebRtcVoiceMediaChannel::MediaTypeDscpValue() const { |
+ return kAudioDscpValue; |
+} |
+ |
bool WebRtcVoiceMediaChannel::SetSendParameters( |
const AudioSendParameters& params) { |
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
@@ -1470,9 +1477,6 @@ bool WebRtcVoiceMediaChannel::SetOptions(const AudioOptions& options) { |
LOG(LS_INFO) << "Setting voice channel options: " |
<< options.ToString(); |
- // Check if DSCP value is changed from previous. |
- bool dscp_option_changed = (options_.dscp != options.dscp); |
- |
// We retain all of the existing options, and apply the given ones |
// on top. This means there is no way to "clear" options such that |
// they go back to the engine default. |
@@ -1483,16 +1487,6 @@ bool WebRtcVoiceMediaChannel::SetOptions(const AudioOptions& options) { |
return false; |
} |
- if (dscp_option_changed) { |
- rtc::DiffServCodePoint dscp = rtc::DSCP_DEFAULT; |
- if (options_.dscp.value_or(false)) { |
- dscp = kAudioDscpValue; |
- } |
- if (MediaChannel::SetDscp(dscp) != 0) { |
- LOG(LS_WARNING) << "Failed to set DSCP settings for audio channel"; |
- } |
- } |
- |
LOG(LS_INFO) << "Set voice channel options. Current options: " |
<< options_.ToString(); |
return true; |