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

Side by Side Diff: talk/app/webrtc/peerconnection.cc

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 !remote_video_tracks_.empty(); 1528 !remote_video_tracks_.empty();
1529 } 1529 }
1530 session_options->bundle_enabled = 1530 session_options->bundle_enabled =
1531 session_options->bundle_enabled && 1531 session_options->bundle_enabled &&
1532 (session_options->has_audio() || session_options->has_video() || 1532 (session_options->has_audio() || session_options->has_video() ||
1533 session_options->has_data()); 1533 session_options->has_data());
1534 1534
1535 if (session_->data_channel_type() == cricket::DCT_SCTP && HasDataChannels()) { 1535 if (session_->data_channel_type() == cricket::DCT_SCTP && HasDataChannels()) {
1536 session_options->data_channel_type = cricket::DCT_SCTP; 1536 session_options->data_channel_type = cricket::DCT_SCTP;
1537 } 1537 }
1538 session_options->crypto_options = factory_->options().crypto_options;
1538 return true; 1539 return true;
1539 } 1540 }
1540 1541
1541 bool PeerConnection::GetOptionsForAnswer( 1542 bool PeerConnection::GetOptionsForAnswer(
1542 const MediaConstraintsInterface* constraints, 1543 const MediaConstraintsInterface* constraints,
1543 cricket::MediaSessionOptions* session_options) { 1544 cricket::MediaSessionOptions* session_options) {
1544 session_options->recv_audio = false; 1545 session_options->recv_audio = false;
1545 session_options->recv_video = false; 1546 session_options->recv_video = false;
1546 if (!ParseConstraintsForAnswer(constraints, session_options)) { 1547 if (!ParseConstraintsForAnswer(constraints, session_options)) {
1547 return false; 1548 return false;
1548 } 1549 }
1549 1550
1550 AddSendStreams(session_options, senders_, rtp_data_channels_); 1551 AddSendStreams(session_options, senders_, rtp_data_channels_);
1551 session_options->bundle_enabled = 1552 session_options->bundle_enabled =
1552 session_options->bundle_enabled && 1553 session_options->bundle_enabled &&
1553 (session_options->has_audio() || session_options->has_video() || 1554 (session_options->has_audio() || session_options->has_video() ||
1554 session_options->has_data()); 1555 session_options->has_data());
1555 1556
1556 // RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams 1557 // RTP data channel is handled in MediaSessionOptions::AddStream. SCTP streams
1557 // are not signaled in the SDP so does not go through that path and must be 1558 // are not signaled in the SDP so does not go through that path and must be
1558 // handled here. 1559 // handled here.
1559 if (session_->data_channel_type() == cricket::DCT_SCTP) { 1560 if (session_->data_channel_type() == cricket::DCT_SCTP) {
1560 session_options->data_channel_type = cricket::DCT_SCTP; 1561 session_options->data_channel_type = cricket::DCT_SCTP;
1561 } 1562 }
1563 session_options->crypto_options = factory_->options().crypto_options;
1562 return true; 1564 return true;
1563 } 1565 }
1564 1566
1565 void PeerConnection::RemoveTracks(cricket::MediaType media_type) { 1567 void PeerConnection::RemoveTracks(cricket::MediaType media_type) {
1566 UpdateLocalTracks(std::vector<cricket::StreamParams>(), media_type); 1568 UpdateLocalTracks(std::vector<cricket::StreamParams>(), media_type);
1567 UpdateRemoteStreamsList(std::vector<cricket::StreamParams>(), false, 1569 UpdateRemoteStreamsList(std::vector<cricket::StreamParams>(), false,
1568 media_type, nullptr); 1570 media_type, nullptr);
1569 } 1571 }
1570 1572
1571 void PeerConnection::UpdateRemoteStreamsList( 1573 void PeerConnection::UpdateRemoteStreamsList(
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2090 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2089 for (const auto& channel : sctp_data_channels_) { 2091 for (const auto& channel : sctp_data_channels_) {
2090 if (channel->id() == sid) { 2092 if (channel->id() == sid) {
2091 return channel; 2093 return channel;
2092 } 2094 }
2093 } 2095 }
2094 return nullptr; 2096 return nullptr;
2095 } 2097 }
2096 2098
2097 } // namespace webrtc 2099 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/peerconnection_unittest.cc » ('j') | webrtc/base/sslstreamadapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698