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

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

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 7 years, 6 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
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/media_stream_dependency_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 30 matching lines...) Expand all
41 namespace content { 41 namespace content {
42 42
43 class IpcNetworkManager; 43 class IpcNetworkManager;
44 class IpcPacketSocketFactory; 44 class IpcPacketSocketFactory;
45 class VideoCaptureImplManager; 45 class VideoCaptureImplManager;
46 class WebRtcAudioDeviceImpl; 46 class WebRtcAudioDeviceImpl;
47 class WebRtcLoggingHandlerImpl; 47 class WebRtcLoggingHandlerImpl;
48 class WebRtcLoggingMessageFilter; 48 class WebRtcLoggingMessageFilter;
49 struct StreamDeviceInfo; 49 struct StreamDeviceInfo;
50 50
51 #if defined(GOOGLE_TV)
52 class RTCVideoDecoderFactoryTv;
53 #endif
54
51 // Object factory for RTC MediaStreams and RTC PeerConnections. 55 // Object factory for RTC MediaStreams and RTC PeerConnections.
52 class CONTENT_EXPORT MediaStreamDependencyFactory 56 class CONTENT_EXPORT MediaStreamDependencyFactory
53 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 57 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
54 public: 58 public:
55 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. 59 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources.
56 typedef base::Callback<void(WebKit::WebMediaStream* description, 60 typedef base::Callback<void(WebKit::WebMediaStream* description,
57 bool live)> MediaSourcesCreatedCallback; 61 bool live)> MediaSourcesCreatedCallback;
58 MediaStreamDependencyFactory( 62 MediaStreamDependencyFactory(
59 VideoCaptureImplManager* vc_manager, 63 VideoCaptureImplManager* vc_manager,
60 P2PSocketDispatcher* p2p_socket_dispatcher); 64 P2PSocketDispatcher* p2p_socket_dispatcher);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 int sdp_mline_index, 133 int sdp_mline_index,
130 const std::string& sdp); 134 const std::string& sdp);
131 135
132 WebRtcAudioDeviceImpl* GetWebRtcAudioDevice(); 136 WebRtcAudioDeviceImpl* GetWebRtcAudioDevice();
133 137
134 // Stop the audio source for local audio tracks. 138 // Stop the audio source for local audio tracks.
135 // TODO(xians): Remove this function if each audio track takes care of their 139 // TODO(xians): Remove this function if each audio track takes care of their
136 // own source. 140 // own source.
137 void StopLocalAudioSource(const WebKit::WebMediaStream& description); 141 void StopLocalAudioSource(const WebKit::WebMediaStream& description);
138 142
143 #if defined(GOOGLE_TV)
144 RTCVideoDecoderFactoryTv* decoder_factory_tv() { return decoder_factory_tv_; }
145 #endif
146
139 protected: 147 protected:
140 // Asks the PeerConnection factory to create a Local MediaStream object. 148 // Asks the PeerConnection factory to create a Local MediaStream object.
141 virtual scoped_refptr<webrtc::MediaStreamInterface> 149 virtual scoped_refptr<webrtc::MediaStreamInterface>
142 CreateLocalMediaStream(const std::string& label); 150 CreateLocalMediaStream(const std::string& label);
143 151
144 // Asks the PeerConnection factory to create a Local Audio Source. 152 // Asks the PeerConnection factory to create a Local Audio Source.
145 virtual scoped_refptr<webrtc::AudioSourceInterface> 153 virtual scoped_refptr<webrtc::AudioSourceInterface>
146 CreateLocalAudioSource( 154 CreateLocalAudioSource(
147 const webrtc::MediaConstraintsInterface* constraints); 155 const webrtc::MediaConstraintsInterface* constraints);
148 156
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const std::string& app_session_id, 208 const std::string& app_session_id,
201 const std::string& app_url); 209 const std::string& app_url);
202 210
203 // We own network_manager_, must be deleted on the worker thread. 211 // We own network_manager_, must be deleted on the worker thread.
204 // The network manager uses |p2p_socket_dispatcher_|. 212 // The network manager uses |p2p_socket_dispatcher_|.
205 IpcNetworkManager* network_manager_; 213 IpcNetworkManager* network_manager_;
206 scoped_ptr<IpcPacketSocketFactory> socket_factory_; 214 scoped_ptr<IpcPacketSocketFactory> socket_factory_;
207 215
208 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; 216 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
209 217
218 #if defined(GOOGLE_TV)
219 // |pc_factory_| will hold the ownership of this object, and |pc_factory_|
220 // outlives this object. Thus weak pointer is sufficient.
221 RTCVideoDecoderFactoryTv* decoder_factory_tv_;
222 #endif
223
210 scoped_refptr<VideoCaptureImplManager> vc_manager_; 224 scoped_refptr<VideoCaptureImplManager> vc_manager_;
211 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; 225 scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
212 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; 226 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_;
213 227
214 // PeerConnection threads. signaling_thread_ is created from the 228 // PeerConnection threads. signaling_thread_ is created from the
215 // "current" chrome thread. 229 // "current" chrome thread.
216 talk_base::Thread* signaling_thread_; 230 talk_base::Thread* signaling_thread_;
217 talk_base::Thread* worker_thread_; 231 talk_base::Thread* worker_thread_;
218 base::Thread chrome_worker_thread_; 232 base::Thread chrome_worker_thread_;
219 233
220 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 234 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
221 }; 235 };
222 236
223 } // namespace content 237 } // namespace content
224 238
225 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 239 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/media_stream_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698