From 0acebfa1194d1b1b7155137ef6ccdf48b3b58258 Mon Sep 17 00:00:00 2001 From: "ajwong@chromium.org" Date: Fri, 21 Aug 2009 22:45:40 +0000 Subject: Correct network state and ready state reporting. For network state, make it return "loading" for everything that's not a file source since our cache does not yet reliably support caching the full media w/o need for a network. For ready state, correctly handle seeks to drop from HaveEnoughData down to HaveMetaData until the seek completes. Also implement the seeking() function. BUG=18975 TEST=none Review URL: http://codereview.chromium.org/165432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24036 0039d316-1c4b-4281-b951-d872f2087c98 --- media/base/pipeline_impl.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'media/base/pipeline_impl.cc') diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index 270347c..49ebe4a 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc @@ -262,6 +262,11 @@ bool PipelineImpl::IsStreaming() const { return streaming_; } +bool PipelineImpl::IsLoaded() const { + AutoLock auto_lock(lock_); + return loaded_; +} + PipelineError PipelineImpl::GetError() const { AutoLock auto_lock(lock_); return error_; @@ -287,6 +292,7 @@ void PipelineImpl::ResetState() { buffered_time_ = kZero; buffered_bytes_ = 0; streaming_ = false; + loaded_ = false; total_bytes_ = 0; video_width_ = 0; video_height_ = 0; @@ -405,6 +411,12 @@ void PipelineImpl::NotifyEnded() { NewRunnableMethod(this, &PipelineImpl::NotifyEndedTask)); } +void PipelineImpl::SetLoaded(bool loaded) { + DCHECK(IsRunning()); + AutoLock auto_lock(lock_); + loaded_ = loaded; +} + void PipelineImpl::BroadcastMessage(FilterMessage message) { DCHECK(IsRunning()); -- cgit v1.1