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

Side by Side Diff: content/renderer/media/external_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_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_EXTERNAL_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 9
10 #include "media/base/audio_capturer_source.h" 10 #include "media/base/audio_capturer_source.h"
(...skipping 22 matching lines...) Expand all
33 // MediaStreamAudioSource implementation. 33 // MediaStreamAudioSource implementation.
34 bool EnsureSourceIsStarted() final; 34 bool EnsureSourceIsStarted() final;
35 void EnsureSourceIsStopped() final; 35 void EnsureSourceIsStopped() final;
36 36
37 // media::AudioCapturerSource::CaptureCallback implementation. 37 // media::AudioCapturerSource::CaptureCallback implementation.
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 external source provided to the constructor. 45 // The external source provided to the constructor.
45 scoped_refptr<media::AudioCapturerSource> source_; 46 scoped_refptr<media::AudioCapturerSource> source_;
46 47
47 // In debug builds, check that all methods that could cause object graph 48 // In debug builds, check that all methods that could cause object graph
48 // or data flow changes are being called on the main thread. 49 // or data flow changes are being called on the main thread.
49 base::ThreadChecker thread_checker_; 50 base::ThreadChecker thread_checker_;
50 51
51 // True once the source has been started successfully. 52 // True once the source has been started successfully.
52 bool was_started_; 53 bool was_started_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(ExternalMediaStreamAudioSource); 55 DISALLOW_COPY_AND_ASSIGN(ExternalMediaStreamAudioSource);
55 }; 56 };
56 57
57 } // namespace content 58 } // namespace content
58 59
59 #endif // CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 60 #endif // CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/audio_input_message_filter.cc ('k') | content/renderer/media/external_media_stream_audio_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698