| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 int64_t max_size_bytes) { | 746 int64_t max_size_bytes) { |
| 747 return false; | 747 return false; |
| 748 } | 748 } |
| 749 | 749 |
| 750 // Stops logging the RtcEventLog. | 750 // Stops logging the RtcEventLog. |
| 751 // TODO(ivoc): Make this pure virtual when Chrome is updated. | 751 // TODO(ivoc): Make this pure virtual when Chrome is updated. |
| 752 virtual void StopRtcEventLog() {} | 752 virtual void StopRtcEventLog() {} |
| 753 | 753 |
| 754 // Terminates all media, closes the transports, and in general releases any | 754 // Terminates all media, closes the transports, and in general releases any |
| 755 // resources used by the PeerConnection. This is an irreversible operation. | 755 // resources used by the PeerConnection. This is an irreversible operation. |
| 756 // |
| 757 // Note that after this method completes, the PeerConnection will no longer |
| 758 // use the PeerConnectionObserver interface passed in on construction, and |
| 759 // thus the observer object can be safely destroyed. |
| 756 virtual void Close() = 0; | 760 virtual void Close() = 0; |
| 757 | 761 |
| 758 protected: | 762 protected: |
| 759 // Dtor protected as objects shouldn't be deleted via this interface. | 763 // Dtor protected as objects shouldn't be deleted via this interface. |
| 760 ~PeerConnectionInterface() {} | 764 ~PeerConnectionInterface() {} |
| 761 }; | 765 }; |
| 762 | 766 |
| 763 // PeerConnection callback interface, used for RTCPeerConnection events. | 767 // PeerConnection callback interface, used for RTCPeerConnection events. |
| 764 // Application should implement these methods. | 768 // Application should implement these methods. |
| 765 class PeerConnectionObserver { | 769 class PeerConnectionObserver { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 // supported by both ends will be used for the connection, i.e. if one | 877 // supported by both ends will be used for the connection, i.e. if one |
| 874 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 878 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
| 875 rtc::SSLProtocolVersion ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; | 879 rtc::SSLProtocolVersion ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; |
| 876 | 880 |
| 877 // Sets crypto related options, e.g. enabled cipher suites. | 881 // Sets crypto related options, e.g. enabled cipher suites. |
| 878 rtc::CryptoOptions crypto_options; | 882 rtc::CryptoOptions crypto_options; |
| 879 }; | 883 }; |
| 880 | 884 |
| 881 virtual void SetOptions(const Options& options) = 0; | 885 virtual void SetOptions(const Options& options) = 0; |
| 882 | 886 |
| 887 // |allocator| and |cert_generator| may be null, in which case default |
| 888 // implementations will be used. |
| 889 // |
| 890 // |observer| must not be null. |
| 891 // |
| 892 // Note that this method does not take ownership of |observer|; it's the |
| 893 // responsibility of the caller to delete it. It can be safely deleted after |
| 894 // Close has been called on the returned PeerConnection, which ensures no |
| 895 // more observer callbacks will be invoked. |
| 883 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 896 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 884 const PeerConnectionInterface::RTCConfiguration& configuration, | 897 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 885 std::unique_ptr<cricket::PortAllocator> allocator, | 898 std::unique_ptr<cricket::PortAllocator> allocator, |
| 886 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, | 899 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
| 887 PeerConnectionObserver* observer) = 0; | 900 PeerConnectionObserver* observer) = 0; |
| 888 | 901 |
| 889 // Deprecated; should use RTCConfiguration for everything that previously | 902 // Deprecated; should use RTCConfiguration for everything that previously |
| 890 // used constraints. | 903 // used constraints. |
| 891 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 904 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 892 const PeerConnectionInterface::RTCConfiguration& configuration, | 905 const PeerConnectionInterface::RTCConfiguration& configuration, |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 1106 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 1094 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 1107 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
| 1095 return CreatePeerConnectionFactory( | 1108 return CreatePeerConnectionFactory( |
| 1096 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 1109 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
| 1097 default_adm, encoder_factory, decoder_factory); | 1110 default_adm, encoder_factory, decoder_factory); |
| 1098 } | 1111 } |
| 1099 | 1112 |
| 1100 } // namespace webrtc | 1113 } // namespace webrtc |
| 1101 | 1114 |
| 1102 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 1115 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |