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

Side by Side Diff: media/filters/audio_file_reader_unittest.cc

Issue 2572883002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Merge Created 4 years 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/filters/audio_decoder_unittest.cc ('k') | media/filters/chunk_demuxer_unittest.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 (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/filters/audio_file_reader.h" 5 #include "media/filters/audio_file_reader.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/md5.h" 11 #include "base/md5.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "media/base/audio_bus.h" 13 #include "media/base/audio_bus.h"
14 #include "media/base/audio_hash.h" 14 #include "media/base/audio_hash.h"
15 #include "media/base/decoder_buffer.h" 15 #include "media/base/decoder_buffer.h"
16 #include "media/base/test_data_util.h" 16 #include "media/base/test_data_util.h"
17 #include "media/ffmpeg/ffmpeg_common.h" 17 #include "media/ffmpeg/ffmpeg_common.h"
18 #include "media/filters/in_memory_url_protocol.h" 18 #include "media/filters/in_memory_url_protocol.h"
19 #include "media/media_features.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 21
21 namespace media { 22 namespace media {
22 23
23 class AudioFileReaderTest : public testing::Test { 24 class AudioFileReaderTest : public testing::Test {
24 public: 25 public:
25 AudioFileReaderTest() : packet_verification_disabled_(false) {} 26 AudioFileReaderTest() : packet_verification_disabled_(false) {}
26 ~AudioFileReaderTest() override {} 27 ~AudioFileReaderTest() override {}
27 28
28 void Initialize(const char* filename) { 29 void Initialize(const char* filename) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 TEST_F(AudioFileReaderTest, WaveF32LE) { 193 TEST_F(AudioFileReaderTest, WaveF32LE) {
193 RunTest("sfx_f32le.wav", 194 RunTest("sfx_f32le.wav",
194 "3.03,2.86,2.99,3.31,3.57,4.06,", 195 "3.03,2.86,2.99,3.31,3.57,4.06,",
195 1, 196 1,
196 44100, 197 44100,
197 base::TimeDelta::FromMicroseconds(288414), 198 base::TimeDelta::FromMicroseconds(288414),
198 12720, 199 12720,
199 12719); 200 12719);
200 } 201 }
201 202
202 #if defined(USE_PROPRIETARY_CODECS) 203 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
203 TEST_F(AudioFileReaderTest, MP3) { 204 TEST_F(AudioFileReaderTest, MP3) {
204 RunTest("sfx.mp3", 205 RunTest("sfx.mp3",
205 "1.30,2.72,4.56,5.08,3.74,2.03,", 206 "1.30,2.72,4.56,5.08,3.74,2.03,",
206 1, 207 1,
207 44100, 208 44100,
208 base::TimeDelta::FromMicroseconds(313470), 209 base::TimeDelta::FromMicroseconds(313470),
209 13825, 210 13825,
210 11025); 211 11025);
211 } 212 }
212 213
(...skipping 28 matching lines...) Expand all
241 RunTest("4ch.wav", 242 RunTest("4ch.wav",
242 "131.71,38.02,130.31,44.89,135.98,42.52,", 243 "131.71,38.02,130.31,44.89,135.98,42.52,",
243 4, 244 4,
244 44100, 245 44100,
245 base::TimeDelta::FromMicroseconds(100001), 246 base::TimeDelta::FromMicroseconds(100001),
246 4411, 247 4411,
247 4410); 248 4410);
248 } 249 }
249 250
250 } // namespace media 251 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_decoder_unittest.cc ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698