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

Side by Side Diff: content/browser/renderer_host/media/audio_input_renderer_host.h

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)
Patch Set: Reworked test again, to make tsan2 happy. Created 3 years, 6 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_renderer_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // AudioInputRendererHost serves audio related requests from audio capturer 5 // AudioInputRendererHost serves audio related requests from audio capturer
6 // which lives inside the render process and provide access to audio hardware. 6 // which lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // Create stream sequence (AudioInputController = AIC): 8 // Create stream sequence (AudioInputController = AIC):
9 // 9 //
10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency -> 10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency ->
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void OnChannelClosing() override; 108 void OnChannelClosing() override;
109 void OnDestruct() const override; 109 void OnDestruct() const override;
110 bool OnMessageReceived(const IPC::Message& message) override; 110 bool OnMessageReceived(const IPC::Message& message) override;
111 111
112 // AudioInputController::EventHandler implementation. 112 // AudioInputController::EventHandler implementation.
113 void OnCreated(media::AudioInputController* controller) override; 113 void OnCreated(media::AudioInputController* controller) override;
114 void OnError(media::AudioInputController* controller, 114 void OnError(media::AudioInputController* controller,
115 media::AudioInputController::ErrorCode error_code) override; 115 media::AudioInputController::ErrorCode error_code) override;
116 void OnLog(media::AudioInputController* controller, 116 void OnLog(media::AudioInputController* controller,
117 const std::string& message) override; 117 const std::string& message) override;
118 void OnMuted(media::AudioInputController* controller, bool is_muted) override;
118 119
119 // Sets the PID renderer. This is used for constructing the debug recording 120 // Sets the PID renderer. This is used for constructing the debug recording
120 // filename. 121 // filename.
121 void set_renderer_pid(int32_t renderer_pid); 122 void set_renderer_pid(int32_t renderer_pid);
122 123
123 protected: 124 protected:
124 ~AudioInputRendererHost() override; 125 ~AudioInputRendererHost() override;
125 126
126 private: 127 private:
127 friend class BrowserThread; 128 friend class BrowserThread;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void DoSendRecordingMessage(media::AudioInputController* controller); 171 void DoSendRecordingMessage(media::AudioInputController* controller);
171 172
172 // Handle error coming from audio stream. 173 // Handle error coming from audio stream.
173 void DoHandleError(media::AudioInputController* controller, 174 void DoHandleError(media::AudioInputController* controller,
174 media::AudioInputController::ErrorCode error_code); 175 media::AudioInputController::ErrorCode error_code);
175 176
176 // Log audio level of captured audio stream. 177 // Log audio level of captured audio stream.
177 void DoLog(media::AudioInputController* controller, 178 void DoLog(media::AudioInputController* controller,
178 const std::string& message); 179 const std::string& message);
179 180
181 // Notify renderer of a change to a stream's muted state.
182 void DoNotifyMutedState(media::AudioInputController* controller,
183 bool is_muted);
184
180 // Send an error message to the renderer. 185 // Send an error message to the renderer.
181 void SendErrorMessage(int stream_id, ErrorCode error_code); 186 void SendErrorMessage(int stream_id, ErrorCode error_code);
182 187
183 // Delete all audio entries and all audio streams. 188 // Delete all audio entries and all audio streams.
184 void DeleteEntries(); 189 void DeleteEntries();
185 190
186 // Closes the stream. The stream is then deleted in DeleteEntry() after it 191 // Closes the stream. The stream is then deleted in DeleteEntry() after it
187 // is closed. 192 // is closed.
188 void CloseAndDeleteStream(AudioEntry* entry); 193 void CloseAndDeleteStream(AudioEntry* entry);
189 194
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 media::UserInputMonitor* const user_input_monitor_; 256 media::UserInputMonitor* const user_input_monitor_;
252 257
253 std::unique_ptr<media::AudioLog> audio_log_; 258 std::unique_ptr<media::AudioLog> audio_log_;
254 259
255 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); 260 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost);
256 }; 261 };
257 262
258 } // namespace content 263 } // namespace content
259 264
260 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ 265 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698