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

Side by Side Diff: media/cast/sender/audio_encoder_unittest.cc

Issue 601413003: [cast] AAC encoder for OS X and iOS based on AudioConverter and AudioFile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio-remove-constants
Patch Set: Address review feedback and lint warnings. Created 6 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/cast/sender/audio_encoder.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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 }; 176 };
177 177
178 TEST_P(AudioEncoderTest, EncodeOpus) { 178 TEST_P(AudioEncoderTest, EncodeOpus) {
179 RunTestForCodec(CODEC_AUDIO_OPUS); 179 RunTestForCodec(CODEC_AUDIO_OPUS);
180 } 180 }
181 181
182 TEST_P(AudioEncoderTest, EncodePcm16) { 182 TEST_P(AudioEncoderTest, EncodePcm16) {
183 RunTestForCodec(CODEC_AUDIO_PCM16); 183 RunTestForCodec(CODEC_AUDIO_PCM16);
184 } 184 }
185 185
186 #if defined(OS_MACOSX)
187 TEST_P(AudioEncoderTest, EncodeAac) {
188 RunTestForCodec(CODEC_AUDIO_AAC);
189 }
190 #endif
191
186 static const int64 kOneCall_3Millis[] = {3}; 192 static const int64 kOneCall_3Millis[] = {3};
187 static const int64 kOneCall_10Millis[] = {10}; 193 static const int64 kOneCall_10Millis[] = {10};
188 static const int64 kOneCall_13Millis[] = {13}; 194 static const int64 kOneCall_13Millis[] = {13};
189 static const int64 kOneCall_20Millis[] = {20}; 195 static const int64 kOneCall_20Millis[] = {20};
190 196
191 static const int64 kTwoCalls_3Millis[] = {3, 3}; 197 static const int64 kTwoCalls_3Millis[] = {3, 3};
192 static const int64 kTwoCalls_10Millis[] = {10, 10}; 198 static const int64 kTwoCalls_10Millis[] = {10, 10};
193 static const int64 kTwoCalls_Mixed1[] = {3, 10}; 199 static const int64 kTwoCalls_Mixed1[] = {3, 10};
194 static const int64 kTwoCalls_Mixed2[] = {10, 3}; 200 static const int64 kTwoCalls_Mixed2[] = {10, 3};
195 static const int64 kTwoCalls_Mixed3[] = {3, 17}; 201 static const int64 kTwoCalls_Mixed3[] = {3, 17};
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)), 242 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)),
237 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)), 243 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)),
238 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)), 244 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)),
239 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)), 245 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)),
240 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)), 246 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)),
241 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)), 247 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)),
242 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns)))); 248 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns))));
243 249
244 } // namespace cast 250 } // namespace cast
245 } // namespace media 251 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/audio_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698