 Chromium Code Reviews
 Chromium Code Reviews Issue 131763002:
  Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 131763002:
  Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 bool live)> MediaSourcesCreatedCallback; | 67 bool live)> MediaSourcesCreatedCallback; | 
| 68 MediaStreamDependencyFactory( | 68 MediaStreamDependencyFactory( | 
| 69 P2PSocketDispatcher* p2p_socket_dispatcher); | 69 P2PSocketDispatcher* p2p_socket_dispatcher); | 
| 70 virtual ~MediaStreamDependencyFactory(); | 70 virtual ~MediaStreamDependencyFactory(); | 
| 71 | 71 | 
| 72 // Create a RTCPeerConnectionHandler object that implements the | 72 // Create a RTCPeerConnectionHandler object that implements the | 
| 73 // WebKit WebRTCPeerConnectionHandler interface. | 73 // WebKit WebRTCPeerConnectionHandler interface. | 
| 74 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( | 74 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( | 
| 75 blink::WebRTCPeerConnectionHandlerClient* client); | 75 blink::WebRTCPeerConnectionHandlerClient* client); | 
| 76 | 76 | 
| 77 // CreateNativeMediaSources creates libjingle representations of | 77 // CreateNativeMediaStreamAudioSources creates a MediaStream source object | 
| 
Ronghua Wu (Left Chromium)
2014/01/16 23:02:37
Looking at the implementation of this method, it's
 
perkj_chrome
2014/01/17 13:19:45
Done.
 | |
| 78 // the underlying sources to the tracks in |web_stream|. | 78 // for audio input. | 
| 79 // |sources_created| is invoked when the sources have either been created and | 79 // The sources are stored in the extra data field of | 
| 80 // transitioned to a live state or failed. | |
| 81 // The libjingle sources is stored in the extra data field of | |
| 82 // WebMediaStreamSource. | 80 // WebMediaStreamSource. | 
| 83 // |audio_constraints| and |video_constraints| set parameters for the sources. | 81 bool CreateNativeMediaStreamAudioSources( | 
| 84 void CreateNativeMediaSources( | |
| 85 int render_view_id, | 82 int render_view_id, | 
| 86 const blink::WebMediaConstraints& audio_constraints, | 83 const blink::WebMediaConstraints& audio_constraints, | 
| 87 const blink::WebMediaConstraints& video_constraints, | 84 const blink::WebVector<blink::WebMediaStreamSource>& audio_sources); | 
| 88 blink::WebMediaStream* web_stream, | 85 | 
| 89 const MediaSourcesCreatedCallback& sources_created); | 86 virtual cricket::VideoCapturer* CreateVideoCapturer( | 
| 
Ronghua Wu (Left Chromium)
2014/01/16 23:02:37
add comment
 
perkj_chrome
2014/01/17 13:19:45
done. Note that this is kind of temporary. I can n
 | |
| 87 const StreamDeviceInfo& info); | |
| 90 | 88 | 
| 91 // Creates a libjingle representation of a MediaStream and stores | 89 // Creates a libjingle representation of a MediaStream and stores | 
| 92 // it in the extra data field of |web_stream|. | 90 // it in the extra data field of |web_stream|. | 
| 93 void CreateNativeLocalMediaStream( | 91 void CreateNativeLocalMediaStream( | 
| 94 blink::WebMediaStream* web_stream); | 92 blink::WebMediaStream* web_stream); | 
| 95 | 93 | 
| 96 // Creates a libjingle representation of a MediaStream and stores | 94 // Creates a libjingle representation of a MediaStream and stores | 
| 97 // it in the extra data field of |web_stream|. | 95 // it in the extra data field of |web_stream|. | 
| 98 // |stream_stopped| is a callback that is run when a MediaStream have been | 96 // |stream_stopped| is a callback that is run when a MediaStream have been | 
| 99 // stopped. | 97 // stopped. | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 protected: | 167 protected: | 
| 170 // Asks the PeerConnection factory to create a Local MediaStream object. | 168 // Asks the PeerConnection factory to create a Local MediaStream object. | 
| 171 virtual scoped_refptr<webrtc::MediaStreamInterface> | 169 virtual scoped_refptr<webrtc::MediaStreamInterface> | 
| 172 CreateLocalMediaStream(const std::string& label); | 170 CreateLocalMediaStream(const std::string& label); | 
| 173 | 171 | 
| 174 // Asks the PeerConnection factory to create a Local Audio Source. | 172 // Asks the PeerConnection factory to create a Local Audio Source. | 
| 175 virtual scoped_refptr<webrtc::AudioSourceInterface> | 173 virtual scoped_refptr<webrtc::AudioSourceInterface> | 
| 176 CreateLocalAudioSource( | 174 CreateLocalAudioSource( | 
| 177 const webrtc::MediaConstraintsInterface* constraints); | 175 const webrtc::MediaConstraintsInterface* constraints); | 
| 178 | 176 | 
| 179 // Asks the PeerConnection factory to create a Local Video Source. | |
| 180 virtual scoped_refptr<webrtc::VideoSourceInterface> | |
| 181 CreateLocalVideoSource( | |
| 182 int video_session_id, | |
| 183 bool is_screen_cast, | |
| 184 const webrtc::MediaConstraintsInterface* constraints); | |
| 185 | |
| 186 // Creates a media::AudioCapturerSource with an implementation that is | 177 // Creates a media::AudioCapturerSource with an implementation that is | 
| 187 // specific for a WebAudio source. The created WebAudioCapturerSource | 178 // specific for a WebAudio source. The created WebAudioCapturerSource | 
| 188 // instance will function as audio source instead of the default | 179 // instance will function as audio source instead of the default | 
| 189 // WebRtcAudioCapturer. | 180 // WebRtcAudioCapturer. | 
| 190 // The |constraints| will be modified to include the default, mandatory | 181 // The |constraints| will be modified to include the default, mandatory | 
| 191 // WebAudio constraints. | 182 // WebAudio constraints. | 
| 192 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( | 183 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( | 
| 193 blink::WebMediaStreamSource* source, | 184 blink::WebMediaStreamSource* source, | 
| 194 const RTCMediaConstraints& constraints); | 185 const RTCMediaConstraints& constraints); | 
| 195 | 186 | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 base::Thread chrome_worker_thread_; | 262 base::Thread chrome_worker_thread_; | 
| 272 | 263 | 
| 273 base::PlatformFile aec_dump_file_; | 264 base::PlatformFile aec_dump_file_; | 
| 274 | 265 | 
| 275 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 266 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); | 
| 276 }; | 267 }; | 
| 277 | 268 | 
| 278 } // namespace content | 269 } // namespace content | 
| 279 | 270 | 
| 280 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 271 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 
| OLD | NEW |