summaryrefslogtreecommitdiff
path: root/chromium/content/renderer/media/webmediaplayer_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/renderer/media/webmediaplayer_util.h')
-rw-r--r--chromium/content/renderer/media/webmediaplayer_util.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chromium/content/renderer/media/webmediaplayer_util.h b/chromium/content/renderer/media/webmediaplayer_util.h
new file mode 100644
index 00000000000..9a06268e629
--- /dev/null
+++ b/chromium/content/renderer/media/webmediaplayer_util.h
@@ -0,0 +1,30 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_
+#define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_
+
+#include "base/time/time.h"
+#include "media/base/pipeline_status.h"
+#include "media/base/ranges.h"
+#include "third_party/WebKit/public/web/WebMediaPlayer.h"
+#include "third_party/WebKit/public/web/WebTimeRange.h"
+
+namespace content {
+
+// 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(double seconds);
+
+WebKit::WebTimeRanges ConvertToWebTimeRanges(
+ const media::Ranges<base::TimeDelta>& ranges);
+
+WebKit::WebMediaPlayer::NetworkState PipelineErrorToNetworkState(
+ media::PipelineStatus error);
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_