Pass |paint_cb| through media::Renderer::Initialize().
This provides a common path for a media::Renderer implementation to paint video
frames through the render process' CC code. There are several options how this
callback could be used (or not used):
- Call |paint_cb| periodically to render normal video frames.
- Call |paint_cb| with a HOLE_FRAME during initialization and during frame size
change to support hold punching.
- Ignore |paint_cb| if there is no video stream, or if video renderering is
handled by the media::Renderer implementation entirely.
BUG=432796
Review URL: https://codereview.chromium.org/725573003
Cr-Commit-Position: refs/heads/master@{#304074}
diff --git a/media/filters/renderer_impl.h b/media/filters/renderer_impl.h
index 67902d0..734113b8 100644
--- a/media/filters/renderer_impl.h
+++ b/media/filters/renderer_impl.h
@@ -45,9 +45,10 @@
void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
const base::Closure& init_cb,
const StatisticsCB& statistics_cb,
+ const BufferingStateCB& buffering_state_cb,
+ const PaintCB& paint_cb,
const base::Closure& ended_cb,
- const PipelineStatusCB& error_cb,
- const BufferingStateCB& buffering_state_cb) override;
+ const PipelineStatusCB& error_cb) override;
void Flush(const base::Closure& flush_cb) override;
void StartPlayingFrom(base::TimeDelta time) override;
void SetPlaybackRate(float playback_rate) override;
@@ -125,6 +126,7 @@
base::Closure ended_cb_;
PipelineStatusCB error_cb_;
BufferingStateCB buffering_state_cb_;
+ PaintCB paint_cb_;
// Temporary callback used for Initialize() and Flush().
base::Closure init_cb_;