OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |