| Index: webrtc/api/peerconnection.cc
|
| diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
|
| index c675015ac9bbee705038fa997b716571eb342357..83b073be07c7f0005b4b9e4fad17616db647e45f 100644
|
| --- a/webrtc/api/peerconnection.cc
|
| +++ b/webrtc/api/peerconnection.cc
|
| @@ -631,6 +631,8 @@ bool PeerConnection::Initialize(
|
|
|
| stats_.reset(new StatsCollector(this));
|
|
|
| + ice_renomination_ = configuration.ice_renomination;
|
| +
|
| // Initialize the WebRtcSession. It creates transport channels etc.
|
| if (!session_->Initialize(factory_->options(), std::move(cert_generator),
|
| configuration)) {
|
| @@ -1260,6 +1262,8 @@ bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration) {
|
|
|
| // TODO(deadbeef): Shouldn't have to hop to the worker thread twice...
|
| session_->SetIceConfig(session_->ParseIceConfig(configuration));
|
| +
|
| + ice_renomination_ = configuration.ice_renomination;
|
| return true;
|
| }
|
|
|
| @@ -1613,6 +1617,8 @@ bool PeerConnection::GetOptionsForOffer(
|
| cricket::TransportOptions();
|
| }
|
| }
|
| + session_options->ice_renomination = ice_renomination_;
|
| +
|
| if (!ExtractMediaSessionOptions(rtc_options, true, session_options)) {
|
| return false;
|
| }
|
| @@ -1649,6 +1655,13 @@ bool PeerConnection::GetOptionsForOffer(
|
| return true;
|
| }
|
|
|
| +void PeerConnection::InitializeOptionsForAnswer(
|
| + cricket::MediaSessionOptions* session_options) {
|
| + session_options->recv_audio = false;
|
| + session_options->recv_video = false;
|
| + session_options->ice_renomination = ice_renomination_;
|
| +}
|
| +
|
| void PeerConnection::FinishOptionsForAnswer(
|
| cricket::MediaSessionOptions* session_options) {
|
| // TODO(deadbeef): Once we have transceivers, enumerate them here instead of
|
| @@ -1683,8 +1696,7 @@ void PeerConnection::FinishOptionsForAnswer(
|
| bool PeerConnection::GetOptionsForAnswer(
|
| const MediaConstraintsInterface* constraints,
|
| cricket::MediaSessionOptions* session_options) {
|
| - session_options->recv_audio = false;
|
| - session_options->recv_video = false;
|
| + InitializeOptionsForAnswer(session_options);
|
| if (!ParseConstraintsForAnswer(constraints, session_options)) {
|
| return false;
|
| }
|
| @@ -1697,8 +1709,7 @@ bool PeerConnection::GetOptionsForAnswer(
|
| bool PeerConnection::GetOptionsForAnswer(
|
| const RTCOfferAnswerOptions& options,
|
| cricket::MediaSessionOptions* session_options) {
|
| - session_options->recv_audio = false;
|
| - session_options->recv_video = false;
|
| + InitializeOptionsForAnswer(session_options);
|
| if (!ExtractMediaSessionOptions(options, false, session_options)) {
|
| return false;
|
| }
|
|
|