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