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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 177333003: Add support for midstream audio configuration changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ABS
Patch Set: Back to the original approach, but with working splicer timestamps. Created 6 years, 9 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/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index d5bc21db56af7482244b40c2276eb53d95a568d8..45bdd075a58e31d6c5f266cb5c8b801150cb3c8e 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -38,8 +38,10 @@ class SingleThreadTaskRunner;
namespace media {
class AudioBus;
+class AudioBufferConverter;
class AudioSplicer;
class DecryptingDemuxerStream;
+class AudioHardwareConfig;
class MEDIA_EXPORT AudioRendererImpl
: public AudioRenderer,
@@ -57,7 +59,8 @@ class MEDIA_EXPORT AudioRendererImpl
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
AudioRendererSink* sink,
ScopedVector<AudioDecoder> decoders,
- const SetDecryptorReadyCB& set_decryptor_ready_cb);
+ const SetDecryptorReadyCB& set_decryptor_ready_cb,
+ const AudioHardwareConfig& hardware_params);
virtual ~AudioRendererImpl();
// AudioRenderer implementation.
@@ -182,9 +185,16 @@ class MEDIA_EXPORT AudioRendererImpl
// Called by the AudioBufferStream when a splice buffer is demuxed.
void OnNewSpliceBuffer(base::TimeDelta);
+ // Called by the AudioBufferStream when a config change occurs.
+ void OnConfigChange();
+
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_ptr<AudioSplicer> splicer_;
+ scoped_ptr<AudioBufferConverter> buffer_converter_;
+
+ // Whether or not we expect to handle config changes.
+ bool expecting_config_changes_;
// The sink (destination) for rendered audio. |sink_| must only be accessed
// on |task_runner_|. |sink_| must never be called under |lock_| or else we
@@ -193,7 +203,10 @@ class MEDIA_EXPORT AudioRendererImpl
AudioBufferStream audio_buffer_stream_;
- // AudioParameters constructed during Initialize().
+ // Interface to the hardware audio params.
+ const AudioHardwareConfig& hardware_config_;
DaleCurtis 2014/03/27 06:00:45 storing const& is unusual in CHrome land. I'd chec
rileya (GONE FROM CHROMIUM) 2014/03/27 17:51:40 Changed to a pointer.
+
+ // Cached copy of hardware params from |hardware_config_|.
AudioParameters audio_parameters_;
// Callbacks provided during Initialize().

Powered by Google App Engine
This is Rietveld 408576698