| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 return ret; | 75 return ret; |
| 76 } | 76 } |
| 77 | 77 |
| 78 std::string FormatToString(media::AudioParameters::Format format) { | 78 std::string FormatToString(media::AudioParameters::Format format) { |
| 79 switch (format) { | 79 switch (format) { |
| 80 case media::AudioParameters::AUDIO_PCM_LINEAR: | 80 case media::AudioParameters::AUDIO_PCM_LINEAR: |
| 81 return "pcm_linear"; | 81 return "pcm_linear"; |
| 82 case media::AudioParameters::AUDIO_PCM_LOW_LATENCY: | 82 case media::AudioParameters::AUDIO_PCM_LOW_LATENCY: |
| 83 return "pcm_low_latency"; | 83 return "pcm_low_latency"; |
| 84 case media::AudioParameters::AUDIO_RAW_AC3: |
| 85 return "ac3"; |
| 86 case media::AudioParameters::AUDIO_RAW_EAC3: |
| 87 return "eac3"; |
| 84 case media::AudioParameters::AUDIO_FAKE: | 88 case media::AudioParameters::AUDIO_FAKE: |
| 85 return "fake"; | 89 return "fake"; |
| 86 } | 90 } |
| 87 | 91 |
| 88 NOTREACHED(); | 92 NOTREACHED(); |
| 89 return "unknown"; | 93 return "unknown"; |
| 90 } | 94 } |
| 91 | 95 |
| 92 const char kAudioLogStatusKey[] = "status"; | 96 const char kAudioLogStatusKey[] = "status"; |
| 93 const char kAudioLogUpdateFunction[] = "media.updateAudioComponent"; | 97 const char kAudioLogUpdateFunction[] = "media.updateAudioComponent"; |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); | 815 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); |
| 812 existing_dict->MergeDictionary(value); | 816 existing_dict->MergeDictionary(value); |
| 813 } | 817 } |
| 814 } | 818 } |
| 815 | 819 |
| 816 if (CanUpdate()) | 820 if (CanUpdate()) |
| 817 SendUpdate(SerializeUpdate(function, value)); | 821 SendUpdate(SerializeUpdate(function, value)); |
| 818 } | 822 } |
| 819 | 823 |
| 820 } // namespace content | 824 } // namespace content |
| OLD | NEW |