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

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

Issue 857093002: Set audio format before adding pepper sink to audio track. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix. Created 5 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
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_WEBRTC_AUDIO_CAPTURER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 const std::string& device_id() const { return device_info_.device.id; } 99 const std::string& device_id() const { return device_info_.device.id; }
100 int session_id() const { return device_info_.session_id; } 100 int session_id() const { return device_info_.session_id; }
101 101
102 // Stops recording audio. This method will empty its track lists since 102 // Stops recording audio. This method will empty its track lists since
103 // stopping the capturer will implicitly invalidate all its tracks. 103 // stopping the capturer will implicitly invalidate all its tracks.
104 // This method is exposed to the public because the MediaStreamAudioSource can 104 // This method is exposed to the public because the MediaStreamAudioSource can
105 // call Stop() 105 // call Stop()
106 void Stop(); 106 void Stop();
107 107
108 // Returns the output format.
109 // Called on the main render thread.
110 media::AudioParameters GetOutputFormat() const;
111
108 // Used by the unittests to inject their own source to the capturer. 112 // Used by the unittests to inject their own source to the capturer.
109 void SetCapturerSourceForTesting( 113 void SetCapturerSourceForTesting(
110 const scoped_refptr<media::AudioCapturerSource>& source, 114 const scoped_refptr<media::AudioCapturerSource>& source,
111 media::AudioParameters params); 115 media::AudioParameters params);
112 116
113 protected: 117 protected:
114 friend class base::RefCountedThreadSafe<WebRtcAudioCapturer>; 118 friend class base::RefCountedThreadSafe<WebRtcAudioCapturer>;
115 ~WebRtcAudioCapturer() override; 119 ~WebRtcAudioCapturer() override;
116 120
117 private: 121 private:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // guaranteed to exist as long as a WebRtcLocalAudioTrack is connected to this 206 // guaranteed to exist as long as a WebRtcLocalAudioTrack is connected to this
203 // WebRtcAudioCapturer. 207 // WebRtcAudioCapturer.
204 MediaStreamAudioSource* const audio_source_; 208 MediaStreamAudioSource* const audio_source_;
205 209
206 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); 210 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer);
207 }; 211 };
208 212
209 } // namespace content 213 } // namespace content
210 214
211 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ 215 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_audio_sink.cc ('k') | content/renderer/media/webrtc_audio_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698