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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix media/event-attributes.html Created 9 years, 1 month 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/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 0c63fde53f090fb6e2f52ca8ba2d4aec1578eb5c..57a098d6899ba4dcff4e5b118da5644498a49304 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -287,7 +287,8 @@ FFmpegDemuxer::FFmpegDemuxer(MessageLoop* message_loop)
max_duration_(base::TimeDelta::FromMicroseconds(-1)),
deferred_status_(PIPELINE_OK),
first_seek_hack_(true),
- start_time_(kNoTimestamp) {
+ start_time_(kNoTimestamp),
+ local_source_(false) {
DCHECK(message_loop_);
}
@@ -539,6 +540,8 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
if (bitrate > 0)
data_source_->SetBitrate(bitrate);
+ local_source_ = data_source_->IsLocalSource();
+
callback.Run(PIPELINE_OK);
}
@@ -571,6 +574,10 @@ int FFmpegDemuxer::GetBitrate() {
return 0;
}
+bool FFmpegDemuxer::IsLocalSource() {
+ return local_source_;
+}
+
void FFmpegDemuxer::SeekTask(base::TimeDelta time, const FilterStatusCB& cb) {
DCHECK_EQ(MessageLoop::current(), message_loop_);

Powered by Google App Engine
This is Rietveld 408576698