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

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: Created 7 years, 8 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void CleanupPeerConnectionFactory(); 183 void CleanupPeerConnectionFactory();
182 184
183 // We own network_manager_, must be deleted on the worker thread. 185 // We own network_manager_, must be deleted on the worker thread.
184 // The network manager uses |p2p_socket_dispatcher_|. 186 // The network manager uses |p2p_socket_dispatcher_|.
185 IpcNetworkManager* network_manager_; 187 IpcNetworkManager* network_manager_;
186 scoped_ptr<IpcPacketSocketFactory> socket_factory_; 188 scoped_ptr<IpcPacketSocketFactory> socket_factory_;
187 189
188 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; 190 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
189 191
190 scoped_refptr<VideoCaptureImplManager> vc_manager_; 192 scoped_refptr<VideoCaptureImplManager> vc_manager_;
193 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
191 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; 194 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
192 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; 195 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_;
193 196
194 // PeerConnection threads. signaling_thread_ is created from the 197 // PeerConnection threads. signaling_thread_ is created from the
195 // "current" chrome thread. 198 // "current" chrome thread.
196 talk_base::Thread* signaling_thread_; 199 talk_base::Thread* signaling_thread_;
197 talk_base::Thread* worker_thread_; 200 talk_base::Thread* worker_thread_;
198 base::Thread chrome_worker_thread_; 201 base::Thread chrome_worker_thread_;
202 base::Thread decoder_worker_thread_;
199 203
200 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 204 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
201 }; 205 };
202 206
203 } // namespace content 207 } // namespace content
204 208
205 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 209 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698