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

Unified Diff: media/base/audio_renderer_sink.h

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: Revise comment Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: media/base/audio_renderer_sink.h
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index 4052112bab555b6703c90962422323f5cbeff0e4..b6edaaa967bfe33d5e168f7cf71f286bc0d01c29 100644
--- a/media/base/audio_renderer_sink.h
+++ b/media/base/audio_renderer_sink.h
@@ -66,12 +66,15 @@ class AudioRendererSink
// Returns |true| on success.
virtual bool SetVolume(double volume) = 0;
- // Returns current output device information. If the information is not
+ // Returns current output device id and status with the optimal parameters
+ // given the sink's internal state. These may be the output device's
+ // parameters or the given |preferred_params|. If the information is not
// available yet, this method may block until it becomes available.
// If the sink is not associated with any output device, |device_status| of
// OutputDeviceInfo should be set to OUTPUT_DEVICE_STATUS_ERROR_INTERNAL.
// Must never be called on the IO thread.
- virtual OutputDeviceInfo GetOutputDeviceInfo() = 0;
+ virtual OutputDeviceInfo GetOutputDeviceInfo(
+ const AudioParameters& preferred_params = AudioParameters()) = 0;
o1ka 2017/04/28 09:57:18 What happens in the default case? What if |preferr
// If DCHECKs are enabled, this function returns true if called on rendering
// thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it

Powered by Google App Engine
This is Rietveld 408576698