Index: webrtc/media/webrtc/webrtcvoiceengine.cc |
diff --git a/webrtc/media/webrtc/webrtcvoiceengine.cc b/webrtc/media/webrtc/webrtcvoiceengine.cc |
index afdc6783ace9434805574425bf6e2ecaa46b9af1..5d264fe828fa6a9a9c7ea35b7d2c0ff84aa8d735 100644 |
--- a/webrtc/media/webrtc/webrtcvoiceengine.cc |
+++ b/webrtc/media/webrtc/webrtcvoiceengine.cc |
@@ -666,10 +666,12 @@ rtc::scoped_refptr<webrtc::AudioState> |
return audio_state_; |
} |
-VoiceMediaChannel* WebRtcVoiceEngine::CreateChannel(webrtc::Call* call, |
+VoiceMediaChannel* WebRtcVoiceEngine::CreateChannel( |
+ webrtc::Call* call, |
+ const webrtc::MediaConfig& config, |
const AudioOptions& options) { |
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
- return new WebRtcVoiceMediaChannel(this, options, call); |
+ return new WebRtcVoiceMediaChannel(this, config, options, call); |
} |
bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
@@ -1382,10 +1384,12 @@ 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 webrtc::MediaConfig& config, |
+ const AudioOptions& options, |
+ webrtc::Call* call) |
+ : VoiceMediaChannel(config), engine_(engine), call_(call) { |
LOG(LS_VERBOSE) << "WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel"; |
RTC_DCHECK(call); |
engine->RegisterChannel(this); |
@@ -1407,6 +1411,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 +1478,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. |
@@ -1482,17 +1487,6 @@ bool WebRtcVoiceMediaChannel::SetOptions(const AudioOptions& options) { |
"Failed to apply engine options during channel SetOptions."; |
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; |