OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ |
7 | 7 |
8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "media/base/pipeline_status.h" |
9 #include "media/base/ranges.h" | 10 #include "media/base/ranges.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTimeRange.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTimeRange.h" |
11 | 13 |
12 namespace webkit_media { | 14 namespace webkit_media { |
13 | 15 |
14 // Platform independent method for converting and rounding floating point | 16 // Platform independent method for converting and rounding floating point |
15 // seconds to an int64 timestamp. | 17 // seconds to an int64 timestamp. |
16 // | 18 // |
17 // Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details. | 19 // Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details. |
18 base::TimeDelta ConvertSecondsToTimestamp(double seconds); | 20 base::TimeDelta ConvertSecondsToTimestamp(double seconds); |
19 | 21 |
20 WebKit::WebTimeRanges ConvertToWebTimeRanges( | 22 WebKit::WebTimeRanges ConvertToWebTimeRanges( |
21 const media::Ranges<base::TimeDelta>& ranges); | 23 const media::Ranges<base::TimeDelta>& ranges); |
22 | 24 |
| 25 WebKit::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( |
| 26 media::PipelineStatus error); |
| 27 |
23 } // namespace webkit_media | 28 } // namespace webkit_media |
24 | 29 |
25 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ | 30 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_UTIL_H_ |
OLD | NEW |