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

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

Issue 2773793002: Allow mp3 audio codec for mpeg2ts containers in MSE (Closed)
Patch Set: CR feedback Created 3 years, 8 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 | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_codecs.h" 5 #include "media/base/audio_codecs.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return ""; 49 return "";
50 } 50 }
51 51
52 AudioCodec StringToAudioCodec(const std::string& codec_id) { 52 AudioCodec StringToAudioCodec(const std::string& codec_id) {
53 if (codec_id == "aac") 53 if (codec_id == "aac")
54 return kCodecAAC; 54 return kCodecAAC;
55 if (codec_id == "ac-3" || codec_id == "mp4a.A5" || codec_id == "mp4a.a5") 55 if (codec_id == "ac-3" || codec_id == "mp4a.A5" || codec_id == "mp4a.a5")
56 return kCodecAC3; 56 return kCodecAC3;
57 if (codec_id == "ec-3" || codec_id == "mp4a.A6" || codec_id == "mp4a.a6") 57 if (codec_id == "ec-3" || codec_id == "mp4a.A6" || codec_id == "mp4a.a6")
58 return kCodecEAC3; 58 return kCodecEAC3;
59 if (codec_id == "mp3") 59 if (codec_id == "mp3" || codec_id == "mp4a.69" || codec_id == "mp4a.6B")
60 return kCodecMP3; 60 return kCodecMP3;
61 if (codec_id == "alac") 61 if (codec_id == "alac")
62 return kCodecALAC; 62 return kCodecALAC;
63 if (codec_id == "flac") 63 if (codec_id == "flac")
64 return kCodecFLAC; 64 return kCodecFLAC;
65 if (codec_id == "opus") 65 if (codec_id == "opus")
66 return kCodecOpus; 66 return kCodecOpus;
67 if (codec_id == "vorbis") 67 if (codec_id == "vorbis")
68 return kCodecVorbis; 68 return kCodecVorbis;
69 if (base::StartsWith(codec_id, "mp4a.40.", base::CompareCase::SENSITIVE)) 69 if (base::StartsWith(codec_id, "mp4a.40.", base::CompareCase::SENSITIVE))
70 return kCodecAAC; 70 return kCodecAAC;
71 return kUnknownAudioCodec; 71 return kUnknownAudioCodec;
72 } 72 }
73 73
74 } // namespace media 74 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698