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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 int network_ignore_mask; | 551 int network_ignore_mask; |
552 | 552 |
553 // Sets the maximum supported protocol version. The highest version | 553 // Sets the maximum supported protocol version. The highest version |
554 // supported by both ends will be used for the connection, i.e. if one | 554 // supported by both ends will be used for the connection, i.e. if one |
555 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 555 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
556 rtc::SSLProtocolVersion ssl_max_version; | 556 rtc::SSLProtocolVersion ssl_max_version; |
557 }; | 557 }; |
558 | 558 |
559 virtual void SetOptions(const Options& options) = 0; | 559 virtual void SetOptions(const Options& options) = 0; |
560 | 560 |
561 virtual rtc::scoped_refptr<PeerConnectionInterface> | 561 // TODO(deadbeef): Remove this overload of CreatePeerConnection once clients |
562 CreatePeerConnection( | 562 // are moved to the new version. |
563 const PeerConnectionInterface::RTCConfiguration& configuration, | 563 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
564 const MediaConstraintsInterface* constraints, | 564 const PeerConnectionInterface::RTCConfiguration& configuration, |
565 PortAllocatorFactoryInterface* allocator_factory, | 565 const MediaConstraintsInterface* constraints, |
566 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 566 PortAllocatorFactoryInterface* allocator_factory, |
567 PeerConnectionObserver* observer) = 0; | 567 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 568 PeerConnectionObserver* observer) { |
| 569 return nullptr; |
| 570 } |
| 571 |
| 572 // TODO(deadbeef): Make this pure virtual once it's implemented by all |
| 573 // subclasses. |
| 574 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 575 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 576 const MediaConstraintsInterface* constraints, |
| 577 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 578 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 579 PeerConnectionObserver* observer) { |
| 580 return nullptr; |
| 581 } |
568 | 582 |
569 // TODO(hbos): Remove below version after clients are updated to above method. | 583 // TODO(hbos): Remove below version after clients are updated to above method. |
570 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, | 584 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, |
571 // and not IceServers. RTCConfiguration is made up of ice servers and | 585 // and not IceServers. RTCConfiguration is made up of ice servers and |
572 // ice transport type. | 586 // ice transport type. |
573 // http://dev.w3.org/2011/webrtc/editor/webrtc.html | 587 // http://dev.w3.org/2011/webrtc/editor/webrtc.html |
574 inline rtc::scoped_refptr<PeerConnectionInterface> | 588 inline rtc::scoped_refptr<PeerConnectionInterface> |
575 CreatePeerConnection( | 589 CreatePeerConnection( |
576 const PeerConnectionInterface::IceServers& servers, | 590 const PeerConnectionInterface::IceServers& servers, |
577 const MediaConstraintsInterface* constraints, | 591 const MediaConstraintsInterface* constraints, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 CreatePeerConnectionFactory( | 668 CreatePeerConnectionFactory( |
655 rtc::Thread* worker_thread, | 669 rtc::Thread* worker_thread, |
656 rtc::Thread* signaling_thread, | 670 rtc::Thread* signaling_thread, |
657 AudioDeviceModule* default_adm, | 671 AudioDeviceModule* default_adm, |
658 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 672 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
659 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 673 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
660 | 674 |
661 } // namespace webrtc | 675 } // namespace webrtc |
662 | 676 |
663 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ | 677 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |