Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: talk/app/webrtc/peerconnectionfactory.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 namespace webrtc { 39 namespace webrtc {
40 40
41 class DtlsIdentityStore; 41 class DtlsIdentityStore;
42 42
43 class PeerConnectionFactory : public PeerConnectionFactoryInterface { 43 class PeerConnectionFactory : public PeerConnectionFactoryInterface {
44 public: 44 public:
45 virtual void SetOptions(const Options& options) { 45 virtual void SetOptions(const Options& options) {
46 options_ = options; 46 options_ = options;
47 } 47 }
48 48
49 // This method takes the ownership of |dtls_identity_service|.
50 virtual rtc::scoped_refptr<PeerConnectionInterface>
51 CreatePeerConnection(
52 const PeerConnectionInterface::RTCConfiguration& configuration,
53 const MediaConstraintsInterface* constraints,
54 PortAllocatorFactoryInterface* allocator_factory,
55 DTLSIdentityServiceInterface* dtls_identity_service,
56 PeerConnectionObserver* observer) override;
57
49 virtual rtc::scoped_refptr<PeerConnectionInterface> 58 virtual rtc::scoped_refptr<PeerConnectionInterface>
50 CreatePeerConnection( 59 CreatePeerConnection(
51 const PeerConnectionInterface::RTCConfiguration& configuration, 60 const PeerConnectionInterface::RTCConfiguration& configuration,
52 const MediaConstraintsInterface* constraints, 61 const MediaConstraintsInterface* constraints,
53 PortAllocatorFactoryInterface* allocator_factory, 62 PortAllocatorFactoryInterface* allocator_factory,
54 DTLSIdentityServiceInterface* dtls_identity_service, 63 rtc::scoped_refptr<DtlsCertificate> certificate,
55 PeerConnectionObserver* observer); 64 PeerConnectionObserver* observer) override;
56 65
57 bool Initialize(); 66 bool Initialize();
58 67
59 rtc::scoped_refptr<MediaStreamInterface> 68 rtc::scoped_refptr<MediaStreamInterface>
60 CreateLocalMediaStream(const std::string& label) override; 69 CreateLocalMediaStream(const std::string& label) override;
61 70
62 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( 71 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
63 const MediaConstraintsInterface* constraints) override; 72 const MediaConstraintsInterface* constraints) override;
64 73
65 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( 74 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
(...skipping 19 matching lines...) Expand all
85 PeerConnectionFactory(); 94 PeerConnectionFactory();
86 PeerConnectionFactory( 95 PeerConnectionFactory(
87 rtc::Thread* worker_thread, 96 rtc::Thread* worker_thread,
88 rtc::Thread* signaling_thread, 97 rtc::Thread* signaling_thread,
89 AudioDeviceModule* default_adm, 98 AudioDeviceModule* default_adm,
90 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, 99 cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
91 cricket::WebRtcVideoDecoderFactory* video_decoder_factory); 100 cricket::WebRtcVideoDecoderFactory* video_decoder_factory);
92 virtual ~PeerConnectionFactory(); 101 virtual ~PeerConnectionFactory();
93 102
94 private: 103 private:
104 PortAllocatorFactoryInterface* CreatePeerConnectionCommon(
105 PortAllocatorFactoryInterface* allocator_factory);
95 cricket::MediaEngineInterface* CreateMediaEngine_w(); 106 cricket::MediaEngineInterface* CreateMediaEngine_w();
96 107
97 bool owns_ptrs_; 108 bool owns_ptrs_;
98 bool wraps_current_thread_; 109 bool wraps_current_thread_;
99 rtc::Thread* signaling_thread_; 110 rtc::Thread* signaling_thread_;
100 rtc::Thread* worker_thread_; 111 rtc::Thread* worker_thread_;
101 Options options_; 112 Options options_;
102 rtc::scoped_refptr<PortAllocatorFactoryInterface> default_allocator_factory_; 113 rtc::scoped_refptr<PortAllocatorFactoryInterface> default_allocator_factory_;
103 // External Audio device used for audio playback. 114 // External Audio device used for audio playback.
104 rtc::scoped_refptr<AudioDeviceModule> default_adm_; 115 rtc::scoped_refptr<AudioDeviceModule> default_adm_;
105 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; 116 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
106 // External Video encoder factory. This can be NULL if the client has not 117 // External Video encoder factory. This can be NULL if the client has not
107 // injected any. In that case, video engine will use the internal SW encoder. 118 // injected any. In that case, video engine will use the internal SW encoder.
108 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> 119 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory>
109 video_encoder_factory_; 120 video_encoder_factory_;
110 // External Video decoder factory. This can be NULL if the client has not 121 // External Video decoder factory. This can be NULL if the client has not
111 // injected any. In that case, video engine will use the internal SW decoder. 122 // injected any. In that case, video engine will use the internal SW decoder.
112 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> 123 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory>
113 video_decoder_factory_; 124 video_decoder_factory_;
114 125
115 rtc::scoped_ptr<webrtc::DtlsIdentityStore> dtls_identity_store_; 126 rtc::scoped_ptr<webrtc::DtlsIdentityStore> dtls_identity_store_;
116 }; 127 };
117 128
118 } // namespace webrtc 129 } // namespace webrtc
119 130
120 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ 131 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698