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

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: rebase 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
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..4b0d30514a5b18c9bb30eb8da80c55e64fe846b9 100644
--- a/media/renderers/audio_renderer_impl.h
+++ b/media/renderers/audio_renderer_impl.h
@@ -79,14 +79,10 @@ class MEDIA_EXPORT AudioRendererImpl
std::vector<base::TimeTicks>* wall_clock_times) override;
// AudioRenderer implementation.
- void Initialize(DemuxerStream* stream,
- const PipelineStatusCB& init_cb,
+ void Initialize(RendererClient* client,
+ DemuxerStream* stream,
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;
+ const PipelineStatusCB& init_cb) override;
TimeSource* GetTimeSource() override;
void Flush(const base::Closure& callback) override;
void StartPlaying() override;
@@ -175,6 +171,11 @@ class MEDIA_EXPORT AudioRendererImpl
// Called upon AudioBufferStream initialization, or failure thereof (indicated
// by the value of |success|).
void OnAudioBufferStreamInitialized(bool succes);
xhwang 2016/05/09 18:13:23 Add an empty line here since the comment above onl
alokp 2016/05/09 21:31:44 Done.
+ void OnPlaybackError(PipelineStatus error);
xhwang 2016/05/09 18:13:22 Add comment for this group, e.g. callbacks for the
alokp 2016/05/09 21:31:44 Done.
+ 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.
@@ -215,12 +216,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_;

Powered by Google App Engine
This is Rietveld 408576698