Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: media/base/audio_codecs.cc

Issue 1685683004: Move media::AudioCodec to its own source file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/audio_codecs.h ('k') | media/base/audio_decoder_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/audio_codecs.h"
6
7 #include "base/logging.h"
8
9 namespace media {
10
11 // These names come from src/third_party/ffmpeg/libavcodec/codec_desc.c
12 std::string GetCodecName(AudioCodec codec) {
13 switch (codec) {
14 case kUnknownAudioCodec:
15 return "unknown";
16 case kCodecAAC:
17 return "aac";
18 case kCodecMP3:
19 return "mp3";
20 case kCodecPCM:
21 case kCodecPCM_S16BE:
22 case kCodecPCM_S24BE:
23 return "pcm";
24 case kCodecVorbis:
25 return "vorbis";
26 case kCodecFLAC:
27 return "flac";
28 case kCodecAMR_NB:
29 return "amr_nb";
30 case kCodecAMR_WB:
31 return "amr_wb";
32 case kCodecPCM_MULAW:
33 return "pcm_mulaw";
34 case kCodecGSM_MS:
35 return "gsm_ms";
36 case kCodecOpus:
37 return "opus";
38 case kCodecPCM_ALAW:
39 return "pcm_alaw";
40 case kCodecEAC3:
41 return "eac3";
42 case kCodecALAC:
43 return "alac";
44 case kCodecAC3:
45 return "ac3";
46 }
47 NOTREACHED();
48 return "";
49 }
50
51 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_codecs.h ('k') | media/base/audio_decoder_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698