OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ |
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/audio_renderer_sink.h" | 10 #include "media/base/audio_renderer_sink.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 ConvertToWebTimeRanges(const Ranges<base::TimeDelta>& ranges); | 27 ConvertToWebTimeRanges(const Ranges<base::TimeDelta>& ranges); |
28 | 28 |
29 blink::WebMediaPlayer::NetworkState MEDIA_BLINK_EXPORT | 29 blink::WebMediaPlayer::NetworkState MEDIA_BLINK_EXPORT |
30 PipelineErrorToNetworkState(PipelineStatus error); | 30 PipelineErrorToNetworkState(PipelineStatus error); |
31 | 31 |
32 // Report various metrics to UMA and RAPPOR. | 32 // Report various metrics to UMA and RAPPOR. |
33 void MEDIA_BLINK_EXPORT | 33 void MEDIA_BLINK_EXPORT |
34 ReportMetrics(blink::WebMediaPlayer::LoadType load_type, | 34 ReportMetrics(blink::WebMediaPlayer::LoadType load_type, |
35 const GURL& url, | 35 const GURL& url, |
36 const blink::WebSecurityOrigin& security_origin, | 36 const blink::WebSecurityOrigin& security_origin, |
37 scoped_refptr<MediaLog> media_log); | 37 MediaLog* media_log); |
38 | 38 |
39 // Report metrics about pipeline errors. | 39 // Report metrics about pipeline errors. |
40 void MEDIA_BLINK_EXPORT | 40 void MEDIA_BLINK_EXPORT |
41 ReportPipelineError(blink::WebMediaPlayer::LoadType load_type, | 41 ReportPipelineError(blink::WebMediaPlayer::LoadType load_type, |
42 PipelineStatus error, | 42 PipelineStatus error, |
43 scoped_refptr<MediaLog> media_log); | 43 MediaLog* media_log); |
44 | 44 |
45 // TODO(ddorwin): Move this function to an EME-specific file. | 45 // TODO(ddorwin): Move this function to an EME-specific file. |
46 // We may also want to move the next one and pass Blink types to WMPI. | 46 // We may also want to move the next one and pass Blink types to WMPI. |
47 EmeInitDataType MEDIA_BLINK_EXPORT | 47 EmeInitDataType MEDIA_BLINK_EXPORT |
48 ConvertToEmeInitDataType(blink::WebEncryptedMediaInitDataType init_data_type); | 48 ConvertToEmeInitDataType(blink::WebEncryptedMediaInitDataType init_data_type); |
49 | 49 |
50 blink::WebEncryptedMediaInitDataType MEDIA_BLINK_EXPORT | 50 blink::WebEncryptedMediaInitDataType MEDIA_BLINK_EXPORT |
51 ConvertToWebInitDataType(EmeInitDataType init_data_type); | 51 ConvertToWebInitDataType(EmeInitDataType init_data_type); |
52 | 52 |
53 // Wraps a blink::WebSetSinkIdCallbacks into a media::OutputDeviceStatusCB | 53 // Wraps a blink::WebSetSinkIdCallbacks into a media::OutputDeviceStatusCB |
54 // and binds it to the current thread | 54 // and binds it to the current thread |
55 OutputDeviceStatusCB MEDIA_BLINK_EXPORT | 55 OutputDeviceStatusCB MEDIA_BLINK_EXPORT |
56 ConvertToOutputDeviceStatusCB(blink::WebSetSinkIdCallbacks* web_callbacks); | 56 ConvertToOutputDeviceStatusCB(blink::WebSetSinkIdCallbacks* web_callbacks); |
57 | 57 |
58 } // namespace media | 58 } // namespace media |
59 | 59 |
60 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ | 60 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ |
OLD | NEW |