OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "webrtc/api/dtmfsenderinterface.h" | 61 #include "webrtc/api/dtmfsenderinterface.h" |
62 #include "webrtc/api/jsep.h" | 62 #include "webrtc/api/jsep.h" |
63 #include "webrtc/api/mediastreaminterface.h" | 63 #include "webrtc/api/mediastreaminterface.h" |
64 #include "webrtc/api/rtpreceiverinterface.h" | 64 #include "webrtc/api/rtpreceiverinterface.h" |
65 #include "webrtc/api/rtpsenderinterface.h" | 65 #include "webrtc/api/rtpsenderinterface.h" |
66 #include "webrtc/api/statstypes.h" | 66 #include "webrtc/api/statstypes.h" |
67 #include "webrtc/api/umametrics.h" | 67 #include "webrtc/api/umametrics.h" |
68 #include "webrtc/base/fileutils.h" | 68 #include "webrtc/base/fileutils.h" |
69 #include "webrtc/base/network.h" | 69 #include "webrtc/base/network.h" |
70 #include "webrtc/base/rtccertificate.h" | 70 #include "webrtc/base/rtccertificate.h" |
| 71 #include "webrtc/base/rtccertificategenerator.h" |
71 #include "webrtc/base/socketaddress.h" | 72 #include "webrtc/base/socketaddress.h" |
72 #include "webrtc/base/sslstreamadapter.h" | 73 #include "webrtc/base/sslstreamadapter.h" |
73 #include "webrtc/media/base/mediachannel.h" | 74 #include "webrtc/media/base/mediachannel.h" |
74 #include "webrtc/p2p/base/portallocator.h" | 75 #include "webrtc/p2p/base/portallocator.h" |
75 | 76 |
76 namespace rtc { | 77 namespace rtc { |
77 class SSLIdentity; | 78 class SSLIdentity; |
78 class Thread; | 79 class Thread; |
79 } | 80 } |
80 | 81 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 574 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
574 rtc::SSLProtocolVersion ssl_max_version; | 575 rtc::SSLProtocolVersion ssl_max_version; |
575 }; | 576 }; |
576 | 577 |
577 virtual void SetOptions(const Options& options) = 0; | 578 virtual void SetOptions(const Options& options) = 0; |
578 | 579 |
579 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 580 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
580 const PeerConnectionInterface::RTCConfiguration& configuration, | 581 const PeerConnectionInterface::RTCConfiguration& configuration, |
581 const MediaConstraintsInterface* constraints, | 582 const MediaConstraintsInterface* constraints, |
582 std::unique_ptr<cricket::PortAllocator> allocator, | 583 std::unique_ptr<cricket::PortAllocator> allocator, |
| 584 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
| 585 PeerConnectionObserver* observer) = 0; |
| 586 // TODO(hbos): To be removed in favor of the |cert_generator| version as soon |
| 587 // as Chromium stops using this version. See bugs.webrtc.org/5707, |
| 588 // bugs.webrtc.org/5708. |
| 589 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 590 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 591 const MediaConstraintsInterface* constraints, |
| 592 std::unique_ptr<cricket::PortAllocator> allocator, |
583 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 593 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
584 PeerConnectionObserver* observer) = 0; | 594 PeerConnectionObserver* observer) { |
| 595 return CreatePeerConnection( |
| 596 configuration, |
| 597 constraints, |
| 598 std::move(allocator), |
| 599 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>( |
| 600 dtls_identity_store ? new RTCCertificateGeneratorStoreWrapper( |
| 601 std::move(dtls_identity_store)) : nullptr), |
| 602 observer); |
| 603 } |
585 | 604 |
586 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 605 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
587 const PeerConnectionInterface::RTCConfiguration& configuration, | 606 const PeerConnectionInterface::RTCConfiguration& configuration, |
588 std::unique_ptr<cricket::PortAllocator> allocator, | 607 std::unique_ptr<cricket::PortAllocator> allocator, |
| 608 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
| 609 PeerConnectionObserver* observer) = 0; |
| 610 // TODO(hbos): To be removed in favor of the |cert_generator| version as soon |
| 611 // as Chromium stops using this version. See bugs.webrtc.org/5707, |
| 612 // bugs.webrtc.org/5708. |
| 613 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 614 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 615 std::unique_ptr<cricket::PortAllocator> allocator, |
589 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 616 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
590 PeerConnectionObserver* observer) = 0; | 617 PeerConnectionObserver* observer) { |
| 618 return CreatePeerConnection( |
| 619 configuration, |
| 620 std::move(allocator), |
| 621 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>( |
| 622 dtls_identity_store ? new RTCCertificateGeneratorStoreWrapper( |
| 623 std::move(dtls_identity_store)) : nullptr), |
| 624 observer); |
| 625 } |
591 | 626 |
592 virtual rtc::scoped_refptr<MediaStreamInterface> | 627 virtual rtc::scoped_refptr<MediaStreamInterface> |
593 CreateLocalMediaStream(const std::string& label) = 0; | 628 CreateLocalMediaStream(const std::string& label) = 0; |
594 | 629 |
595 // Creates a AudioSourceInterface. | 630 // Creates a AudioSourceInterface. |
596 // |constraints| decides audio processing settings but can be NULL. | 631 // |constraints| decides audio processing settings but can be NULL. |
597 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 632 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
598 const cricket::AudioOptions& options) = 0; | 633 const cricket::AudioOptions& options) = 0; |
599 // Deprecated - use version above. | 634 // Deprecated - use version above. |
600 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 635 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 736 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
702 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 737 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
703 return CreatePeerConnectionFactory( | 738 return CreatePeerConnectionFactory( |
704 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 739 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
705 default_adm, encoder_factory, decoder_factory); | 740 default_adm, encoder_factory, decoder_factory); |
706 } | 741 } |
707 | 742 |
708 } // namespace webrtc | 743 } // namespace webrtc |
709 | 744 |
710 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 745 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |