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

Unified Diff: media/base/download_rate_monitor.h

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/base/download_rate_monitor.h
diff --git a/media/base/download_rate_monitor.h b/media/base/download_rate_monitor.h
index ac88f7ffbed5b58a967cf04df407f4d64f44559c..e5266c8165d9e723d41cc673d9b9b6b7b4302b89 100644
--- a/media/base/download_rate_monitor.h
+++ b/media/base/download_rate_monitor.h
@@ -40,7 +40,9 @@ class MEDIA_EXPORT DownloadRateMonitor {
void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; }
- void set_loaded(bool loaded) { loaded_ = loaded; }
+ void set_local_source(bool local_source) { local_source_ = local_source; }
+
+ void set_streaming(bool streaming) { streaming_ = streaming; }
// Stop monitoring download rate. This does not discard previously learned
// information, but it will no longer factor incoming information into its
@@ -137,8 +139,9 @@ class MEDIA_EXPORT DownloadRateMonitor {
// Amount of bytes buffered.
int64 buffered_bytes_;
- // True if the media file is a fully loaded source, e.g. file:// protocol.
- bool loaded_;
+ // True if the media file is from a local source, e.g. file:// protocol or a
+ // webcam stream.
+ bool local_source_;
// Bitrate of the media file, 0 if unknown.
int bitrate_;
@@ -147,6 +150,9 @@ class MEDIA_EXPORT DownloadRateMonitor {
// otherwise.
bool stopped_;
+ // True if the data source is a streaming source, false otherwise.
+ bool streaming_;
+
DISALLOW_COPY_AND_ASSIGN(DownloadRateMonitor);
};

Powered by Google App Engine
This is Rietveld 408576698