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

Unified Diff: webrtc/api/peerconnection.h

Issue 2587133004: Reland of: Adding error output param to SetConfiguration, using new RTCError type. (Closed)
Patch Set: Comment formatting. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.h
diff --git a/webrtc/api/peerconnection.h b/webrtc/api/peerconnection.h
index 70fd86779f538ad07df0308c65c08cfbacd2ab22..7e4fde5e222752e51a381a7b989c5b206045de77 100644
--- a/webrtc/api/peerconnection.h
+++ b/webrtc/api/peerconnection.h
@@ -54,10 +54,11 @@ bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints,
cricket::MediaSessionOptions* session_options);
// Parses the URLs for each server in |servers| to build |stun_servers| and
-// |turn_servers|.
-bool ParseIceServers(const PeerConnectionInterface::IceServers& servers,
- cricket::ServerAddresses* stun_servers,
- std::vector<cricket::RelayServerConfig>* turn_servers);
+// |turn_servers|. Can return SYNTAX_ERROR if the URL is malformed, or
+// INVALID_PARAMETER if a TURN server is missing |username| or |password|.
+RtcError ParseIceServers(const PeerConnectionInterface::IceServers& servers,
+ cricket::ServerAddresses* stun_servers,
+ std::vector<cricket::RelayServerConfig>* turn_servers);
// PeerConnection implements the PeerConnectionInterface interface.
// It uses WebRtcSession to implement the PeerConnection functionality.
@@ -131,7 +132,8 @@ class PeerConnection : public PeerConnectionInterface,
SessionDescriptionInterface* desc) override;
PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
bool SetConfiguration(
- const PeerConnectionInterface::RTCConfiguration& configuration) override;
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ RtcError* error = nullptr) override;
bool AddIceCandidate(const IceCandidateInterface* candidate) override;
bool RemoveIceCandidates(
const std::vector<cricket::Candidate>& candidates) override;
@@ -367,9 +369,14 @@ class PeerConnection : public PeerConnectionInterface,
// Called when first configuring the port allocator.
bool InitializePortAllocator_n(const RTCConfiguration& configuration);
- // Called when SetConfiguration is called. Only a subset of the configuration
- // is applied.
- bool ReconfigurePortAllocator_n(const RTCConfiguration& configuration);
+ // Called when SetConfiguration is called to apply the supported subset
+ // of the configuration on the network thread.
+ bool ReconfigurePortAllocator_n(
+ const cricket::ServerAddresses& stun_servers,
+ const std::vector<cricket::RelayServerConfig>& turn_servers,
+ IceTransportsType type,
+ int candidate_pool_size,
+ bool prune_turn_ports);
// Starts recording an Rtc EventLog using the supplied platform file.
// This function should only be called from the worker thread.
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698