| 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_WEBRTC_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/memory/ref_counted.h" | |
| 13 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 14 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 15 #include "content/public/renderer/render_process_observer.h" | 14 #include "content/public/renderer/render_process_observer.h" |
| 16 #include "content/renderer/p2p/socket_dispatcher.h" | 15 #include "content/renderer/p2p/socket_dispatcher.h" |
| 17 #include "ipc/ipc_platform_file.h" | 16 #include "ipc/ipc_platform_file.h" |
| 18 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" | 17 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" |
| 19 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" | 18 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class WaitableEvent; | 21 class WaitableEvent; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 46 class RTCMediaConstraints; | 45 class RTCMediaConstraints; |
| 47 class WebAudioCapturerSource; | 46 class WebAudioCapturerSource; |
| 48 class WebRtcAudioCapturer; | 47 class WebRtcAudioCapturer; |
| 49 class WebRtcAudioDeviceImpl; | 48 class WebRtcAudioDeviceImpl; |
| 50 class WebRtcLocalAudioTrack; | 49 class WebRtcLocalAudioTrack; |
| 51 class WebRtcLoggingHandlerImpl; | 50 class WebRtcLoggingHandlerImpl; |
| 52 class WebRtcLoggingMessageFilter; | 51 class WebRtcLoggingMessageFilter; |
| 53 class WebRtcVideoCapturerAdapter; | 52 class WebRtcVideoCapturerAdapter; |
| 54 struct StreamDeviceInfo; | 53 struct StreamDeviceInfo; |
| 55 | 54 |
| 56 // Object factory for RTC MediaStreams and RTC PeerConnections. | 55 // Object factory for RTC PeerConnections. |
| 57 class CONTENT_EXPORT MediaStreamDependencyFactory | 56 class CONTENT_EXPORT PeerConnectionDependencyFactory |
| 58 : NON_EXPORTED_BASE(public base::NonThreadSafe), | 57 : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| 59 public RenderProcessObserver { | 58 public RenderProcessObserver { |
| 60 public: | 59 public: |
| 61 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. | 60 PeerConnectionDependencyFactory( |
| 62 typedef base::Callback<void(blink::WebMediaStream* web_stream, | |
| 63 bool live)> MediaSourcesCreatedCallback; | |
| 64 MediaStreamDependencyFactory( | |
| 65 P2PSocketDispatcher* p2p_socket_dispatcher); | 61 P2PSocketDispatcher* p2p_socket_dispatcher); |
| 66 virtual ~MediaStreamDependencyFactory(); | 62 virtual ~PeerConnectionDependencyFactory(); |
| 67 | 63 |
| 68 // Create a RTCPeerConnectionHandler object that implements the | 64 // Create a RTCPeerConnectionHandler object that implements the |
| 69 // WebKit WebRTCPeerConnectionHandler interface. | 65 // WebKit WebRTCPeerConnectionHandler interface. |
| 70 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( | 66 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( |
| 71 blink::WebRTCPeerConnectionHandlerClient* client); | 67 blink::WebRTCPeerConnectionHandlerClient* client); |
| 72 | 68 |
| 73 // Asks the PeerConnection factory to create a Local MediaStream object. | 69 // Asks the PeerConnection factory to create a Local MediaStream object. |
| 74 virtual scoped_refptr<webrtc::MediaStreamInterface> | 70 virtual scoped_refptr<webrtc::MediaStreamInterface> |
| 75 CreateLocalMediaStream(const std::string& label); | 71 CreateLocalMediaStream(const std::string& label); |
| 76 | 72 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; | 199 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; |
| 204 | 200 |
| 205 // PeerConnection threads. signaling_thread_ is created from the | 201 // PeerConnection threads. signaling_thread_ is created from the |
| 206 // "current" chrome thread. | 202 // "current" chrome thread. |
| 207 talk_base::Thread* signaling_thread_; | 203 talk_base::Thread* signaling_thread_; |
| 208 talk_base::Thread* worker_thread_; | 204 talk_base::Thread* worker_thread_; |
| 209 base::Thread chrome_worker_thread_; | 205 base::Thread chrome_worker_thread_; |
| 210 | 206 |
| 211 base::File aec_dump_file_; | 207 base::File aec_dump_file_; |
| 212 | 208 |
| 213 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 209 DISALLOW_COPY_AND_ASSIGN(PeerConnectionDependencyFactory); |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 } // namespace content | 212 } // namespace content |
| 217 | 213 |
| 218 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 214 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
| OLD | NEW |