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

Side by Side Diff: webrtc/api/peerconnection.cc

Issue 1745003002: Move suspend_below_min_bitrate from VideoOptions to MediaConfig. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 LOG(LS_INFO) << "TCP candidates are disabled."; 608 LOG(LS_INFO) << "TCP candidates are disabled.";
609 } 609 }
610 610
611 port_allocator_->set_flags(portallocator_flags); 611 port_allocator_->set_flags(portallocator_flags);
612 // No step delay is used while allocating ports. 612 // No step delay is used while allocating ports.
613 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); 613 port_allocator_->set_step_delay(cricket::kMinimumStepDelay);
614 614
615 // We rely on default values when constraints aren't found. 615 // We rely on default values when constraints aren't found.
616 cricket::MediaConfig media_config; 616 cricket::MediaConfig media_config;
617 617
618 media_config.disable_prerenderer_smoothing = 618 media_config.video.disable_prerenderer_smoothing =
619 configuration.disable_prerenderer_smoothing; 619 configuration.disable_prerenderer_smoothing;
620 620
621 // Find DSCP constraint. 621 // Find DSCP constraint.
622 FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp, 622 FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
623 &media_config.enable_dscp, NULL); 623 &media_config.enable_dscp, NULL);
624 // Find constraints for cpu overuse detection. 624 // Find constraint for cpu overuse detection.
625 FindConstraint(constraints, MediaConstraintsInterface::kCpuOveruseDetection, 625 FindConstraint(constraints, MediaConstraintsInterface::kCpuOveruseDetection,
626 &media_config.enable_cpu_overuse_detection, NULL); 626 &media_config.video.enable_cpu_overuse_detection, NULL);
627
628 // Find Suspend Below Min Bitrate constraint.
629 FindConstraint(constraints,
630 MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate,
631 &media_config.video.suspend_below_min_bitrate, NULL);
627 632
628 media_controller_.reset(factory_->CreateMediaController(media_config)); 633 media_controller_.reset(factory_->CreateMediaController(media_config));
629 634
630 remote_stream_factory_.reset(new RemoteMediaStreamFactory( 635 remote_stream_factory_.reset(new RemoteMediaStreamFactory(
631 factory_->signaling_thread(), media_controller_->channel_manager())); 636 factory_->signaling_thread(), media_controller_->channel_manager()));
632 637
633 session_.reset( 638 session_.reset(
634 new WebRtcSession(media_controller_.get(), factory_->signaling_thread(), 639 new WebRtcSession(media_controller_.get(), factory_->signaling_thread(),
635 factory_->worker_thread(), port_allocator_.get())); 640 factory_->worker_thread(), port_allocator_.get()));
636 stats_.reset(new StatsCollector(this)); 641 stats_.reset(new StatsCollector(this));
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2098 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2094 for (const auto& channel : sctp_data_channels_) { 2099 for (const auto& channel : sctp_data_channels_) {
2095 if (channel->id() == sid) { 2100 if (channel->id() == sid) {
2096 return channel; 2101 return channel;
2097 } 2102 }
2098 } 2103 }
2099 return nullptr; 2104 return nullptr;
2100 } 2105 }
2101 2106
2102 } // namespace webrtc 2107 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698