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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1577 session_options->bundle_enabled = | 1577 session_options->bundle_enabled = |
1578 session_options->bundle_enabled && | 1578 session_options->bundle_enabled && |
1579 (session_options->has_audio() || session_options->has_video() || | 1579 (session_options->has_audio() || session_options->has_video() || |
1580 session_options->has_data()); | 1580 session_options->has_data()); |
1581 | 1581 |
1582 if (session_->data_channel_type() == cricket::DCT_SCTP && HasDataChannels()) { | 1582 if (session_->data_channel_type() == cricket::DCT_SCTP && HasDataChannels()) { |
1583 session_options->data_channel_type = cricket::DCT_SCTP; | 1583 session_options->data_channel_type = cricket::DCT_SCTP; |
1584 } | 1584 } |
1585 | 1585 |
1586 session_options->rtcp_cname = rtcp_cname_; | 1586 session_options->rtcp_cname = rtcp_cname_; |
| 1587 session_options->crypto_options = factory_->options().crypto_options; |
1587 return true; | 1588 return true; |
1588 } | 1589 } |
1589 | 1590 |
1590 void PeerConnection::FinishOptionsForAnswer( | 1591 void PeerConnection::FinishOptionsForAnswer( |
1591 cricket::MediaSessionOptions* session_options) { | 1592 cricket::MediaSessionOptions* session_options) { |
1592 // TODO(deadbeef): Once we have transceivers, enumerate them here instead of | 1593 // TODO(deadbeef): Once we have transceivers, enumerate them here instead of |
1593 // ContentInfos. | 1594 // ContentInfos. |
1594 if (session_->remote_description()) { | 1595 if (session_->remote_description()) { |
1595 // Initialize the transport_options map. | 1596 // Initialize the transport_options map. |
1596 for (const cricket::ContentInfo& content : | 1597 for (const cricket::ContentInfo& content : |
1597 session_->remote_description()->description()->contents()) { | 1598 session_->remote_description()->description()->contents()) { |
1598 session_options->transport_options[content.name] = | 1599 session_options->transport_options[content.name] = |
1599 cricket::TransportOptions(); | 1600 cricket::TransportOptions(); |
1600 } | 1601 } |
1601 } | 1602 } |
1602 AddSendStreams(session_options, senders_, rtp_data_channels_); | 1603 AddSendStreams(session_options, senders_, rtp_data_channels_); |
1603 session_options->bundle_enabled = | 1604 session_options->bundle_enabled = |
1604 session_options->bundle_enabled && | 1605 session_options->bundle_enabled && |
1605 (session_options->has_audio() || session_options->has_video() || | 1606 (session_options->has_audio() || session_options->has_video() || |
1606 session_options->has_data()); | 1607 session_options->has_data()); |
1607 | 1608 |
1608 // RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams | 1609 // RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams |
1609 // are not signaled in the SDP so does not go through that path and must be | 1610 // are not signaled in the SDP so does not go through that path and must be |
1610 // handled here. | 1611 // handled here. |
1611 if (session_->data_channel_type() == cricket::DCT_SCTP) { | 1612 if (session_->data_channel_type() == cricket::DCT_SCTP) { |
1612 session_options->data_channel_type = cricket::DCT_SCTP; | 1613 session_options->data_channel_type = cricket::DCT_SCTP; |
1613 } | 1614 } |
| 1615 session_options->crypto_options = factory_->options().crypto_options; |
1614 } | 1616 } |
1615 | 1617 |
1616 bool PeerConnection::GetOptionsForAnswer( | 1618 bool PeerConnection::GetOptionsForAnswer( |
1617 const MediaConstraintsInterface* constraints, | 1619 const MediaConstraintsInterface* constraints, |
1618 cricket::MediaSessionOptions* session_options) { | 1620 cricket::MediaSessionOptions* session_options) { |
1619 session_options->recv_audio = false; | 1621 session_options->recv_audio = false; |
1620 session_options->recv_video = false; | 1622 session_options->recv_video = false; |
1621 if (!ParseConstraintsForAnswer(constraints, session_options)) { | 1623 if (!ParseConstraintsForAnswer(constraints, session_options)) { |
1622 return false; | 1624 return false; |
1623 } | 1625 } |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 | 2250 |
2249 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2251 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
2250 int64_t max_size_bytes) { | 2252 int64_t max_size_bytes) { |
2251 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); | 2253 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); |
2252 } | 2254 } |
2253 | 2255 |
2254 void PeerConnection::StopRtcEventLog_w() { | 2256 void PeerConnection::StopRtcEventLog_w() { |
2255 media_controller_->call_w()->StopEventLog(); | 2257 media_controller_->call_w()->StopEventLog(); |
2256 } | 2258 } |
2257 } // namespace webrtc | 2259 } // namespace webrtc |
OLD | NEW |