Chromium Code Reviews| 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 "media/base/limits.h" | 8 #include "media/base/limits.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 return s.str(); | 93 return s.str(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // These names come from src/third_party/ffmpeg/libavcodec/codec_desc.c | 96 // These names come from src/third_party/ffmpeg/libavcodec/codec_desc.c |
| 97 std::string AudioDecoderConfig::GetHumanReadableCodecName() const { | 97 std::string AudioDecoderConfig::GetHumanReadableCodecName() const { |
| 98 switch (codec()) { | 98 switch (codec()) { |
| 99 case kUnknownAudioCodec: | 99 case kUnknownAudioCodec: |
| 100 return "unknown"; | 100 return "unknown"; |
| 101 case kCodecAAC: | 101 case kCodecAAC: |
| 102 return "aac"; | 102 return "aac"; |
| 103 case kCodecAC3: | |
|
ddorwin
2015/11/25 22:24:07
Keep the cases in the same order as the enum.
servolk
2015/12/03 00:56:14
Done.
| |
| 104 return "ac3"; | |
| 105 case kCodecEAC3: | |
| 106 return "eac3"; | |
| 103 case kCodecMP3: | 107 case kCodecMP3: |
| 104 return "mp3"; | 108 return "mp3"; |
| 105 case kCodecPCM: | 109 case kCodecPCM: |
| 106 case kCodecPCM_S16BE: | 110 case kCodecPCM_S16BE: |
| 107 case kCodecPCM_S24BE: | 111 case kCodecPCM_S24BE: |
| 108 return "pcm"; | 112 return "pcm"; |
| 109 case kCodecVorbis: | 113 case kCodecVorbis: |
| 110 return "vorbis"; | 114 return "vorbis"; |
| 111 case kCodecFLAC: | 115 case kCodecFLAC: |
| 112 return "flac"; | 116 return "flac"; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 123 case kCodecOpus: | 127 case kCodecOpus: |
| 124 return "opus"; | 128 return "opus"; |
| 125 case kCodecALAC: | 129 case kCodecALAC: |
| 126 return "alac"; | 130 return "alac"; |
| 127 } | 131 } |
| 128 NOTREACHED(); | 132 NOTREACHED(); |
| 129 return ""; | 133 return ""; |
| 130 } | 134 } |
| 131 | 135 |
| 132 } // namespace media | 136 } // namespace media |
| OLD | NEW |