OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 | 51 |
52 // webrtc::PeerConnectionFactoryInterface override; | 52 // webrtc::PeerConnectionFactoryInterface override; |
53 rtc::scoped_refptr<PeerConnectionInterface> | 53 rtc::scoped_refptr<PeerConnectionInterface> |
54 CreatePeerConnection( | 54 CreatePeerConnection( |
55 const PeerConnectionInterface::RTCConfiguration& configuration, | 55 const PeerConnectionInterface::RTCConfiguration& configuration, |
56 const MediaConstraintsInterface* constraints, | 56 const MediaConstraintsInterface* constraints, |
57 PortAllocatorFactoryInterface* allocator_factory, | 57 PortAllocatorFactoryInterface* allocator_factory, |
58 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 58 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
59 PeerConnectionObserver* observer) override; | 59 PeerConnectionObserver* observer) override; |
60 | 60 |
61 virtual rtc::scoped_refptr<PeerConnectionInterface> | |
62 CreatePeerConnection( | |
63 const PeerConnectionInterface::RTCConfiguration& configuration, | |
64 const MediaConstraintsInterface* constraints, | |
65 PortAllocatorFactoryInterface* allocator_factory, | |
66 const rtc::scoped_refptr<DtlsCertificate>& certificate, | |
tommi (sloooow) - chröme
2015/08/18 14:49:35
should the certificate be passed in here? I was ex
| |
67 PeerConnectionObserver* observer) override; | |
68 | |
61 bool Initialize(); | 69 bool Initialize(); |
62 | 70 |
63 rtc::scoped_refptr<MediaStreamInterface> | 71 rtc::scoped_refptr<MediaStreamInterface> |
64 CreateLocalMediaStream(const std::string& label) override; | 72 CreateLocalMediaStream(const std::string& label) override; |
65 | 73 |
66 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 74 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
67 const MediaConstraintsInterface* constraints) override; | 75 const MediaConstraintsInterface* constraints) override; |
68 | 76 |
69 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | 77 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
70 cricket::VideoCapturer* capturer, | 78 cricket::VideoCapturer* capturer, |
(...skipping 18 matching lines...) Expand all Loading... | |
89 PeerConnectionFactory(); | 97 PeerConnectionFactory(); |
90 PeerConnectionFactory( | 98 PeerConnectionFactory( |
91 rtc::Thread* worker_thread, | 99 rtc::Thread* worker_thread, |
92 rtc::Thread* signaling_thread, | 100 rtc::Thread* signaling_thread, |
93 AudioDeviceModule* default_adm, | 101 AudioDeviceModule* default_adm, |
94 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 102 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
95 cricket::WebRtcVideoDecoderFactory* video_decoder_factory); | 103 cricket::WebRtcVideoDecoderFactory* video_decoder_factory); |
96 virtual ~PeerConnectionFactory(); | 104 virtual ~PeerConnectionFactory(); |
97 | 105 |
98 private: | 106 private: |
107 // CreatePeerConnection helper function. | |
108 PortAllocatorFactoryInterface* CreatePeerConnectionChooseAllocatorFactory( | |
109 PortAllocatorFactoryInterface* allocator_factory); | |
99 cricket::MediaEngineInterface* CreateMediaEngine_w(); | 110 cricket::MediaEngineInterface* CreateMediaEngine_w(); |
100 | 111 |
101 bool owns_ptrs_; | 112 bool owns_ptrs_; |
102 bool wraps_current_thread_; | 113 bool wraps_current_thread_; |
103 rtc::Thread* signaling_thread_; | 114 rtc::Thread* signaling_thread_; |
104 rtc::Thread* worker_thread_; | 115 rtc::Thread* worker_thread_; |
105 Options options_; | 116 Options options_; |
106 rtc::scoped_refptr<PortAllocatorFactoryInterface> default_allocator_factory_; | 117 rtc::scoped_refptr<PortAllocatorFactoryInterface> default_allocator_factory_; |
107 // External Audio device used for audio playback. | 118 // External Audio device used for audio playback. |
108 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 119 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
109 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 120 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; |
110 // External Video encoder factory. This can be NULL if the client has not | 121 // External Video encoder factory. This can be NULL if the client has not |
111 // injected any. In that case, video engine will use the internal SW encoder. | 122 // injected any. In that case, video engine will use the internal SW encoder. |
112 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> | 123 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> |
113 video_encoder_factory_; | 124 video_encoder_factory_; |
114 // External Video decoder factory. This can be NULL if the client has not | 125 // External Video decoder factory. This can be NULL if the client has not |
115 // injected any. In that case, video engine will use the internal SW decoder. | 126 // injected any. In that case, video engine will use the internal SW decoder. |
116 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> | 127 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> |
117 video_decoder_factory_; | 128 video_decoder_factory_; |
118 | 129 |
119 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; | 130 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
120 }; | 131 }; |
121 | 132 |
122 } // namespace webrtc | 133 } // namespace webrtc |
123 | 134 |
124 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 135 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |