| 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/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "media/base/audio_renderer_sink.h" | 9 #include "media/base/audio_renderer_sink.h" |
| 10 #include "media/base/eme_constants.h" | 10 #include "media/base/eme_constants.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 blink::WebMediaPlayer::NetworkState MEDIA_BLINK_EXPORT | 26 blink::WebMediaPlayer::NetworkState MEDIA_BLINK_EXPORT |
| 27 PipelineErrorToNetworkState(PipelineStatus error); | 27 PipelineErrorToNetworkState(PipelineStatus error); |
| 28 | 28 |
| 29 // Report various metrics to UMA and RAPPOR. | 29 // Report various metrics to UMA and RAPPOR. |
| 30 void MEDIA_BLINK_EXPORT | 30 void MEDIA_BLINK_EXPORT |
| 31 ReportMetrics(blink::WebMediaPlayer::LoadType load_type, | 31 ReportMetrics(blink::WebMediaPlayer::LoadType load_type, |
| 32 const GURL& url, | 32 const GURL& url, |
| 33 const blink::WebSecurityOrigin& security_origin); | 33 const blink::WebSecurityOrigin& security_origin); |
| 34 | 34 |
| 35 // Report metrics about pipeline errors. |
| 36 void MEDIA_BLINK_EXPORT |
| 37 ReportPipelineError(blink::WebMediaPlayer::LoadType load_type, |
| 38 const blink::WebSecurityOrigin& security_origin, |
| 39 PipelineStatus error); |
| 40 |
| 35 // Record a RAPPOR metric for the origin of an HLS playback. | 41 // Record a RAPPOR metric for the origin of an HLS playback. |
| 36 void MEDIA_BLINK_EXPORT RecordOriginOfHLSPlayback(const GURL& origin_url); | 42 void MEDIA_BLINK_EXPORT RecordOriginOfHLSPlayback(const GURL& origin_url); |
| 37 | 43 |
| 38 // TODO(ddorwin): Move this function to an EME-specific file. | 44 // TODO(ddorwin): Move this function to an EME-specific file. |
| 39 // We may also want to move the next one and pass Blink types to WMPI. | 45 // We may also want to move the next one and pass Blink types to WMPI. |
| 40 EmeInitDataType MEDIA_BLINK_EXPORT | 46 EmeInitDataType MEDIA_BLINK_EXPORT |
| 41 ConvertToEmeInitDataType(blink::WebEncryptedMediaInitDataType init_data_type); | 47 ConvertToEmeInitDataType(blink::WebEncryptedMediaInitDataType init_data_type); |
| 42 | 48 |
| 43 blink::WebEncryptedMediaInitDataType MEDIA_BLINK_EXPORT | 49 blink::WebEncryptedMediaInitDataType MEDIA_BLINK_EXPORT |
| 44 ConvertToWebInitDataType(EmeInitDataType init_data_type); | 50 ConvertToWebInitDataType(EmeInitDataType init_data_type); |
| 45 | 51 |
| 46 // Wraps a blink::WebSetSinkIdCallbacks into a media::OutputDeviceStatusCB | 52 // Wraps a blink::WebSetSinkIdCallbacks into a media::OutputDeviceStatusCB |
| 47 // and binds it to the current thread | 53 // and binds it to the current thread |
| 48 OutputDeviceStatusCB MEDIA_BLINK_EXPORT | 54 OutputDeviceStatusCB MEDIA_BLINK_EXPORT |
| 49 ConvertToOutputDeviceStatusCB(blink::WebSetSinkIdCallbacks* web_callbacks); | 55 ConvertToOutputDeviceStatusCB(blink::WebSetSinkIdCallbacks* web_callbacks); |
| 50 | 56 |
| 51 } // namespace media | 57 } // namespace media |
| 52 | 58 |
| 53 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ | 59 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_UTIL_H_ |
| OLD | NEW |