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

Side by Side Diff: content/renderer/media/local_media_stream_audio_source.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_
7 7
8 #include "content/renderer/media/media_stream_audio_source.h" 8 #include "content/renderer/media/media_stream_audio_source.h"
9 #include "media/base/audio_capturer_source.h" 9 #include "media/base/audio_capturer_source.h"
10 10
(...skipping 22 matching lines...) Expand all
33 bool EnsureSourceIsStarted() final; 33 bool EnsureSourceIsStarted() final;
34 void EnsureSourceIsStopped() final; 34 void EnsureSourceIsStopped() final;
35 35
36 // media::AudioCapturerSource::CaptureCallback implementation. 36 // media::AudioCapturerSource::CaptureCallback implementation.
37 void OnCaptureStarted() final; 37 void OnCaptureStarted() final;
38 void Capture(const media::AudioBus* audio_bus, 38 void Capture(const media::AudioBus* audio_bus,
39 int audio_delay_milliseconds, 39 int audio_delay_milliseconds,
40 double volume, 40 double volume,
41 bool key_pressed) final; 41 bool key_pressed) final;
42 void OnCaptureError(const std::string& message) final; 42 void OnCaptureError(const std::string& message) final;
43 void OnCaptureMuted(bool is_muted) final;
43 44
44 // The RenderFrame that will consume the audio data. Used when creating 45 // The RenderFrame that will consume the audio data. Used when creating
45 // AudioInputDevices via the AudioDeviceFactory. 46 // AudioInputDevices via the AudioDeviceFactory.
46 const int consumer_render_frame_id_; 47 const int consumer_render_frame_id_;
47 48
48 // The device created by the AudioDeviceFactory in EnsureSourceIsStarted(). 49 // The device created by the AudioDeviceFactory in EnsureSourceIsStarted().
49 scoped_refptr<media::AudioCapturerSource> source_; 50 scoped_refptr<media::AudioCapturerSource> source_;
50 51
51 // Callback that's called when the audio source has been initialized. 52 // Callback that's called when the audio source has been initialized.
52 ConstraintsCallback started_callback_; 53 ConstraintsCallback started_callback_;
53 54
54 // In debug builds, check that all methods that could cause object graph 55 // In debug builds, check that all methods that could cause object graph
55 // or data flow changes are being called on the main thread. 56 // or data flow changes are being called on the main thread.
56 base::ThreadChecker thread_checker_; 57 base::ThreadChecker thread_checker_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(LocalMediaStreamAudioSource); 59 DISALLOW_COPY_AND_ASSIGN(LocalMediaStreamAudioSource);
59 }; 60 };
60 61
61 } // namespace content 62 } // namespace content
62 63
63 #endif // CONTENT_RENDERER_MEDIA_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 64 #endif // CONTENT_RENDERER_MEDIA_LOCAL_MEDIA_STREAM_AUDIO_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698