| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 CreateLocalVideoTrack(const std::string& id, | 188 CreateLocalVideoTrack(const std::string& id, |
| 189 cricket::VideoCapturer* capturer); | 189 cricket::VideoCapturer* capturer); |
| 190 | 190 |
| 191 virtual bool EnsurePeerConnectionFactory(); | 191 virtual bool EnsurePeerConnectionFactory(); |
| 192 virtual bool PeerConnectionFactoryCreated(); | 192 virtual bool PeerConnectionFactoryCreated(); |
| 193 | 193 |
| 194 // Returns a new capturer or existing capturer based on the |render_view_id| | 194 // Returns a new capturer or existing capturer based on the |render_view_id| |
| 195 // and |device_info|. When the |render_view_id| and |device_info| are valid, | 195 // and |device_info|. When the |render_view_id| and |device_info| are valid, |
| 196 // it reuses existing capture if any; otherwise it creates a new capturer. | 196 // it reuses existing capture if any; otherwise it creates a new capturer. |
| 197 virtual scoped_refptr<WebRtcAudioCapturer> MaybeCreateAudioCapturer( | 197 virtual scoped_refptr<WebRtcAudioCapturer> MaybeCreateAudioCapturer( |
| 198 int render_view_id, const StreamDeviceInfo& device_info); | 198 int render_view_id, const StreamDeviceInfo& device_info, |
| 199 const RTCMediaConstraints* constraints); |
| 199 | 200 |
| 200 private: | 201 private: |
| 201 // Creates and deletes |pc_factory_|, which in turn is used for | 202 // Creates and deletes |pc_factory_|, which in turn is used for |
| 202 // creating PeerConnection objects. | 203 // creating PeerConnection objects. |
| 203 bool CreatePeerConnectionFactory(); | 204 bool CreatePeerConnectionFactory(); |
| 204 | 205 |
| 205 void InitializeWorkerThread(talk_base::Thread** thread, | 206 void InitializeWorkerThread(talk_base::Thread** thread, |
| 206 base::WaitableEvent* event); | 207 base::WaitableEvent* event); |
| 207 | 208 |
| 208 void CreateIpcNetworkManagerOnWorkerThread(base::WaitableEvent* event); | 209 void CreateIpcNetworkManagerOnWorkerThread(base::WaitableEvent* event); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 231 talk_base::Thread* signaling_thread_; | 232 talk_base::Thread* signaling_thread_; |
| 232 talk_base::Thread* worker_thread_; | 233 talk_base::Thread* worker_thread_; |
| 233 base::Thread chrome_worker_thread_; | 234 base::Thread chrome_worker_thread_; |
| 234 | 235 |
| 235 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 236 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); |
| 236 }; | 237 }; |
| 237 | 238 |
| 238 } // namespace content | 239 } // namespace content |
| 239 | 240 |
| 240 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 241 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| OLD | NEW |