1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_
8 #include "base/time/time.h"
9 #include "media/base/pipeline_status.h"
10 #include "media/base/ranges.h"
11 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
12 #include "third_party/WebKit/public/platform/WebTimeRange.h"
17 // Platform independent method for converting and rounding floating point
18 // seconds to an int64 timestamp.
20 // Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details.
21 base::TimeDelta
ConvertSecondsToTimestamp(double seconds
);
23 blink::WebTimeRanges
ConvertToWebTimeRanges(
24 const media::Ranges
<base::TimeDelta
>& ranges
);
26 blink::WebMediaPlayer::NetworkState
PipelineErrorToNetworkState(
27 media::PipelineStatus error
);
29 // Report the scheme of Media URIs.
30 void ReportMediaSchemeUma(const GURL
& url
);
32 } // namespace content
34 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_