| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 virtual const scoped_refptr<webrtc::PeerConnectionFactoryInterface>& | 173 virtual const scoped_refptr<webrtc::PeerConnectionFactoryInterface>& |
| 174 GetPcFactory(); | 174 GetPcFactory(); |
| 175 virtual bool PeerConnectionFactoryCreated(); | 175 virtual bool PeerConnectionFactoryCreated(); |
| 176 | 176 |
| 177 // Returns a new capturer or existing capturer based on the |render_view_id| | 177 // Returns a new capturer or existing capturer based on the |render_view_id| |
| 178 // and |device_info|. When the |render_view_id| and |device_info| are valid, | 178 // and |device_info|. When the |render_view_id| and |device_info| are valid, |
| 179 // it reuses existing capture if any; otherwise it creates a new capturer. | 179 // it reuses existing capture if any; otherwise it creates a new capturer. |
| 180 virtual scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( | 180 virtual scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( |
| 181 int render_view_id, const StreamDeviceInfo& device_info, | 181 int render_view_id, const StreamDeviceInfo& device_info, |
| 182 const blink::WebMediaConstraints& constraints); | 182 const blink::WebMediaConstraints& constraints, |
| 183 MediaStreamAudioSource* audio_source); |
| 183 | 184 |
| 184 // Adds the audio device as a sink to the audio track and starts the local | 185 // Adds the audio device as a sink to the audio track and starts the local |
| 185 // audio track. This is virtual for test purposes since no real audio device | 186 // audio track. This is virtual for test purposes since no real audio device |
| 186 // exist in unit tests. | 187 // exist in unit tests. |
| 187 virtual void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track); | 188 virtual void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track); |
| 188 | 189 |
| 189 private: | 190 private: |
| 190 // Creates |pc_factory_|, which in turn is used for | 191 // Creates |pc_factory_|, which in turn is used for |
| 191 // creating PeerConnection objects. | 192 // creating PeerConnection objects. |
| 192 void CreatePeerConnectionFactory(); | 193 void CreatePeerConnectionFactory(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 base::Thread chrome_worker_thread_; | 227 base::Thread chrome_worker_thread_; |
| 227 | 228 |
| 228 base::PlatformFile aec_dump_file_; | 229 base::PlatformFile aec_dump_file_; |
| 229 | 230 |
| 230 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 231 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); |
| 231 }; | 232 }; |
| 232 | 233 |
| 233 } // namespace content | 234 } // namespace content |
| 234 | 235 |
| 235 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 236 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| OLD | NEW |