Index: media/renderers/video_renderer_impl.h |
diff --git a/media/renderers/video_renderer_impl.h b/media/renderers/video_renderer_impl.h |
index 3e2440bb6ddeaaf7cba915d1556e25ab9f7254c7..86b365dc5b0c4e46cf664009e01af139cbb09304 100644 |
--- a/media/renderers/video_renderer_impl.h |
+++ b/media/renderers/video_renderer_impl.h |
@@ -63,15 +63,11 @@ class MEDIA_EXPORT VideoRendererImpl |
~VideoRendererImpl() override; |
// VideoRenderer 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 TimeSource::WallClockTimeCB& wall_clock_time_cb, |
- const base::Closure& waiting_for_decryption_key_cb) override; |
+ const PipelineStatusCB& init_cb) override; |
void Flush(const base::Closure& callback) override; |
void StartPlayingFrom(base::TimeDelta timestamp) override; |
void OnTimeStateChanged(bool time_progressing) override; |
@@ -92,6 +88,10 @@ class MEDIA_EXPORT VideoRendererImpl |
private: |
// Callback for |video_frame_stream_| initialization. |
void OnVideoFrameStreamInitialized(bool success); |
xhwang
2016/05/09 18:13:23
empty line here
alokp
2016/05/09 21:31:44
Done.
|
+ // Functions to notify certain events to the RendererClient. |
+ void OnPlaybackEnded(); |
+ void OnStatisticsUpdate(const PipelineStatistics& stats); |
+ void OnWaitingForDecryptionKey(); |
// Callback for |video_frame_stream_| to deliver decoded video frames and |
// report video decoding status. If a frame is available the planes will be |
@@ -187,6 +187,8 @@ class MEDIA_EXPORT VideoRendererImpl |
// Used for accessing data members. |
base::Lock lock_; |
+ RendererClient* client_; |
+ |
// Provides video frames to VideoRendererImpl. |
std::unique_ptr<VideoFrameStream> video_frame_stream_; |
@@ -244,14 +246,8 @@ class MEDIA_EXPORT VideoRendererImpl |
BufferingState buffering_state_; |
// Playback operation callbacks. |
- base::Closure flush_cb_; |
- |
- // Event callbacks. |
PipelineStatusCB init_cb_; |
- StatisticsCB statistics_cb_; |
- BufferingStateCB buffering_state_cb_; |
- base::Closure ended_cb_; |
- PipelineStatusCB error_cb_; |
+ base::Closure flush_cb_; |
TimeSource::WallClockTimeCB wall_clock_time_cb_; |
base::TimeDelta start_timestamp_; |