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

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

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 WebKit::WebRTCPeerConnectionHandlerClient* client); 64 WebKit::WebRTCPeerConnectionHandlerClient* client);
65 65
66 // CreateNativeMediaSources creates libjingle representations of 66 // CreateNativeMediaSources creates libjingle representations of
67 // the underlying sources to the tracks in |description|. 67 // the underlying sources to the tracks in |description|.
68 // |sources_created| is invoked when the sources have either been created and 68 // |sources_created| is invoked when the sources have either been created and
69 // transitioned to a live state or failed. 69 // transitioned to a live state or failed.
70 // The libjingle sources is stored in the extra data field of 70 // The libjingle sources is stored in the extra data field of
71 // WebMediaStreamSource. 71 // WebMediaStreamSource.
72 // |audio_constraints| and |video_constraints| set parameters for the sources. 72 // |audio_constraints| and |video_constraints| set parameters for the sources.
73 void CreateNativeMediaSources( 73 void CreateNativeMediaSources(
74 int render_view_id,
74 const WebKit::WebMediaConstraints& audio_constraints, 75 const WebKit::WebMediaConstraints& audio_constraints,
75 const WebKit::WebMediaConstraints& video_constraints, 76 const WebKit::WebMediaConstraints& video_constraints,
76 WebKit::WebMediaStream* description, 77 WebKit::WebMediaStream* description,
77 const MediaSourcesCreatedCallback& sources_created); 78 const MediaSourcesCreatedCallback& sources_created);
78 79
79 // Creates a libjingle representation of a MediaStream and stores 80 // Creates a libjingle representation of a MediaStream and stores
80 // it in the extra data field of |description|. 81 // it in the extra data field of |description|.
81 void CreateNativeLocalMediaStream( 82 void CreateNativeLocalMediaStream(
82 WebKit::WebMediaStream* description); 83 WebKit::WebMediaStream* description);
83 84
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Asks the PeerConnection factory to create a Local Video Source. 128 // Asks the PeerConnection factory to create a Local Video Source.
128 virtual scoped_refptr<webrtc::VideoSourceInterface> 129 virtual scoped_refptr<webrtc::VideoSourceInterface>
129 CreateLocalVideoSource( 130 CreateLocalVideoSource(
130 int video_session_id, 131 int video_session_id,
131 bool is_screen_cast, 132 bool is_screen_cast,
132 const webrtc::MediaConstraintsInterface* constraints); 133 const webrtc::MediaConstraintsInterface* constraints);
133 134
134 // Initializes the source using audio parameters for the selected 135 // Initializes the source using audio parameters for the selected
135 // capture device and specifies which capture device to use as capture 136 // capture device and specifies which capture device to use as capture
136 // source. 137 // source.
137 virtual bool InitializeAudioSource(const StreamDeviceInfo& device_info); 138 virtual bool InitializeAudioSource(int render_view_id,
139 const StreamDeviceInfo& device_info);
138 140
139 // Creates a media::AudioCapturerSource with an implementation that is 141 // Creates a media::AudioCapturerSource with an implementation that is
140 // specific for a WebAudio source. The created WebAudioCapturerSource 142 // specific for a WebAudio source. The created WebAudioCapturerSource
141 // instance will function as audio source instead of the default 143 // instance will function as audio source instead of the default
142 // WebRtcAudioCapturer. 144 // WebRtcAudioCapturer.
143 virtual bool CreateWebAudioSource(WebKit::WebMediaStreamSource* source); 145 virtual bool CreateWebAudioSource(WebKit::WebMediaStreamSource* source);
144 146
145 // Asks the PeerConnection factory to create a Local AudioTrack object. 147 // Asks the PeerConnection factory to create a Local AudioTrack object.
146 virtual scoped_refptr<webrtc::AudioTrackInterface> 148 virtual scoped_refptr<webrtc::AudioTrackInterface>
147 CreateLocalAudioTrack(const std::string& id, 149 CreateLocalAudioTrack(const std::string& id,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 talk_base::Thread* signaling_thread_; 185 talk_base::Thread* signaling_thread_;
184 talk_base::Thread* worker_thread_; 186 talk_base::Thread* worker_thread_;
185 base::Thread chrome_worker_thread_; 187 base::Thread chrome_worker_thread_;
186 188
187 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 189 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
188 }; 190 };
189 191
190 } // namespace content 192 } // namespace content
191 193
192 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 194 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698