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

Side by Side Diff: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h

Issue 1721273002: MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests broken by recent MSAudioTrack::Stop() reworking. Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const webrtc::MediaConstraintsInterface* constraints, 181 const webrtc::MediaConstraintsInterface* constraints,
182 blink::WebFrame* frame, 182 blink::WebFrame* frame,
183 webrtc::PeerConnectionObserver* observer) override; 183 webrtc::PeerConnectionObserver* observer) override;
184 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( 184 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource(
185 const webrtc::MediaConstraintsInterface* constraints) override; 185 const webrtc::MediaConstraintsInterface* constraints) override;
186 WebRtcVideoCapturerAdapter* CreateVideoCapturer( 186 WebRtcVideoCapturerAdapter* CreateVideoCapturer(
187 bool is_screen_capture) override; 187 bool is_screen_capture) override;
188 scoped_refptr<webrtc::VideoSourceInterface> CreateVideoSource( 188 scoped_refptr<webrtc::VideoSourceInterface> CreateVideoSource(
189 cricket::VideoCapturer* capturer, 189 cricket::VideoCapturer* capturer,
190 const blink::WebMediaConstraints& constraints) override; 190 const blink::WebMediaConstraints& constraints) override;
191 scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( 191 void CreateWebAudioSource(blink::WebMediaStreamSource* source) override;
192 blink::WebMediaStreamSource* source) override;
193 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( 192 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream(
194 const std::string& label) override; 193 const std::string& label) override;
195 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 194 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
196 const std::string& id, 195 const std::string& id,
197 webrtc::VideoSourceInterface* source) override; 196 webrtc::VideoSourceInterface* source) override;
198 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 197 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
199 const std::string& id, 198 const std::string& id,
200 cricket::VideoCapturer* capturer) override; 199 cricket::VideoCapturer* capturer) override;
201 webrtc::SessionDescriptionInterface* CreateSessionDescription( 200 webrtc::SessionDescriptionInterface* CreateSessionDescription(
202 const std::string& type, 201 const std::string& type,
203 const std::string& sdp, 202 const std::string& sdp,
204 webrtc::SdpParseError* error) override; 203 webrtc::SdpParseError* error) override;
205 webrtc::IceCandidateInterface* CreateIceCandidate( 204 webrtc::IceCandidateInterface* CreateIceCandidate(
206 const std::string& sdp_mid, 205 const std::string& sdp_mid,
207 int sdp_mline_index, 206 int sdp_mline_index,
208 const std::string& sdp) override; 207 const std::string& sdp) override;
209 208
210 scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( 209 scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
211 int render_frame_id, 210 int render_frame_id,
212 const StreamDeviceInfo& device_info, 211 const StreamDeviceInfo& device_info,
213 const blink::WebMediaConstraints& constraints, 212 const blink::WebMediaConstraints& constraints,
214 MediaStreamAudioSource* audio_source) override; 213 MediaStreamAudioSource* audio_source) override;
215 void FailToCreateNextAudioCapturer() { 214 void FailToCreateNextAudioCapturer() {
216 fail_to_create_next_audio_capturer_ = true; 215 fail_to_create_next_audio_capturer_ = true;
217 } 216 }
218 217
219 void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track) override;
220
221 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } 218 MockAudioSource* last_audio_source() { return last_audio_source_.get(); }
222 MockVideoSource* last_video_source() { return last_video_source_.get(); } 219 MockVideoSource* last_video_source() { return last_video_source_.get(); }
223 220
224 private: 221 private:
225 bool fail_to_create_next_audio_capturer_; 222 bool fail_to_create_next_audio_capturer_;
226 scoped_refptr <MockAudioSource> last_audio_source_; 223 scoped_refptr <MockAudioSource> last_audio_source_;
227 scoped_refptr <MockVideoSource> last_video_source_; 224 scoped_refptr <MockVideoSource> last_video_source_;
228 225
229 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); 226 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory);
230 }; 227 };
231 228
232 } // namespace content 229 } // namespace content
233 230
234 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_ 231 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698