| 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 "media/base/audio_decoder_config.h" | 5 #include "media/base/audio_decoder_config.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/audio/sample_rates.h" | 10 #include "media/audio/sample_rates.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return s.str(); | 121 return s.str(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // These names come from src/third_party/ffmpeg/libavcodec/codec_desc.c | 124 // These names come from src/third_party/ffmpeg/libavcodec/codec_desc.c |
| 125 std::string AudioDecoderConfig::GetHumanReadableCodecName() const { | 125 std::string AudioDecoderConfig::GetHumanReadableCodecName() const { |
| 126 switch (codec()) { | 126 switch (codec()) { |
| 127 case kUnknownAudioCodec: | 127 case kUnknownAudioCodec: |
| 128 return "unknown"; | 128 return "unknown"; |
| 129 case kCodecAAC: | 129 case kCodecAAC: |
| 130 return "aac"; | 130 return "aac"; |
| 131 case kCodecAC3: |
| 132 return "ac3"; |
| 133 case kCodecEAC3: |
| 134 return "eac3"; |
| 131 case kCodecMP3: | 135 case kCodecMP3: |
| 132 return "mp3"; | 136 return "mp3"; |
| 133 case kCodecPCM: | 137 case kCodecPCM: |
| 134 case kCodecPCM_S16BE: | 138 case kCodecPCM_S16BE: |
| 135 case kCodecPCM_S24BE: | 139 case kCodecPCM_S24BE: |
| 136 return "pcm"; | 140 return "pcm"; |
| 137 case kCodecVorbis: | 141 case kCodecVorbis: |
| 138 return "vorbis"; | 142 return "vorbis"; |
| 139 case kCodecFLAC: | 143 case kCodecFLAC: |
| 140 return "flac"; | 144 return "flac"; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 151 case kCodecOpus: | 155 case kCodecOpus: |
| 152 return "opus"; | 156 return "opus"; |
| 153 case kCodecALAC: | 157 case kCodecALAC: |
| 154 return "alac"; | 158 return "alac"; |
| 155 } | 159 } |
| 156 NOTREACHED(); | 160 NOTREACHED(); |
| 157 return ""; | 161 return ""; |
| 158 } | 162 } |
| 159 | 163 |
| 160 } // namespace media | 164 } // namespace media |
| OLD | NEW |