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

Unified Diff: media/base/pipeline_impl.h

Issue 1904793002: Move Pipeline permanent callbacks into Pipeline::Client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 8 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/base/pipeline_impl.h
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 7a6da3a7b5115974ad31e0ddf7066c0b53b1a4b4..fc4948efcc5aa40913d343d0d5259fac2b1603c1 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -85,14 +85,8 @@ class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost {
// Pipeline implementation.
void Start(Demuxer* demuxer,
scoped_ptr<Renderer> renderer,
- const base::Closure& ended_cb,
- const PipelineStatusCB& error_cb,
- const PipelineStatusCB& seek_cb,
- const PipelineMetadataCB& metadata_cb,
- const BufferingStateCB& buffering_state_cb,
- const base::Closure& duration_change_cb,
- const AddTextTrackCB& add_text_track_cb,
- const base::Closure& waiting_for_decryption_key_cb) override;
+ Client* client,
xhwang 2016/04/25 22:49:45 Document that |client| call be called on any threa
+ const PipelineStatusCB& seek_cb) override;
void Stop(const base::Closure& stop_cb) override;
void Seek(base::TimeDelta time, const PipelineStatusCB& seek_cb) override;
bool IsRunning() const override;
@@ -156,6 +150,9 @@ class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost {
// Callback executed by filters to update statistics.
void OnUpdateStatistics(const PipelineStatistics& stats_delta);
+ // Callback executed by renderer when waiting for decryption key.
+ void OnWaitingForDecryptionKey();
+
// The following "task" methods correspond to the public methods, but these
// methods are run as the result of posting a task to the Pipeline's
// task runner.
@@ -298,15 +295,6 @@ class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost {
// Temporary callback used for Suspend().
PipelineStatusCB suspend_cb_;
- // Permanent callbacks passed in via Start().
- base::Closure ended_cb_;
- PipelineStatusCB error_cb_;
- PipelineMetadataCB metadata_cb_;
- BufferingStateCB buffering_state_cb_;
- base::Closure duration_change_cb_;
- AddTextTrackCB add_text_track_cb_;
- base::Closure waiting_for_decryption_key_cb_;
-
// Holds the initialized demuxer. Used for seeking. Owned by client.
Demuxer* demuxer_;
@@ -315,6 +303,9 @@ class MEDIA_EXPORT PipelineImpl : public Pipeline, public DemuxerHost {
scoped_ptr<Renderer> renderer_;
scoped_ptr<TextRenderer> text_renderer_;
+ // Holds the client passed on Start().
+ Client* client_;
+
PipelineStatistics statistics_;
scoped_ptr<SerialRunner> pending_callbacks_;

Powered by Google App Engine
This is Rietveld 408576698