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 28 matching lines...) Expand all Loading... |
39 class WebMediaStream; | 39 class WebMediaStream; |
40 class WebRTCPeerConnectionHandler; | 40 class WebRTCPeerConnectionHandler; |
41 class WebRTCPeerConnectionHandlerClient; | 41 class WebRTCPeerConnectionHandlerClient; |
42 } | 42 } |
43 | 43 |
44 namespace content { | 44 namespace content { |
45 | 45 |
46 class IpcNetworkManager; | 46 class IpcNetworkManager; |
47 class IpcPacketSocketFactory; | 47 class IpcPacketSocketFactory; |
48 class RTCMediaConstraints; | 48 class RTCMediaConstraints; |
49 class VideoCaptureImplManager; | |
50 class WebAudioCapturerSource; | 49 class WebAudioCapturerSource; |
51 class WebRtcAudioCapturer; | 50 class WebRtcAudioCapturer; |
52 class WebRtcAudioDeviceImpl; | 51 class WebRtcAudioDeviceImpl; |
53 class WebRtcLoggingHandlerImpl; | 52 class WebRtcLoggingHandlerImpl; |
54 class WebRtcLoggingMessageFilter; | 53 class WebRtcLoggingMessageFilter; |
55 struct StreamDeviceInfo; | 54 struct StreamDeviceInfo; |
56 | 55 |
57 #if defined(GOOGLE_TV) | 56 #if defined(GOOGLE_TV) |
58 class RTCVideoDecoderFactoryTv; | 57 class RTCVideoDecoderFactoryTv; |
59 #endif | 58 #endif |
60 | 59 |
61 // Object factory for RTC MediaStreams and RTC PeerConnections. | 60 // Object factory for RTC MediaStreams and RTC PeerConnections. |
62 class CONTENT_EXPORT MediaStreamDependencyFactory | 61 class CONTENT_EXPORT MediaStreamDependencyFactory |
63 : NON_EXPORTED_BASE(public base::NonThreadSafe), | 62 : NON_EXPORTED_BASE(public base::NonThreadSafe), |
64 public RenderProcessObserver { | 63 public RenderProcessObserver { |
65 public: | 64 public: |
66 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. | 65 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. |
67 typedef base::Callback<void(blink::WebMediaStream* web_stream, | 66 typedef base::Callback<void(blink::WebMediaStream* web_stream, |
68 bool live)> MediaSourcesCreatedCallback; | 67 bool live)> MediaSourcesCreatedCallback; |
69 MediaStreamDependencyFactory( | 68 MediaStreamDependencyFactory( |
70 VideoCaptureImplManager* vc_manager, | |
71 P2PSocketDispatcher* p2p_socket_dispatcher); | 69 P2PSocketDispatcher* p2p_socket_dispatcher); |
72 virtual ~MediaStreamDependencyFactory(); | 70 virtual ~MediaStreamDependencyFactory(); |
73 | 71 |
74 // Create a RTCPeerConnectionHandler object that implements the | 72 // Create a RTCPeerConnectionHandler object that implements the |
75 // WebKit WebRTCPeerConnectionHandler interface. | 73 // WebKit WebRTCPeerConnectionHandler interface. |
76 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( | 74 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( |
77 blink::WebRTCPeerConnectionHandlerClient* client); | 75 blink::WebRTCPeerConnectionHandlerClient* client); |
78 | 76 |
79 // CreateNativeMediaSources creates libjingle representations of | 77 // CreateNativeMediaSources creates libjingle representations of |
80 // the underlying sources to the tracks in |web_stream|. | 78 // the underlying sources to the tracks in |web_stream|. |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 scoped_ptr<IpcPacketSocketFactory> socket_factory_; | 246 scoped_ptr<IpcPacketSocketFactory> socket_factory_; |
249 | 247 |
250 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; | 248 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; |
251 | 249 |
252 #if defined(GOOGLE_TV) | 250 #if defined(GOOGLE_TV) |
253 // |pc_factory_| will hold the ownership of this object, and |pc_factory_| | 251 // |pc_factory_| will hold the ownership of this object, and |pc_factory_| |
254 // outlives this object. Thus weak pointer is sufficient. | 252 // outlives this object. Thus weak pointer is sufficient. |
255 RTCVideoDecoderFactoryTv* decoder_factory_tv_; | 253 RTCVideoDecoderFactoryTv* decoder_factory_tv_; |
256 #endif | 254 #endif |
257 | 255 |
258 scoped_refptr<VideoCaptureImplManager> vc_manager_; | |
259 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; | 256 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; |
260 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; | 257 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; |
261 | 258 |
262 // PeerConnection threads. signaling_thread_ is created from the | 259 // PeerConnection threads. signaling_thread_ is created from the |
263 // "current" chrome thread. | 260 // "current" chrome thread. |
264 talk_base::Thread* signaling_thread_; | 261 talk_base::Thread* signaling_thread_; |
265 talk_base::Thread* worker_thread_; | 262 talk_base::Thread* worker_thread_; |
266 base::Thread chrome_worker_thread_; | 263 base::Thread chrome_worker_thread_; |
267 | 264 |
268 base::PlatformFile aec_dump_file_; | 265 base::PlatformFile aec_dump_file_; |
269 | 266 |
270 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 267 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); |
271 }; | 268 }; |
272 | 269 |
273 } // namespace content | 270 } // namespace content |
274 | 271 |
275 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 272 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
OLD | NEW |