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

Unified Diff: media/renderers/audio_renderer_impl.h

Issue 1955843002: Move Renderer permanent callbacks into RendererClient interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 7 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
« no previous file with comments | « media/mojo/services/mojo_renderer_service.cc ('k') | media/renderers/audio_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.h
diff --git a/media/renderers/audio_renderer_impl.h b/media/renderers/audio_renderer_impl.h
index f6d22237d08833a888c95049796d0e3fe2ef1b92..3412c0cb0e65dc49e2393b1010e22e530970d444 100644
--- a/media/renderers/audio_renderer_impl.h
+++ b/media/renderers/audio_renderer_impl.h
@@ -80,13 +80,9 @@ class MEDIA_EXPORT AudioRendererImpl
// AudioRenderer implementation.
void Initialize(DemuxerStream* stream,
- const PipelineStatusCB& init_cb,
CdmContext* cdm_context,
- const StatisticsCB& statistics_cb,
- const BufferingStateCB& buffering_state_cb,
- const base::Closure& ended_cb,
- const PipelineStatusCB& error_cb,
- const base::Closure& waiting_for_decryption_key_cb) override;
+ RendererClient* client,
+ const PipelineStatusCB& init_cb) override;
TimeSource* GetTimeSource() override;
void Flush(const base::Closure& callback) override;
void StartPlaying() override;
@@ -176,6 +172,13 @@ class MEDIA_EXPORT AudioRendererImpl
// by the value of |success|).
void OnAudioBufferStreamInitialized(bool succes);
+ // Callback functions to be called on |client_|.
+ void OnPlaybackError(PipelineStatus error);
+ void OnPlaybackEnded();
+ void OnStatisticsUpdate(const PipelineStatistics& stats);
+ void OnBufferingStateChange(BufferingState state);
+ void OnWaitingForDecryptionKey();
+
// Used to initiate the flush operation once all pending reads have
// completed.
void DoFlush_Locked();
@@ -215,12 +218,10 @@ class MEDIA_EXPORT AudioRendererImpl
// Cached copy of hardware params from |hardware_config_|.
AudioParameters audio_parameters_;
- // Callbacks provided during Initialize().
+ RendererClient* client_;
+
+ // Callback provided during Initialize().
PipelineStatusCB init_cb_;
- BufferingStateCB buffering_state_cb_;
- base::Closure ended_cb_;
- PipelineStatusCB error_cb_;
- StatisticsCB statistics_cb_;
// Callback provided to Flush().
base::Closure flush_cb_;
« no previous file with comments | « media/mojo/services/mojo_renderer_service.cc ('k') | media/renderers/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698