Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.h

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add VDA and gpu_factories mocks. Update unittest. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/renderer/media/media_stream_extra_data.h" 14 #include "content/renderer/media/media_stream_extra_data.h"
15 #include "content/renderer/p2p/socket_dispatcher.h" 15 #include "content/renderer/p2p/socket_dispatcher.h"
16 #include "media/filters/gpu_video_decoder.h"
16 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " 17 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
17 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" 18 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h"
18 19
19 namespace base { 20 namespace base {
20 class WaitableEvent; 21 class WaitableEvent;
21 } 22 }
22 23
23 namespace talk_base { 24 namespace talk_base {
24 class NetworkManager; 25 class NetworkManager;
25 class PacketSocketFactory; 26 class PacketSocketFactory;
(...skipping 22 matching lines...) Expand all
48 49
49 // Object factory for RTC MediaStreams and RTC PeerConnections. 50 // Object factory for RTC MediaStreams and RTC PeerConnections.
50 class CONTENT_EXPORT MediaStreamDependencyFactory 51 class CONTENT_EXPORT MediaStreamDependencyFactory
51 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 52 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
52 public: 53 public:
53 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. 54 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources.
54 typedef base::Callback<void(WebKit::WebMediaStream* description, 55 typedef base::Callback<void(WebKit::WebMediaStream* description,
55 bool live)> MediaSourcesCreatedCallback; 56 bool live)> MediaSourcesCreatedCallback;
56 MediaStreamDependencyFactory( 57 MediaStreamDependencyFactory(
57 VideoCaptureImplManager* vc_manager, 58 VideoCaptureImplManager* vc_manager,
59 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories,
58 P2PSocketDispatcher* p2p_socket_dispatcher); 60 P2PSocketDispatcher* p2p_socket_dispatcher);
59 virtual ~MediaStreamDependencyFactory(); 61 virtual ~MediaStreamDependencyFactory();
60 62
61 // Create a RTCPeerConnectionHandler object that implements the 63 // Create a RTCPeerConnectionHandler object that implements the
62 // WebKit WebRTCPeerConnectionHandler interface. 64 // WebKit WebRTCPeerConnectionHandler interface.
63 WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( 65 WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler(
64 WebKit::WebRTCPeerConnectionHandlerClient* client); 66 WebKit::WebRTCPeerConnectionHandlerClient* client);
65 67
66 // CreateNativeMediaSources creates libjingle representations of 68 // CreateNativeMediaSources creates libjingle representations of
67 // the underlying sources to the tracks in |description|. 69 // the underlying sources to the tracks in |description|.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void CleanupPeerConnectionFactory(); 197 void CleanupPeerConnectionFactory();
196 198
197 // We own network_manager_, must be deleted on the worker thread. 199 // We own network_manager_, must be deleted on the worker thread.
198 // The network manager uses |p2p_socket_dispatcher_|. 200 // The network manager uses |p2p_socket_dispatcher_|.
199 IpcNetworkManager* network_manager_; 201 IpcNetworkManager* network_manager_;
200 scoped_ptr<IpcPacketSocketFactory> socket_factory_; 202 scoped_ptr<IpcPacketSocketFactory> socket_factory_;
201 203
202 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; 204 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
203 205
204 scoped_refptr<VideoCaptureImplManager> vc_manager_; 206 scoped_refptr<VideoCaptureImplManager> vc_manager_;
207 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
205 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; 208 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
206 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; 209 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_;
207 210
208 // PeerConnection threads. signaling_thread_ is created from the 211 // PeerConnection threads. signaling_thread_ is created from the
209 // "current" chrome thread. 212 // "current" chrome thread.
210 talk_base::Thread* signaling_thread_; 213 talk_base::Thread* signaling_thread_;
211 talk_base::Thread* worker_thread_; 214 talk_base::Thread* worker_thread_;
212 base::Thread chrome_worker_thread_; 215 base::Thread chrome_worker_thread_;
213 216
214 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 217 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
215 }; 218 };
216 219
217 } // namespace content 220 } // namespace content
218 221
219 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 222 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698