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

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

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Rebase. Created 3 years, 6 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 | « webrtc/pc/mediasession.cc ('k') | webrtc/pc/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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, 54 bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints,
55 cricket::MediaSessionOptions* session_options); 55 cricket::MediaSessionOptions* session_options);
56 56
57 // PeerConnection implements the PeerConnectionInterface interface. 57 // PeerConnection implements the PeerConnectionInterface interface.
58 // It uses WebRtcSession to implement the PeerConnection functionality. 58 // It uses WebRtcSession to implement the PeerConnection functionality.
59 class PeerConnection : public PeerConnectionInterface, 59 class PeerConnection : public PeerConnectionInterface,
60 public IceObserver, 60 public IceObserver,
61 public rtc::MessageHandler, 61 public rtc::MessageHandler,
62 public sigslot::has_slots<> { 62 public sigslot::has_slots<> {
63 public: 63 public:
64 explicit PeerConnection(PeerConnectionFactory* factory); 64 explicit PeerConnection(PeerConnectionFactory* factory,
65 std::unique_ptr<RtcEventLog> event_log,
66 std::unique_ptr<Call> call);
65 67
66 bool Initialize( 68 bool Initialize(
67 const PeerConnectionInterface::RTCConfiguration& configuration, 69 const PeerConnectionInterface::RTCConfiguration& configuration,
68 std::unique_ptr<cricket::PortAllocator> allocator, 70 std::unique_ptr<cricket::PortAllocator> allocator,
69 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, 71 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
70 PeerConnectionObserver* observer); 72 PeerConnectionObserver* observer);
71 73
72 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; 74 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override;
73 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; 75 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override;
74 bool AddStream(MediaStreamInterface* local_stream) override; 76 bool AddStream(MediaStreamInterface* local_stream) override;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 int candidate_pool_size, 387 int candidate_pool_size,
386 bool prune_turn_ports); 388 bool prune_turn_ports);
387 389
388 // Starts recording an Rtc EventLog using the supplied platform file. 390 // Starts recording an Rtc EventLog using the supplied platform file.
389 // This function should only be called from the worker thread. 391 // This function should only be called from the worker thread.
390 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); 392 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes);
391 // Starts recording an Rtc EventLog using the supplied platform file. 393 // Starts recording an Rtc EventLog using the supplied platform file.
392 // This function should only be called from the worker thread. 394 // This function should only be called from the worker thread.
393 void StopRtcEventLog_w(); 395 void StopRtcEventLog_w();
394 396
395 // Creates the |*call_| object. Must only be called from the worker thread.
396 void CreateCall_w();
397
398 // Storing the factory as a scoped reference pointer ensures that the memory 397 // Storing the factory as a scoped reference pointer ensures that the memory
399 // in the PeerConnectionFactoryImpl remains available as long as the 398 // in the PeerConnectionFactoryImpl remains available as long as the
400 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. 399 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
401 // However, since the reference counting is done in the 400 // However, since the reference counting is done in the
402 // PeerConnectionFactoryInterface all instances created using the raw pointer 401 // PeerConnectionFactoryInterface all instances created using the raw pointer
403 // will refer to the same reference count. 402 // will refer to the same reference count.
404 rtc::scoped_refptr<PeerConnectionFactory> factory_; 403 rtc::scoped_refptr<PeerConnectionFactory> factory_;
405 PeerConnectionObserver* observer_; 404 PeerConnectionObserver* observer_;
406 UMAObserver* uma_observer_; 405 UMAObserver* uma_observer_;
407 406
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> 447 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>>
449 senders_; 448 senders_;
450 std::vector< 449 std::vector<
451 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> 450 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
452 receivers_; 451 receivers_;
453 }; 452 };
454 453
455 } // namespace webrtc 454 } // namespace webrtc
456 455
457 #endif // WEBRTC_PC_PEERCONNECTION_H_ 456 #endif // WEBRTC_PC_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698