| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "talk/app/webrtc/mediastreaminterface.h" | 79 #include "talk/app/webrtc/mediastreaminterface.h" |
| 80 #include "talk/app/webrtc/rtpreceiverinterface.h" | 80 #include "talk/app/webrtc/rtpreceiverinterface.h" |
| 81 #include "talk/app/webrtc/rtpsenderinterface.h" | 81 #include "talk/app/webrtc/rtpsenderinterface.h" |
| 82 #include "talk/app/webrtc/statstypes.h" | 82 #include "talk/app/webrtc/statstypes.h" |
| 83 #include "talk/app/webrtc/umametrics.h" | 83 #include "talk/app/webrtc/umametrics.h" |
| 84 #include "webrtc/base/fileutils.h" | 84 #include "webrtc/base/fileutils.h" |
| 85 #include "webrtc/base/network.h" | 85 #include "webrtc/base/network.h" |
| 86 #include "webrtc/base/rtccertificate.h" | 86 #include "webrtc/base/rtccertificate.h" |
| 87 #include "webrtc/base/sslstreamadapter.h" | 87 #include "webrtc/base/sslstreamadapter.h" |
| 88 #include "webrtc/base/socketaddress.h" | 88 #include "webrtc/base/socketaddress.h" |
| 89 #include "webrtc/p2p/base/portallocator.h" |
| 89 | 90 |
| 90 namespace rtc { | 91 namespace rtc { |
| 91 class SSLIdentity; | 92 class SSLIdentity; |
| 92 class Thread; | 93 class Thread; |
| 93 } | 94 } |
| 94 | 95 |
| 95 namespace cricket { | 96 namespace cricket { |
| 96 class PortAllocator; | |
| 97 class WebRtcVideoDecoderFactory; | 97 class WebRtcVideoDecoderFactory; |
| 98 class WebRtcVideoEncoderFactory; | 98 class WebRtcVideoEncoderFactory; |
| 99 } | 99 } |
| 100 | 100 |
| 101 namespace webrtc { | 101 namespace webrtc { |
| 102 class AudioDeviceModule; | 102 class AudioDeviceModule; |
| 103 class MediaConstraintsInterface; | 103 class MediaConstraintsInterface; |
| 104 | 104 |
| 105 // MediaStream container interface. | 105 // MediaStream container interface. |
| 106 class StreamCollectionInterface : public rtc::RefCountInterface { | 106 class StreamCollectionInterface : public rtc::RefCountInterface { |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 int network_ignore_mask; | 558 int network_ignore_mask; |
| 559 | 559 |
| 560 // Sets the maximum supported protocol version. The highest version | 560 // Sets the maximum supported protocol version. The highest version |
| 561 // supported by both ends will be used for the connection, i.e. if one | 561 // supported by both ends will be used for the connection, i.e. if one |
| 562 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 562 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
| 563 rtc::SSLProtocolVersion ssl_max_version; | 563 rtc::SSLProtocolVersion ssl_max_version; |
| 564 }; | 564 }; |
| 565 | 565 |
| 566 virtual void SetOptions(const Options& options) = 0; | 566 virtual void SetOptions(const Options& options) = 0; |
| 567 | 567 |
| 568 virtual rtc::scoped_refptr<PeerConnectionInterface> | 568 // TODO(deadbeef): Remove this overload of CreatePeerConnection once clients |
| 569 CreatePeerConnection( | 569 // are moved to the new version. |
| 570 const PeerConnectionInterface::RTCConfiguration& configuration, | 570 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 571 const MediaConstraintsInterface* constraints, | 571 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 572 PortAllocatorFactoryInterface* allocator_factory, | 572 const MediaConstraintsInterface* constraints, |
| 573 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 573 PortAllocatorFactoryInterface* allocator_factory, |
| 574 PeerConnectionObserver* observer) = 0; | 574 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 575 PeerConnectionObserver* observer) { |
| 576 return nullptr; |
| 577 } |
| 578 |
| 579 // TODO(deadbeef): Make this pure virtual once it's implemented by all |
| 580 // subclasses. |
| 581 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 582 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 583 const MediaConstraintsInterface* constraints, |
| 584 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 585 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 586 PeerConnectionObserver* observer) { |
| 587 return nullptr; |
| 588 } |
| 575 | 589 |
| 576 // TODO(hbos): Remove below version after clients are updated to above method. | 590 // TODO(hbos): Remove below version after clients are updated to above method. |
| 577 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, | 591 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, |
| 578 // and not IceServers. RTCConfiguration is made up of ice servers and | 592 // and not IceServers. RTCConfiguration is made up of ice servers and |
| 579 // ice transport type. | 593 // ice transport type. |
| 580 // http://dev.w3.org/2011/webrtc/editor/webrtc.html | 594 // http://dev.w3.org/2011/webrtc/editor/webrtc.html |
| 581 inline rtc::scoped_refptr<PeerConnectionInterface> | 595 inline rtc::scoped_refptr<PeerConnectionInterface> |
| 582 CreatePeerConnection( | 596 CreatePeerConnection( |
| 583 const PeerConnectionInterface::IceServers& servers, | 597 const PeerConnectionInterface::IceServers& servers, |
| 584 const MediaConstraintsInterface* constraints, | 598 const MediaConstraintsInterface* constraints, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 CreatePeerConnectionFactory( | 675 CreatePeerConnectionFactory( |
| 662 rtc::Thread* worker_thread, | 676 rtc::Thread* worker_thread, |
| 663 rtc::Thread* signaling_thread, | 677 rtc::Thread* signaling_thread, |
| 664 AudioDeviceModule* default_adm, | 678 AudioDeviceModule* default_adm, |
| 665 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 679 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 666 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 680 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
| 667 | 681 |
| 668 } // namespace webrtc | 682 } // namespace webrtc |
| 669 | 683 |
| 670 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ | 684 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |