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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10073016: Upstream WebMediaPlayerAndroid as WebKit::WebMediaPlayer implementation on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small changes to address comments Created 8 years, 8 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 | « webkit/media/webkit_media.gypi ('k') | webkit/media/webmediaplayer_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index e5afb5d04cf465be009f49053a6fa792c62447df..afb436b6ec25c7dff122c7211ffdcfd7b8a27a13 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -32,6 +32,7 @@
#include "webkit/media/filter_helpers.h"
#include "webkit/media/webmediaplayer_delegate.h"
#include "webkit/media/webmediaplayer_proxy.h"
+#include "webkit/media/webmediaplayer_util.h"
#include "webkit/media/webvideoframe_impl.h"
using WebKit::WebCanvas;
@@ -71,25 +72,6 @@ const int kPlayerExtraMemory = 1024 * 1024;
const float kMinRate = 0.0625f;
const float kMaxRate = 16.0f;
-// Platform independent method for converting and rounding floating point
-// seconds to an int64 timestamp.
-//
-// Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details.
-base::TimeDelta ConvertSecondsToTimestamp(float seconds) {
- float microseconds = seconds * base::Time::kMicrosecondsPerSecond;
- float integer = ceilf(microseconds);
- float difference = integer - microseconds;
-
- // Round down if difference is large enough.
- if ((microseconds > 0 && difference > 0.5f) ||
- (microseconds <= 0 && difference >= 0.5f)) {
- integer -= 1.0f;
- }
-
- // Now we can safely cast to int64 microseconds.
- return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer));
-}
-
} // namespace
namespace webkit_media {
« no previous file with comments | « webkit/media/webkit_media.gypi ('k') | webkit/media/webmediaplayer_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698