Index: webrtc/media/webrtc/webrtcvideoengine2.cc |
diff --git a/webrtc/media/webrtc/webrtcvideoengine2.cc b/webrtc/media/webrtc/webrtcvideoengine2.cc |
index 265aa12108fb8a48df1605228ad8f09da0137eb5..a9a9d7451c7ce0e2b06321f3634f4c04cbdbea0b 100644 |
--- a/webrtc/media/webrtc/webrtcvideoengine2.cc |
+++ b/webrtc/media/webrtc/webrtcvideoengine2.cc |
@@ -526,11 +526,13 @@ void WebRtcVideoEngine2::Init() { |
WebRtcVideoChannel2* WebRtcVideoEngine2::CreateChannel( |
webrtc::Call* call, |
- const VideoOptions& options) { |
+ const MediaChannelOptions& options, |
+ const VideoOptions& video_options) { |
RTC_DCHECK(initialized_); |
- LOG(LS_INFO) << "CreateChannel. Options: " << options.ToString(); |
- return new WebRtcVideoChannel2(call, options, video_codecs_, |
- external_encoder_factory_, external_decoder_factory_); |
+ LOG(LS_INFO) << "CreateChannel. Options: " << video_options.ToString(); |
+ return new WebRtcVideoChannel2(call, options, video_options, video_codecs_, |
+ external_encoder_factory_, |
+ external_decoder_factory_); |
} |
const std::vector<VideoCodec>& WebRtcVideoEngine2::codecs() const { |
@@ -619,17 +621,19 @@ std::vector<VideoCodec> WebRtcVideoEngine2::GetSupportedCodecs() const { |
WebRtcVideoChannel2::WebRtcVideoChannel2( |
webrtc::Call* call, |
- const VideoOptions& options, |
+ const MediaChannelOptions& options, |
+ const VideoOptions& video_options, |
const std::vector<VideoCodec>& recv_codecs, |
WebRtcVideoEncoderFactory* external_encoder_factory, |
WebRtcVideoDecoderFactory* external_decoder_factory) |
- : call_(call), |
+ : VideoMediaChannel(options), |
+ call_(call), |
unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_), |
external_encoder_factory_(external_encoder_factory), |
external_decoder_factory_(external_decoder_factory) { |
RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
SetDefaultOptions(); |
- options_.SetAll(options); |
+ options_.SetAll(video_options); |
if (options_.cpu_overuse_detection) |
signal_cpu_adaptation_ = *options_.cpu_overuse_detection; |
rtcp_receiver_report_ssrc_ = kDefaultRtcpReceiverReportSsrc; |
@@ -641,7 +645,6 @@ WebRtcVideoChannel2::WebRtcVideoChannel2( |
void WebRtcVideoChannel2::SetDefaultOptions() { |
options_.cpu_overuse_detection = rtc::Optional<bool>(true); |
- options_.dscp = rtc::Optional<bool>(false); |
options_.suspend_below_min_bitrate = rtc::Optional<bool>(false); |
options_.screencast_min_bitrate_kbps = rtc::Optional<int>(0); |
} |
@@ -774,6 +777,10 @@ bool WebRtcVideoChannel2::GetChangedSendParameters( |
return true; |
} |
+rtc::DiffServCodePoint WebRtcVideoChannel2::MediaTypeDscpValue() const { |
+ return rtc::DSCP_AF41; |
+} |
+ |
bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) { |
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendParameters"); |
LOG(LS_INFO) << "SetSendParameters: " << params.ToString(); |
@@ -826,9 +833,6 @@ bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) { |
signal_cpu_adaptation_ = *options_.cpu_overuse_detection; |
} |
} |
- rtc::DiffServCodePoint dscp = |
- options_.dscp.value_or(false) ? rtc::DSCP_AF41 : rtc::DSCP_DEFAULT; |
- MediaChannel::SetDscp(dscp); |
} |
{ |