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

Side by Side Diff: media/formats/mp4/aac_unittest.cc

Issue 1421293009: Update comments about ISO spec on aac parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/formats/mp4/aac.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "media/base/mock_media_log.h" 7 #include "media/base/mock_media_log.h"
8 #include "media/formats/mp4/aac.h" 8 #include "media/formats/mp4/aac.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 AudioChannelLayoutLog("3"))); 103 AudioChannelLayoutLog("3")));
104 EXPECT_TRUE(Parse(data)); 104 EXPECT_TRUE(Parse(data));
105 EXPECT_EQ(aac_.GetOutputSamplesPerSecond(false), 48000); 105 EXPECT_EQ(aac_.GetOutputSamplesPerSecond(false), 48000);
106 EXPECT_EQ(aac_.GetOutputSamplesPerSecond(true), 48000); 106 EXPECT_EQ(aac_.GetOutputSamplesPerSecond(true), 48000);
107 EXPECT_EQ(aac_.GetChannelLayout(false), CHANNEL_LAYOUT_STEREO); 107 EXPECT_EQ(aac_.GetChannelLayout(false), CHANNEL_LAYOUT_STEREO);
108 } 108 }
109 109
110 // Test implicit SBR with mono channel config. 110 // Test implicit SBR with mono channel config.
111 // Mono channel layout should only be reported if SBR is not 111 // Mono channel layout should only be reported if SBR is not
112 // specified. Otherwise stereo should be reported. 112 // specified. Otherwise stereo should be reported.
113 // See ISO-14496-3 Section 1.6.6.1.2 for details about this special casing. 113 // See ISO 14496-3:2005 Section 1.6.5.3 for details about this special casing.
114 TEST_F(AACTest, ImplicitSBR_ChannelConfig0) { 114 TEST_F(AACTest, ImplicitSBR_ChannelConfig0) {
115 uint8 buffer[] = {0x13, 0x08}; 115 uint8 buffer[] = {0x13, 0x08};
116 std::vector<uint8> data; 116 std::vector<uint8> data;
117 117
118 data.assign(buffer, buffer + sizeof(buffer)); 118 data.assign(buffer, buffer + sizeof(buffer));
119 119
120 EXPECT_MEDIA_LOG(AllOf(AudioProfileLog("mp4a.40.2"), 120 EXPECT_MEDIA_LOG(AllOf(AudioProfileLog("mp4a.40.2"),
121 AudioSamplingFrequencyLog("24000"), 121 AudioSamplingFrequencyLog("24000"),
122 AudioExtensionSamplingFrequencyLog("0"), 122 AudioExtensionSamplingFrequencyLog("0"),
123 AudioChannelLayoutLog("2"))); 123 AudioChannelLayoutLog("2")));
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 EXPECT_MEDIA_LOG(AllOf(AudioProfileLog("mp4a.40.2"), 295 EXPECT_MEDIA_LOG(AllOf(AudioProfileLog("mp4a.40.2"),
296 AudioSamplingFrequencyLog("64000"), 296 AudioSamplingFrequencyLog("64000"),
297 AudioExtensionSamplingFrequencyLog("64000"), 297 AudioExtensionSamplingFrequencyLog("64000"),
298 AudioChannelLayoutLog("3"))); 298 AudioChannelLayoutLog("3")));
299 EXPECT_TRUE(Parse(data)); 299 EXPECT_TRUE(Parse(data));
300 } 300 }
301 301
302 } // namespace mp4 302 } // namespace mp4
303 303
304 } // namespace media 304 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/aac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698