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

Unified Diff: media/filters/pipeline_controller.cc

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/filters/pipeline_controller.cc
diff --git a/media/filters/pipeline_controller.cc b/media/filters/pipeline_controller.cc
index 4c7a896efea2b4b88c1148169ae81d7a78ea08e3..9444f3b1a653b7953bbba42ba787749d5fb032f0 100644
--- a/media/filters/pipeline_controller.cc
+++ b/media/filters/pipeline_controller.cc
@@ -36,16 +36,10 @@ PipelineController::~PipelineController() {
// TODO(sandersd): If there is a pending suspend, don't call pipeline_.Start()
// until Resume().
-void PipelineController::Start(
- Demuxer* demuxer,
- bool is_streaming,
- bool is_static,
- const base::Closure& ended_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) {
+void PipelineController::Start(Demuxer* demuxer,
+ Pipeline::Client* client,
+ bool is_streaming,
+ bool is_static) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(state_ == State::CREATED);
DCHECK(demuxer);
@@ -58,13 +52,10 @@ void PipelineController::Start(
demuxer_ = demuxer;
is_streaming_ = is_streaming;
is_static_ = is_static;
- pipeline_->Start(
- demuxer, renderer_factory_cb_.Run(), ended_cb,
- BindToCurrentLoop(error_cb_),
- BindToCurrentLoop(base::Bind(&PipelineController::OnPipelineStatus,
- weak_factory_.GetWeakPtr(), State::PLAYING)),
- metadata_cb, buffering_state_cb, duration_change_cb, add_text_track_cb,
- waiting_for_decryption_key_cb);
+ pipeline_->Start(demuxer, renderer_factory_cb_.Run(), client,
+ BindToCurrentLoop(
+ base::Bind(&PipelineController::OnPipelineStatus,
+ weak_factory_.GetWeakPtr(), State::PLAYING)));
}
void PipelineController::Seek(base::TimeDelta time, bool time_updated) {

Powered by Google App Engine
This is Rietveld 408576698