summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline_impl.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:45:40 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:45:40 +0000
commit0acebfa1194d1b1b7155137ef6ccdf48b3b58258 (patch)
treec4a2fae47763fe06a1f46138715e1fb8e9840245 /media/base/pipeline_impl.cc
parent083a8ceb8ab236e0710c40357409b5dda18f580b (diff)
downloadchromium_src-0acebfa1194d1b1b7155137ef6ccdf48b3b58258.zip
chromium_src-0acebfa1194d1b1b7155137ef6ccdf48b3b58258.tar.gz
chromium_src-0acebfa1194d1b1b7155137ef6ccdf48b3b58258.tar.bz2
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
Diffstat (limited to 'media/base/pipeline_impl.cc')
-rw-r--r--media/base/pipeline_impl.cc12
1 files changed, 12 insertions, 0 deletions
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());