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

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

Issue 23691038: Switch LiveAudio to source provider solution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the android bot Created 7 years, 3 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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "content/renderer/media/media_stream_dependency_factory.h" 12 #include "content/renderer/media/media_stream_dependency_factory.h"
13 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h" 13 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class WebAudioCapturerSource;
18
17 class MockVideoSource : public webrtc::VideoSourceInterface { 19 class MockVideoSource : public webrtc::VideoSourceInterface {
18 public: 20 public:
19 MockVideoSource(); 21 MockVideoSource();
20 22
21 virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE; 23 virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
22 virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE; 24 virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
23 virtual MediaSourceInterface::SourceState state() const OVERRIDE; 25 virtual MediaSourceInterface::SourceState state() const OVERRIDE;
24 virtual cricket::VideoCapturer* GetVideoCapturer() OVERRIDE; 26 virtual cricket::VideoCapturer* GetVideoCapturer() OVERRIDE;
25 virtual void AddSink(cricket::VideoRenderer* output) OVERRIDE; 27 virtual void AddSink(cricket::VideoRenderer* output) OVERRIDE;
26 virtual void RemoveSink(cricket::VideoRenderer* output) OVERRIDE; 28 virtual void RemoveSink(cricket::VideoRenderer* output) OVERRIDE;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 WebKit::WebFrame* frame, 121 WebKit::WebFrame* frame,
120 webrtc::PeerConnectionObserver* observer) OVERRIDE; 122 webrtc::PeerConnectionObserver* observer) OVERRIDE;
121 virtual scoped_refptr<webrtc::AudioSourceInterface> 123 virtual scoped_refptr<webrtc::AudioSourceInterface>
122 CreateLocalAudioSource( 124 CreateLocalAudioSource(
123 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 125 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
124 virtual scoped_refptr<webrtc::VideoSourceInterface> 126 virtual scoped_refptr<webrtc::VideoSourceInterface>
125 CreateLocalVideoSource( 127 CreateLocalVideoSource(
126 int video_session_id, 128 int video_session_id,
127 bool is_screencast, 129 bool is_screencast,
128 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 130 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
129 virtual scoped_refptr<WebRtcAudioCapturer> CreateWebAudioSource( 131 virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource(
130 WebKit::WebMediaStreamSource* source, 132 WebKit::WebMediaStreamSource* source,
131 RTCMediaConstraints* constraints) OVERRIDE; 133 RTCMediaConstraints* constraints) OVERRIDE;
132 virtual scoped_refptr<webrtc::MediaStreamInterface> 134 virtual scoped_refptr<webrtc::MediaStreamInterface>
133 CreateLocalMediaStream(const std::string& label) OVERRIDE; 135 CreateLocalMediaStream(const std::string& label) OVERRIDE;
134 virtual scoped_refptr<webrtc::VideoTrackInterface> 136 virtual scoped_refptr<webrtc::VideoTrackInterface>
135 CreateLocalVideoTrack(const std::string& id, 137 CreateLocalVideoTrack(const std::string& id,
136 webrtc::VideoSourceInterface* source) OVERRIDE; 138 webrtc::VideoSourceInterface* source) OVERRIDE;
137 virtual scoped_refptr<webrtc::VideoTrackInterface> 139 virtual scoped_refptr<webrtc::VideoTrackInterface>
138 CreateLocalVideoTrack(const std::string& id, 140 CreateLocalVideoTrack(const std::string& id,
139 cricket::VideoCapturer* capturer) OVERRIDE; 141 cricket::VideoCapturer* capturer) OVERRIDE;
140 virtual scoped_refptr<webrtc::AudioTrackInterface> CreateLocalAudioTrack( 142 virtual scoped_refptr<webrtc::AudioTrackInterface> CreateLocalAudioTrack(
141 const std::string& id, 143 const std::string& id,
142 const scoped_refptr<WebRtcAudioCapturer>& capturer, 144 const scoped_refptr<WebRtcAudioCapturer>& capturer,
145 WebAudioCapturerSource* webaudio_source,
143 webrtc::AudioSourceInterface* source, 146 webrtc::AudioSourceInterface* source,
144 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 147 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
145 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 148 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
146 const std::string& type, 149 const std::string& type,
147 const std::string& sdp, 150 const std::string& sdp,
148 webrtc::SdpParseError* error) OVERRIDE; 151 webrtc::SdpParseError* error) OVERRIDE;
149 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 152 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
150 const std::string& sdp_mid, 153 const std::string& sdp_mid,
151 int sdp_mline_index, 154 int sdp_mline_index,
152 const std::string& sdp) OVERRIDE; 155 const std::string& sdp) OVERRIDE;
(...skipping 11 matching lines...) Expand all
164 bool mock_pc_factory_created_; 167 bool mock_pc_factory_created_;
165 scoped_refptr <MockAudioSource> last_audio_source_; 168 scoped_refptr <MockAudioSource> last_audio_source_;
166 scoped_refptr <MockVideoSource> last_video_source_; 169 scoped_refptr <MockVideoSource> last_video_source_;
167 170
168 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 171 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory);
169 }; 172 };
170 173
171 } // namespace content 174 } // namespace content
172 175
173 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 176 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698