Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: webrtc/media/webrtc/webrtcvideoengine2.cc

Issue 1646253004: Split out dscp option from VideoOptions to new struct MediaChannelOptions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/webrtc/webrtcvideoengine2.h ('k') | webrtc/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
{
« no previous file with comments | « webrtc/media/webrtc/webrtcvideoengine2.h ('k') | webrtc/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698