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

Side by Side Diff: webrtc/api/peerconnection.h

Issue 2600813002: Revert of Adding error output param to SetConfiguration, using new RTCError type. (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // recv_audio=true, recv_video=true, bundle_enabled=true. 47 // recv_audio=true, recv_video=true, bundle_enabled=true.
48 // Other fields will be left with existing values. 48 // Other fields will be left with existing values.
49 // 49 //
50 // Deprecated. Will be removed once callers that use constraints are gone. 50 // Deprecated. Will be removed once callers that use constraints are gone.
51 // TODO(hta): Remove when callers are gone. 51 // TODO(hta): Remove when callers are gone.
52 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 52 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617
53 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, 53 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints,
54 cricket::MediaSessionOptions* session_options); 54 cricket::MediaSessionOptions* session_options);
55 55
56 // Parses the URLs for each server in |servers| to build |stun_servers| and 56 // Parses the URLs for each server in |servers| to build |stun_servers| and
57 // |turn_servers|. Can return SYNTAX_ERROR if the URL is malformed, or 57 // |turn_servers|.
58 // INVALID_PARAMETER if a TURN server is missing |username| or |password|. 58 bool ParseIceServers(const PeerConnectionInterface::IceServers& servers,
59 RTCErrorType ParseIceServers( 59 cricket::ServerAddresses* stun_servers,
60 const PeerConnectionInterface::IceServers& servers, 60 std::vector<cricket::RelayServerConfig>* turn_servers);
61 cricket::ServerAddresses* stun_servers,
62 std::vector<cricket::RelayServerConfig>* turn_servers);
63 61
64 // PeerConnection implements the PeerConnectionInterface interface. 62 // PeerConnection implements the PeerConnectionInterface interface.
65 // It uses WebRtcSession to implement the PeerConnection functionality. 63 // It uses WebRtcSession to implement the PeerConnection functionality.
66 class PeerConnection : public PeerConnectionInterface, 64 class PeerConnection : public PeerConnectionInterface,
67 public IceObserver, 65 public IceObserver,
68 public rtc::MessageHandler, 66 public rtc::MessageHandler,
69 public sigslot::has_slots<> { 67 public sigslot::has_slots<> {
70 public: 68 public:
71 explicit PeerConnection(PeerConnectionFactory* factory); 69 explicit PeerConnection(PeerConnectionFactory* factory);
72 70
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void CreateAnswer(CreateSessionDescriptionObserver* observer, 124 void CreateAnswer(CreateSessionDescriptionObserver* observer,
127 const MediaConstraintsInterface* constraints) override; 125 const MediaConstraintsInterface* constraints) override;
128 void CreateAnswer(CreateSessionDescriptionObserver* observer, 126 void CreateAnswer(CreateSessionDescriptionObserver* observer,
129 const RTCOfferAnswerOptions& options) override; 127 const RTCOfferAnswerOptions& options) override;
130 void SetLocalDescription(SetSessionDescriptionObserver* observer, 128 void SetLocalDescription(SetSessionDescriptionObserver* observer,
131 SessionDescriptionInterface* desc) override; 129 SessionDescriptionInterface* desc) override;
132 void SetRemoteDescription(SetSessionDescriptionObserver* observer, 130 void SetRemoteDescription(SetSessionDescriptionObserver* observer,
133 SessionDescriptionInterface* desc) override; 131 SessionDescriptionInterface* desc) override;
134 PeerConnectionInterface::RTCConfiguration GetConfiguration() override; 132 PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
135 bool SetConfiguration( 133 bool SetConfiguration(
136 const PeerConnectionInterface::RTCConfiguration& configuration, 134 const PeerConnectionInterface::RTCConfiguration& configuration) override;
137 RTCError* error = nullptr) override;
138 bool AddIceCandidate(const IceCandidateInterface* candidate) override; 135 bool AddIceCandidate(const IceCandidateInterface* candidate) override;
139 bool RemoveIceCandidates( 136 bool RemoveIceCandidates(
140 const std::vector<cricket::Candidate>& candidates) override; 137 const std::vector<cricket::Candidate>& candidates) override;
141 138
142 void RegisterUMAObserver(UMAObserver* observer) override; 139 void RegisterUMAObserver(UMAObserver* observer) override;
143 140
144 bool StartRtcEventLog(rtc::PlatformFile file, 141 bool StartRtcEventLog(rtc::PlatformFile file,
145 int64_t max_size_bytes) override; 142 int64_t max_size_bytes) override;
146 void StopRtcEventLog() override; 143 void StopRtcEventLog() override;
147 144
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 360 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
364 const std::string& stream_label, 361 const std::string& stream_label,
365 const std::string track_id) const; 362 const std::string track_id) const;
366 363
367 // Returns the specified SCTP DataChannel in sctp_data_channels_, 364 // Returns the specified SCTP DataChannel in sctp_data_channels_,
368 // or nullptr if not found. 365 // or nullptr if not found.
369 DataChannel* FindDataChannelBySid(int sid) const; 366 DataChannel* FindDataChannelBySid(int sid) const;
370 367
371 // Called when first configuring the port allocator. 368 // Called when first configuring the port allocator.
372 bool InitializePortAllocator_n(const RTCConfiguration& configuration); 369 bool InitializePortAllocator_n(const RTCConfiguration& configuration);
373 // Called when SetConfiguration is called to apply the supported subset 370 // Called when SetConfiguration is called. Only a subset of the configuration
374 // of the configuration on the network thread. 371 // is applied.
375 bool ReconfigurePortAllocator_n( 372 bool ReconfigurePortAllocator_n(const RTCConfiguration& configuration);
376 const cricket::ServerAddresses& stun_servers,
377 const std::vector<cricket::RelayServerConfig>& turn_servers,
378 IceTransportsType type,
379 int candidate_pool_size,
380 bool prune_turn_ports);
381 373
382 // Starts recording an Rtc EventLog using the supplied platform file. 374 // Starts recording an Rtc EventLog using the supplied platform file.
383 // This function should only be called from the worker thread. 375 // This function should only be called from the worker thread.
384 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); 376 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes);
385 // Starts recording an Rtc EventLog using the supplied platform file. 377 // Starts recording an Rtc EventLog using the supplied platform file.
386 // This function should only be called from the worker thread. 378 // This function should only be called from the worker thread.
387 void StopRtcEventLog_w(); 379 void StopRtcEventLog_w();
388 380
389 // Storing the factory as a scoped reference pointer ensures that the memory 381 // Storing the factory as a scoped reference pointer ensures that the memory
390 // in the PeerConnectionFactoryImpl remains available as long as the 382 // in the PeerConnectionFactoryImpl remains available as long as the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> 428 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
437 receivers_; 429 receivers_;
438 std::unique_ptr<WebRtcSession> session_; 430 std::unique_ptr<WebRtcSession> session_;
439 std::unique_ptr<StatsCollector> stats_; 431 std::unique_ptr<StatsCollector> stats_;
440 rtc::scoped_refptr<RTCStatsCollector> stats_collector_; 432 rtc::scoped_refptr<RTCStatsCollector> stats_collector_;
441 }; 433 };
442 434
443 } // namespace webrtc 435 } // namespace webrtc
444 436
445 #endif // WEBRTC_API_PEERCONNECTION_H_ 437 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698