| Index: webrtc/media/webrtc/webrtcvoiceengine.cc
|
| diff --git a/webrtc/media/webrtc/webrtcvoiceengine.cc b/webrtc/media/webrtc/webrtcvoiceengine.cc
|
| index afdc6783ace9434805574425bf6e2ecaa46b9af1..fed5b29058dd0ee67d0a4d83cb963e1fca056f89 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 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 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::PreferredDscp() 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;
|
|
|