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

Unified Diff: media/blink/webaudiosourceprovider_impl.h

Issue 2533443002: fallback to null sink in WebAudioSourceProvider::Initialize() + UMA stats for device status (Closed)
Patch Set: content unittest fix 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
Index: media/blink/webaudiosourceprovider_impl.h
diff --git a/media/blink/webaudiosourceprovider_impl.h b/media/blink/webaudiosourceprovider_impl.h
index 1ffdd9088c26c6b09663e0d5d3e3c30515f70d51..f021d4810f73e9b6a13b94c260e0376a6dce3148 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
@@ -48,7 +49,8 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
int sample_rate)>;
explicit WebAudioSourceProviderImpl(
DaleCurtis 2016/12/02 18:28:56 Drop explicit now.
o1ka 2016/12/05 09:54:13 Done.
- const scoped_refptr<SwitchableAudioRendererSink>& sink);
+ const scoped_refptr<SwitchableAudioRendererSink>& sink,
DaleCurtis 2016/12/02 18:28:57 Convert to non const& or flip media_log to const&?
o1ka 2016/12/05 09:54:13 Done.
+ scoped_refptr<MediaLog> media_log);
// blink::WebAudioSourceProvider implementation.
void setClient(blink::WebAudioSourceProviderClient* client) override;
@@ -75,9 +77,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 +101,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_;

Powered by Google App Engine
This is Rietveld 408576698