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

Side by Side Diff: media/mp4/avc.cc

Issue 10780026: Add HE AAC support to ISO BMFF. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove aac.h. Created 8 years, 5 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/mp4/avc.h ('k') | media/mp4/box_definitions.h » ('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 (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/mp4/avc.h" 5 #include "media/mp4/avc.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "media/mp4/box_definitions.h" 10 #include "media/mp4/box_definitions.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 temp.insert(temp.end(), kAnnexBStartCode, 81 temp.insert(temp.end(), kAnnexBStartCode,
82 kAnnexBStartCode + kAnnexBStartCodeSize); 82 kAnnexBStartCode + kAnnexBStartCodeSize);
83 temp.insert(temp.end(), avc_config.pps_list[i].begin(), 83 temp.insert(temp.end(), avc_config.pps_list[i].begin(),
84 avc_config.pps_list[i].end()); 84 avc_config.pps_list[i].end());
85 } 85 }
86 86
87 buffer->insert(buffer->begin(), temp.begin(), temp.end()); 87 buffer->insert(buffer->begin(), temp.begin(), temp.end());
88 return true; 88 return true;
89 } 89 }
90 90
91 // static
92 ChannelLayout AVC::ConvertAACChannelCountToChannelLayout(int count) {
93 switch (count) {
94 case 1:
95 return CHANNEL_LAYOUT_MONO;
96 case 2:
97 return CHANNEL_LAYOUT_STEREO;
98 case 3:
99 return CHANNEL_LAYOUT_SURROUND;
100 case 4:
101 return CHANNEL_LAYOUT_4_0;
102 case 5:
103 return CHANNEL_LAYOUT_5_0;
104 case 6:
105 return CHANNEL_LAYOUT_5_1;
106 case 8:
107 return CHANNEL_LAYOUT_7_1;
108 default:
109 return CHANNEL_LAYOUT_UNSUPPORTED;
110 }
111 }
112
113 } // namespace mp4 91 } // namespace mp4
114 } // namespace media 92 } // namespace media
OLDNEW
« no previous file with comments | « media/mp4/avc.h ('k') | media/mp4/box_definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698