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

Unified Diff: media/base/pipeline.h

Issue 10854151: Allow transitioning to HAVE_METADATA before pipeline initialization completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | media/base/pipeline.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.h
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 91b6c5ea958d7e7154b161e91e723c9dee5d8c0e..84cf55182b92baf75f832d7b63caafd1e794fb73 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -97,6 +97,15 @@ class MEDIA_EXPORT Pipeline
: public base::RefCountedThreadSafe<Pipeline>,
public DemuxerHost {
public:
+
+ // Current buffering state in terms of HTMLMediaElement.readyState values.
+ enum ReadyState {
+ HaveMetadata,
Ami GONE FROM CHROMIUM 2012/08/15 18:00:08 kChromiumStyle
acolwell GONE FROM CHROMIUM 2012/08/15 23:21:15 Done.
+ HaveEnoughData,
+ };
+
+ typedef base::Callback<void(ReadyState)> ReadyStateCB;
+
// Constructs a media pipeline that will execute on |message_loop|.
Pipeline(MessageLoop* message_loop, MediaLog* media_log);
@@ -113,7 +122,8 @@ class MEDIA_EXPORT Pipeline
void Start(scoped_ptr<FilterCollection> filter_collection,
const PipelineStatusCB& ended_cb,
const PipelineStatusCB& error_cb,
- const PipelineStatusCB& start_cb);
+ const PipelineStatusCB& start_cb,
+ const ReadyStateCB& ready_state_cb);
scherkus (not reviewing) 2012/08/15 19:53:43 docs?
acolwell GONE FROM CHROMIUM 2012/08/15 23:21:15 Done.
// Asynchronously stops the pipeline, executing |stop_cb| when the pipeline
// teardown has completed.
@@ -295,7 +305,8 @@ class MEDIA_EXPORT Pipeline
void StartTask(scoped_ptr<FilterCollection> filter_collection,
const PipelineStatusCB& ended_cb,
const PipelineStatusCB& error_cb,
- const PipelineStatusCB& start_cb);
+ const PipelineStatusCB& start_cb,
+ const ReadyStateCB& ready_state_cb);
// InitializeTask() performs initialization in multiple passes. It is executed
// as a result of calling Start() or InitializationComplete() that advances
@@ -493,6 +504,7 @@ class MEDIA_EXPORT Pipeline
base::Closure stop_cb_;
PipelineStatusCB ended_cb_;
PipelineStatusCB error_cb_;
+ ReadyStateCB ready_state_cb_;
// Audio renderer reference used for setting the volume and determining
// when playback has finished.
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | media/base/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698