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

Unified Diff: media/filters/pipeline_controller.cc

Issue 2564253002: Notify HTMLMediaElement when media pipeline init has finished
Patch Set: Created 4 years 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
« no previous file with comments | « media/filters/pipeline_controller.h ('k') | media/filters/pipeline_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_controller.cc
diff --git a/media/filters/pipeline_controller.cc b/media/filters/pipeline_controller.cc
index 2055afb9dc08cdd3a3879434301051a1b84167c8..4bbc3b064053d698137761a016dbf2283e5d954e 100644
--- a/media/filters/pipeline_controller.cc
+++ b/media/filters/pipeline_controller.cc
@@ -12,17 +12,20 @@ namespace media {
PipelineController::PipelineController(
Pipeline* pipeline,
const RendererFactoryCB& renderer_factory_cb,
+ const PipelineStatusCB& start_done_cb,
const SeekedCB& seeked_cb,
const SuspendedCB& suspended_cb,
const PipelineStatusCB& error_cb)
: pipeline_(pipeline),
renderer_factory_cb_(renderer_factory_cb),
+ start_done_cb_(start_done_cb),
seeked_cb_(seeked_cb),
suspended_cb_(suspended_cb),
error_cb_(error_cb),
weak_factory_(this) {
DCHECK(pipeline_);
DCHECK(!renderer_factory_cb_.is_null());
+ DCHECK(!start_done_cb.is_null());
DCHECK(!seeked_cb_.is_null());
DCHECK(!suspended_cb_.is_null());
DCHECK(!error_cb_.is_null());
@@ -118,6 +121,10 @@ void PipelineController::OnPipelineStatus(State state,
PipelineStatus pipeline_status) {
DCHECK(thread_checker_.CalledOnValidThread());
+ if (state_ == State::STARTING) {
+ start_done_cb_.Run(pipeline_status);
+ }
+
if (pipeline_status != PIPELINE_OK) {
error_cb_.Run(pipeline_status);
return;
« no previous file with comments | « media/filters/pipeline_controller.h ('k') | media/filters/pipeline_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698