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 #include "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
23 #include "content/public/browser/notification_types.h" | 23 #include "content/public/browser/notification_types.h" |
24 #include "content/public/browser/render_frame_host.h" | 24 #include "content/public/browser/render_frame_host.h" |
25 #include "content/public/browser/render_process_host.h" | 25 #include "content/public/browser/render_process_host.h" |
26 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
27 #include "content/public/browser/web_ui.h" | 27 #include "content/public/browser/web_ui.h" |
28 #include "media/base/audio_parameters.h" | 28 #include "media/base/audio_parameters.h" |
29 #include "media/base/media_log_event.h" | 29 #include "media/base/media_log_event.h" |
30 #include "media/filters/gpu_video_decoder.h" | 30 #include "media/filters/gpu_video_decoder.h" |
31 | 31 |
32 #if !defined(OS_ANDROID) | 32 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
33 #include "media/filters/decrypting_video_decoder.h" | 33 #include "media/filters/decrypting_video_decoder.h" |
34 #endif | 34 #endif |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 base::string16 SerializeUpdate(const std::string& function, | 38 base::string16 SerializeUpdate(const std::string& function, |
39 const base::Value* value) { | 39 const base::Value* value) { |
40 return content::WebUI::GetJavascriptCall( | 40 return content::WebUI::GetJavascriptCall( |
41 function, std::vector<const base::Value*>(1, value)); | 41 function, std::vector<const base::Value*>(1, value)); |
42 } | 42 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 if (player_info.video_codec_name == "vp8") { | 480 if (player_info.video_codec_name == "vp8") { |
481 uma_name += "VP8."; | 481 uma_name += "VP8."; |
482 } else if (player_info.video_codec_name == "vp9") { | 482 } else if (player_info.video_codec_name == "vp9") { |
483 uma_name += "VP9."; | 483 uma_name += "VP9."; |
484 } else if (player_info.video_codec_name == "h264") { | 484 } else if (player_info.video_codec_name == "h264") { |
485 uma_name += "H264."; | 485 uma_name += "H264."; |
486 } else { | 486 } else { |
487 return uma_name + "Other"; | 487 return uma_name + "Other"; |
488 } | 488 } |
489 | 489 |
490 #if !defined(OS_ANDROID) | 490 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
491 if (player_info.video_decoder == | 491 if (player_info.video_decoder == |
492 media::DecryptingVideoDecoder::kDecoderName) { | 492 media::DecryptingVideoDecoder::kDecoderName) { |
493 return uma_name + "DVD"; | 493 return uma_name + "DVD"; |
494 } | 494 } |
495 #endif | 495 #endif |
496 | 496 |
497 if (player_info.video_dds) { | 497 if (player_info.video_dds) { |
498 uma_name += "DDS."; | 498 uma_name += "DDS."; |
499 } | 499 } |
500 | 500 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); | 823 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); |
824 existing_dict->MergeDictionary(value); | 824 existing_dict->MergeDictionary(value); |
825 } | 825 } |
826 } | 826 } |
827 | 827 |
828 if (CanUpdate()) | 828 if (CanUpdate()) |
829 SendUpdate(SerializeUpdate(function, value)); | 829 SendUpdate(SerializeUpdate(function, value)); |
830 } | 830 } |
831 | 831 |
832 } // namespace content | 832 } // namespace content |
OLD | NEW |