| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> | 32 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> |
| 33 RefCountedDtlsIdentityStore; | 33 RefCountedDtlsIdentityStore; |
| 34 | 34 |
| 35 class PeerConnectionFactory : public PeerConnectionFactoryInterface { | 35 class PeerConnectionFactory : public PeerConnectionFactoryInterface { |
| 36 public: | 36 public: |
| 37 virtual void SetOptions(const Options& options) { | 37 virtual void SetOptions(const Options& options) { |
| 38 options_ = options; | 38 options_ = options; |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Deprecated, use version without constraints. |
| 41 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 42 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 42 const PeerConnectionInterface::RTCConfiguration& configuration, | 43 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 43 const MediaConstraintsInterface* constraints, | 44 const MediaConstraintsInterface* constraints, |
| 44 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 45 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 45 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 46 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 46 PeerConnectionObserver* observer) override; | 47 PeerConnectionObserver* observer) override; |
| 47 | 48 |
| 49 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 50 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 51 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 52 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 53 PeerConnectionObserver* observer) override; |
| 54 |
| 48 bool Initialize(); | 55 bool Initialize(); |
| 49 | 56 |
| 50 rtc::scoped_refptr<MediaStreamInterface> | 57 rtc::scoped_refptr<MediaStreamInterface> |
| 51 CreateLocalMediaStream(const std::string& label) override; | 58 CreateLocalMediaStream(const std::string& label) override; |
| 52 | 59 |
| 60 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
| 61 const cricket::AudioOptions& options) override; |
| 62 // Deprecated, use version without constraints. |
| 53 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 63 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
| 54 const MediaConstraintsInterface* constraints) override; | 64 const MediaConstraintsInterface* constraints) override; |
| 55 | 65 |
| 66 virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
| 67 cricket::VideoCapturer* capturer) override; |
| 68 // This version supports filtering on width, height and frame rate. |
| 69 // For the "constraints=null" case, use the version without constraints. |
| 70 // TODO(hta): Design a version without MediaConstraintsInterface. |
| 71 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 |
| 56 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | 72 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
| 57 cricket::VideoCapturer* capturer, | 73 cricket::VideoCapturer* capturer, |
| 58 const MediaConstraintsInterface* constraints) override; | 74 const MediaConstraintsInterface* constraints) override; |
| 59 | 75 |
| 60 rtc::scoped_refptr<VideoTrackInterface> | 76 rtc::scoped_refptr<VideoTrackInterface> |
| 61 CreateVideoTrack(const std::string& id, | 77 CreateVideoTrack(const std::string& id, |
| 62 VideoSourceInterface* video_source) override; | 78 VideoSourceInterface* video_source) override; |
| 63 | 79 |
| 64 rtc::scoped_refptr<AudioTrackInterface> | 80 rtc::scoped_refptr<AudioTrackInterface> |
| 65 CreateAudioTrack(const std::string& id, | 81 CreateAudioTrack(const std::string& id, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 video_decoder_factory_; | 123 video_decoder_factory_; |
| 108 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; | 124 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; |
| 109 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | 125 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
| 110 | 126 |
| 111 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; | 127 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
| 112 }; | 128 }; |
| 113 | 129 |
| 114 } // namespace webrtc | 130 } // namespace webrtc |
| 115 | 131 |
| 116 #endif // WEBRTC_API_PEERCONNECTIONFACTORY_H_ | 132 #endif // WEBRTC_API_PEERCONNECTIONFACTORY_H_ |
| OLD | NEW |