Promotoing webrtc::CryptoOptions to RTCConfiguration.
With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.
To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.
Got LGTM offline from Sami, adding him to TBR if he has any further comments.
TBR=sakal@webrtc.org
Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
diff --git a/pc/peerconnection.h b/pc/peerconnection.h
index 604a5d3..e725798 100644
--- a/pc/peerconnection.h
+++ b/pc/peerconnection.h
@@ -922,6 +922,11 @@
// Returns the observer. Will crash on CHECK if the observer is removed.
PeerConnectionObserver* Observer() const;
+ // Returns the CryptoOptions for this PeerConnection. This will always
+ // return the RTCConfiguration.crypto_options if set and will only default
+ // back to the PeerConnectionFactory settings if nothing was set.
+ CryptoOptions GetCryptoOptions();
+
// Returns rtp transport, result can not be nullptr.
RtpTransportInternal* GetRtpTransport(const std::string& mid) {
auto rtp_transport = transport_controller_->GetRtpTransport(mid);