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

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

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Had to restore usage of UTF16ToUTF8() in MediaStreamImpl::OnCreateNativeSourcesComplete to build on… Created 7 years, 11 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual scoped_refptr<webrtc::PeerConnectionInterface> 98 virtual scoped_refptr<webrtc::PeerConnectionInterface>
99 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers, 99 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers,
100 const webrtc::MediaConstraintsInterface* constraints, 100 const webrtc::MediaConstraintsInterface* constraints,
101 WebKit::WebFrame* frame, 101 WebKit::WebFrame* frame,
102 webrtc::PeerConnectionObserver* observer) OVERRIDE; 102 webrtc::PeerConnectionObserver* observer) OVERRIDE;
103 virtual scoped_refptr<webrtc::VideoSourceInterface> 103 virtual scoped_refptr<webrtc::VideoSourceInterface>
104 CreateVideoSource( 104 CreateVideoSource(
105 int video_session_id, 105 int video_session_id,
106 bool is_screencast, 106 bool is_screencast,
107 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 107 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
108 virtual bool InitializeAudioSource(
109 const StreamDeviceInfo& device_info) OVERRIDE;
108 virtual scoped_refptr<webrtc::LocalMediaStreamInterface> 110 virtual scoped_refptr<webrtc::LocalMediaStreamInterface>
109 CreateLocalMediaStream(const std::string& label) OVERRIDE; 111 CreateLocalMediaStream(const std::string& label) OVERRIDE;
110 virtual scoped_refptr<webrtc::VideoTrackInterface> 112 virtual scoped_refptr<webrtc::VideoTrackInterface>
111 CreateLocalVideoTrack(const std::string& id, 113 CreateLocalVideoTrack(const std::string& id,
112 webrtc::VideoSourceInterface* source) OVERRIDE; 114 webrtc::VideoSourceInterface* source) OVERRIDE;
113 virtual scoped_refptr<webrtc::LocalAudioTrackInterface> 115 virtual scoped_refptr<webrtc::LocalAudioTrackInterface>
114 CreateLocalAudioTrack(const std::string& id, 116 CreateLocalAudioTrack(const std::string& id,
115 webrtc::AudioDeviceModule* audio_device) OVERRIDE; 117 webrtc::AudioDeviceModule* audio_device) OVERRIDE;
116 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 118 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
117 const std::string& type, 119 const std::string& type,
118 const std::string& sdp) OVERRIDE; 120 const std::string& sdp) OVERRIDE;
119 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 121 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
120 const std::string& sdp_mid, 122 const std::string& sdp_mid,
121 int sdp_mline_index, 123 int sdp_mline_index,
122 const std::string& sdp) OVERRIDE; 124 const std::string& sdp) OVERRIDE;
123 125
124 virtual bool EnsurePeerConnectionFactory() OVERRIDE; 126 virtual bool EnsurePeerConnectionFactory() OVERRIDE;
125 virtual bool PeerConnectionFactoryCreated() OVERRIDE; 127 virtual bool PeerConnectionFactoryCreated() OVERRIDE;
126 virtual void SetAudioDeviceSessionId(int session_id) OVERRIDE;
127 128
128 MockVideoSource* last_video_source() { return last_video_source_; } 129 MockVideoSource* last_video_source() { return last_video_source_; }
129 130
130 private: 131 private:
131 bool mock_pc_factory_created_; 132 bool mock_pc_factory_created_;
132 scoped_refptr <MockVideoSource> last_video_source_; 133 scoped_refptr <MockVideoSource> last_video_source_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 135 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory);
135 }; 136 };
136 137
137 } // namespace content 138 } // namespace content
138 139
139 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 140 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698