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

Unified Diff: media/blink/webaudiosourceprovider_impl.h

Issue 2533443002: fallback to null sink in WebAudioSourceProvider::Initialize() + UMA stats for device status (Closed)
Patch Set: review comments addressed Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/output_device_info.h ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webaudiosourceprovider_impl.h
diff --git a/media/blink/webaudiosourceprovider_impl.h b/media/blink/webaudiosourceprovider_impl.h
index 1ffdd9088c26c6b09663e0d5d3e3c30515f70d51..aa4359547d86cc900dc0018d13b936b290db97b8 100644
--- a/media/blink/webaudiosourceprovider_impl.h
+++ b/media/blink/webaudiosourceprovider_impl.h
@@ -23,6 +23,7 @@ class WebAudioSourceProviderClient;
}
namespace media {
+class MediaLog;
// WebAudioSourceProviderImpl is either one of two things (but not both):
// - a connection between a RestartableAudioRendererSink (the |sink_|) passed in
@@ -47,8 +48,8 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
uint32_t frames_delayed,
int sample_rate)>;
- explicit WebAudioSourceProviderImpl(
- const scoped_refptr<SwitchableAudioRendererSink>& sink);
+ WebAudioSourceProviderImpl(scoped_refptr<SwitchableAudioRendererSink> sink,
+ scoped_refptr<MediaLog> media_log);
// blink::WebAudioSourceProvider implementation.
void setClient(blink::WebAudioSourceProviderClient* client) override;
@@ -75,9 +76,12 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
int RenderForTesting(AudioBus* audio_bus);
+ protected:
+ virtual scoped_refptr<SwitchableAudioRendererSink> CreateFallbackSink();
+ ~WebAudioSourceProviderImpl() override;
+
private:
friend class WebAudioSourceProviderImplTest;
- ~WebAudioSourceProviderImpl() override;
// Calls setFormat() on |client_| from the Blink renderer thread.
void OnSetFormat();
@@ -96,13 +100,15 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
// Where audio ends up unless overridden by |client_|.
base::Lock sink_lock_;
- const scoped_refptr<SwitchableAudioRendererSink> sink_;
+ scoped_refptr<SwitchableAudioRendererSink> sink_;
std::unique_ptr<AudioBus> bus_wrapper_;
// An inner class acting as a T filter where actual data can be tapped.
class TeeFilter;
const std::unique_ptr<TeeFilter> tee_filter_;
+ const scoped_refptr<MediaLog> media_log_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_;
« no previous file with comments | « media/base/output_device_info.h ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698