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

Unified Diff: media/base/pipeline_impl.h

Issue 2782004: Added checks to GetBufferedTime() to cap at the media's duration (Closed)
Patch Set: Fixed nits from code review Created 10 years, 6 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_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.h
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 836715b35aabb5423c7c802de4c1791ad5f37481..327b64d2223c8f71abd0a35f662607e06138e55c 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -18,6 +18,7 @@
#include "media/base/clock_impl.h"
#include "media/base/filter_host.h"
#include "media/base/pipeline.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
namespace media {
@@ -385,7 +386,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
// Keep track of the maximum buffered position so the buffering appears
// smooth.
// TODO(vrk): This is a hack.
- double max_buffered_time_;
+ base::TimeDelta max_buffered_time_;
// Filter factory as passed in by Start().
scoped_refptr<FilterFactory> filter_factory_;
@@ -412,6 +413,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
typedef std::vector<base::Thread*> FilterThreadVector;
FilterThreadVector filter_threads_;
+ FRIEND_TEST(PipelineImplTest, GetBufferedTime);
DISALLOW_COPY_AND_ASSIGN(PipelineImpl);
};
« no previous file with comments | « no previous file | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698