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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MediaStreamAudioSource. Created 6 years, 11 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 | Annotate | Revision Log
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 MediaStreamDependencyFactory( 69 MediaStreamDependencyFactory(
70 VideoCaptureImplManager* vc_manager, 70 VideoCaptureImplManager* vc_manager,
71 P2PSocketDispatcher* p2p_socket_dispatcher); 71 P2PSocketDispatcher* p2p_socket_dispatcher);
72 virtual ~MediaStreamDependencyFactory(); 72 virtual ~MediaStreamDependencyFactory();
73 73
74 // Create a RTCPeerConnectionHandler object that implements the 74 // Create a RTCPeerConnectionHandler object that implements the
75 // WebKit WebRTCPeerConnectionHandler interface. 75 // WebKit WebRTCPeerConnectionHandler interface.
76 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( 76 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler(
77 blink::WebRTCPeerConnectionHandlerClient* client); 77 blink::WebRTCPeerConnectionHandlerClient* client);
78 78
79 // CreateNativeMediaSources creates libjingle representations of 79 // CreateNativeMediaStreamAudioSources creates a MediaStream source object
80 // the underlying sources to the tracks in |web_stream|. 80 // for audio input.
81 // |sources_created| is invoked when the sources have either been created and 81 // The sources are stored in the extra data field of
82 // transitioned to a live state or failed.
83 // The libjingle sources is stored in the extra data field of
84 // WebMediaStreamSource. 82 // WebMediaStreamSource.
85 // |audio_constraints| and |video_constraints| set parameters for the sources. 83 bool CreateNativeMediaStreamAudioSources(
86 void CreateNativeMediaSources(
87 int render_view_id, 84 int render_view_id,
88 const blink::WebMediaConstraints& audio_constraints, 85 const blink::WebMediaConstraints& audio_constraints,
89 const blink::WebMediaConstraints& video_constraints, 86 const blink::WebVector<blink::WebMediaStreamSource>& audio_sources);
90 blink::WebMediaStream* web_stream, 87
91 const MediaSourcesCreatedCallback& sources_created); 88 virtual cricket::VideoCapturer* CreateVideoCapturer(
89 const StreamDeviceInfo& info);
90
91 // Asks the PeerConnection factory to create a Local Video Source.
92 // Takes ownership of |capturer|.
93 // TODO(perkj): Temporary until we don't need a webrtc::VideoSourceInterface.
94 virtual scoped_refptr<webrtc::VideoSourceInterface>
95 CreateLocalVideoSource(
96 cricket::VideoCapturer* capturer,
97 const blink::WebMediaConstraints& video_constraints);
92 98
93 // Creates a libjingle representation of a MediaStream and stores 99 // Creates a libjingle representation of a MediaStream and stores
94 // it in the extra data field of |web_stream|. 100 // it in the extra data field of |web_stream|.
95 void CreateNativeLocalMediaStream( 101 void CreateNativeLocalMediaStream(
96 blink::WebMediaStream* web_stream); 102 blink::WebMediaStream* web_stream);
97 103
98 // Creates a libjingle representation of a MediaStream and stores 104 // Creates a libjingle representation of a MediaStream and stores
99 // it in the extra data field of |web_stream|. 105 // it in the extra data field of |web_stream|.
100 // |stream_stopped| is a callback that is run when a MediaStream have been 106 // |stream_stopped| is a callback that is run when a MediaStream have been
101 // stopped. 107 // stopped.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 protected: 170 protected:
165 // Asks the PeerConnection factory to create a Local MediaStream object. 171 // Asks the PeerConnection factory to create a Local MediaStream object.
166 virtual scoped_refptr<webrtc::MediaStreamInterface> 172 virtual scoped_refptr<webrtc::MediaStreamInterface>
167 CreateLocalMediaStream(const std::string& label); 173 CreateLocalMediaStream(const std::string& label);
168 174
169 // Asks the PeerConnection factory to create a Local Audio Source. 175 // Asks the PeerConnection factory to create a Local Audio Source.
170 virtual scoped_refptr<webrtc::AudioSourceInterface> 176 virtual scoped_refptr<webrtc::AudioSourceInterface>
171 CreateLocalAudioSource( 177 CreateLocalAudioSource(
172 const webrtc::MediaConstraintsInterface* constraints); 178 const webrtc::MediaConstraintsInterface* constraints);
173 179
174 // Asks the PeerConnection factory to create a Local Video Source.
175 virtual scoped_refptr<webrtc::VideoSourceInterface>
176 CreateLocalVideoSource(
177 int video_session_id,
178 bool is_screen_cast,
179 const webrtc::MediaConstraintsInterface* constraints);
180
181 // Creates a media::AudioCapturerSource with an implementation that is 180 // Creates a media::AudioCapturerSource with an implementation that is
182 // specific for a WebAudio source. The created WebAudioCapturerSource 181 // specific for a WebAudio source. The created WebAudioCapturerSource
183 // instance will function as audio source instead of the default 182 // instance will function as audio source instead of the default
184 // WebRtcAudioCapturer. 183 // WebRtcAudioCapturer.
185 // The |constraints| will be modified to include the default, mandatory 184 // The |constraints| will be modified to include the default, mandatory
186 // WebAudio constraints. 185 // WebAudio constraints.
187 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( 186 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource(
188 blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints); 187 blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints);
189 188
190 // Asks the PeerConnection factory to create a Local AudioTrack object. 189 // Asks the PeerConnection factory to create a Local AudioTrack object.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 base::Thread chrome_worker_thread_; 265 base::Thread chrome_worker_thread_;
267 266
268 base::PlatformFile aec_dump_file_; 267 base::PlatformFile aec_dump_file_;
269 268
270 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 269 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
271 }; 270 };
272 271
273 } // namespace content 272 } // namespace content
274 273
275 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 274 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698