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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 10 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_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 virtual ~MockMediaStreamDependencyFactory(); 140 virtual ~MockMediaStreamDependencyFactory();
141 141
142 virtual scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( 142 virtual scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection(
143 const webrtc::PeerConnectionInterface::IceServers& ice_servers, 143 const webrtc::PeerConnectionInterface::IceServers& ice_servers,
144 const webrtc::MediaConstraintsInterface* constraints, 144 const webrtc::MediaConstraintsInterface* constraints,
145 blink::WebFrame* frame, 145 blink::WebFrame* frame,
146 webrtc::PeerConnectionObserver* observer) OVERRIDE; 146 webrtc::PeerConnectionObserver* observer) OVERRIDE;
147 virtual scoped_refptr<webrtc::AudioSourceInterface> 147 virtual scoped_refptr<webrtc::AudioSourceInterface>
148 CreateLocalAudioSource( 148 CreateLocalAudioSource(
149 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 149 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
150 virtual scoped_refptr<webrtc::VideoSourceInterface> 150 virtual cricket::VideoCapturer* CreateVideoCapturer(
151 CreateLocalVideoSource( 151 const StreamDeviceInfo& info) OVERRIDE;
152 int video_session_id,
153 bool is_screencast,
154 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
155 virtual scoped_refptr<webrtc::VideoSourceInterface> 152 virtual scoped_refptr<webrtc::VideoSourceInterface>
156 CreateVideoSource( 153 CreateVideoSource(
157 cricket::VideoCapturer* capturer, 154 cricket::VideoCapturer* capturer,
158 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 155 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
159 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( 156 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource(
160 blink::WebMediaStreamSource* source, 157 blink::WebMediaStreamSource* source,
161 const RTCMediaConstraints& constraints) OVERRIDE; 158 const RTCMediaConstraints& constraints) OVERRIDE;
162 virtual scoped_refptr<webrtc::MediaStreamInterface> 159 virtual scoped_refptr<webrtc::MediaStreamInterface>
163 CreateLocalMediaStream(const std::string& label) OVERRIDE; 160 CreateLocalMediaStream(const std::string& label) OVERRIDE;
164 virtual scoped_refptr<webrtc::VideoTrackInterface> 161 virtual scoped_refptr<webrtc::VideoTrackInterface>
165 CreateLocalVideoTrack(const std::string& id, 162 CreateLocalVideoTrack(const std::string& id,
166 webrtc::VideoSourceInterface* source) OVERRIDE; 163 webrtc::VideoSourceInterface* source) OVERRIDE;
167 virtual scoped_refptr<webrtc::VideoTrackInterface> 164 virtual scoped_refptr<webrtc::VideoTrackInterface>
168 CreateLocalVideoTrack(const std::string& id, 165 CreateLocalVideoTrack(const std::string& id,
169 cricket::VideoCapturer* capturer) OVERRIDE; 166 cricket::VideoCapturer* capturer) OVERRIDE;
170 virtual scoped_refptr<webrtc::AudioTrackInterface> CreateLocalAudioTrack( 167 virtual scoped_refptr<webrtc::AudioTrackInterface> CreateLocalAudioTrack(
171 const std::string& id, 168 const std::string& id,
172 const scoped_refptr<WebRtcAudioCapturer>& capturer, 169 const scoped_refptr<WebRtcAudioCapturer>& capturer,
173 WebAudioCapturerSource* webaudio_source, 170 WebAudioCapturerSource* webaudio_source,
174 webrtc::AudioSourceInterface* source) OVERRIDE; 171 webrtc::AudioSourceInterface* source) OVERRIDE;
175 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 172 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
176 const std::string& type, 173 const std::string& type,
177 const std::string& sdp, 174 const std::string& sdp,
178 webrtc::SdpParseError* error) OVERRIDE; 175 webrtc::SdpParseError* error) OVERRIDE;
179 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 176 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
180 const std::string& sdp_mid, 177 const std::string& sdp_mid,
181 int sdp_mline_index, 178 int sdp_mline_index,
182 const std::string& sdp) OVERRIDE; 179 const std::string& sdp) OVERRIDE;
183 180
184 virtual bool EnsurePeerConnectionFactory() OVERRIDE;
185 virtual bool PeerConnectionFactoryCreated() OVERRIDE;
186
187 virtual scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( 181 virtual scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer(
188 int render_view_id, const StreamDeviceInfo& device_info, 182 int render_view_id, const StreamDeviceInfo& device_info,
189 const blink::WebMediaConstraints& constraints) OVERRIDE; 183 const blink::WebMediaConstraints& constraints) OVERRIDE;
190 184
191 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } 185 MockAudioSource* last_audio_source() { return last_audio_source_.get(); }
192 MockVideoSource* last_video_source() { return last_video_source_.get(); } 186 MockVideoSource* last_video_source() { return last_video_source_.get(); }
193 187
194 private: 188 private:
195 bool mock_pc_factory_created_;
196 scoped_refptr <MockAudioSource> last_audio_source_; 189 scoped_refptr <MockAudioSource> last_audio_source_;
197 scoped_refptr <MockVideoSource> last_video_source_; 190 scoped_refptr <MockVideoSource> last_video_source_;
198 191
199 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 192 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory);
200 }; 193 };
201 194
202 } // namespace content 195 } // namespace content
203 196
204 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 197 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698