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

Unified Diff: media/filters/audio_decoder_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/filters/audio_file_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_decoder_unittest.cc
diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc
index cfaf4b8affa67e9c4cda43194d7cc888531ef3e8..1c18a7b99d9f31f68a50e702921600ac843fe1de 100644
--- a/media/filters/audio_decoder_unittest.cc
+++ b/media/filters/audio_decoder_unittest.cc
@@ -29,6 +29,7 @@
#include "media/filters/audio_file_reader.h"
#include "media/filters/ffmpeg_audio_decoder.h"
#include "media/filters/in_memory_url_protocol.h"
+#include "media/media_features.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_ANDROID)
@@ -36,7 +37,7 @@
#include "media/base/android/media_codec_util.h"
#include "media/filters/android/media_codec_audio_decoder.h"
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
#include "media/formats/mpeg/adts_stream_parser.h"
#endif
@@ -187,7 +188,7 @@ class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> {
ASSERT_TRUE(AVCodecContextToAudioDecoderConfig(
reader_->codec_context_for_testing(), Unencrypted(), &config));
-#if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS)
+#if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS)
// MEDIA_CODEC type requires config->extra_data() for AAC codec. For ADTS
// streams we need to extract it with a separate procedure.
if (GetParam().decoder_type == MEDIA_CODEC &&
@@ -458,7 +459,7 @@ const DecodedBufferExpectations kBearOpusExpectations[] = {
};
#if defined(OS_ANDROID)
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
const DecodedBufferExpectations kSfxAdtsMcExpectations[] = {
{0, 23219, "-1.80,-1.49,-0.23,1.11,1.54,-0.11,"},
{23219, 23219, "-1.90,-1.53,-0.15,1.28,1.23,-0.33,"},
@@ -475,7 +476,7 @@ const DecodedBufferExpectations kHeAacMcExpectations[] = {
const DecoderTestData kMediaCodecTests[] = {
{MEDIA_CODEC, kCodecOpus, "bear-opus.ogg", kBearOpusExpectations, 24, 48000,
CHANNEL_LAYOUT_STEREO},
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
{MEDIA_CODEC, kCodecAAC, "sfx.adts", kSfxAdtsMcExpectations, 0, 44100,
CHANNEL_LAYOUT_MONO},
{MEDIA_CODEC, kCodecAAC, "bear-audio-implicit-he-aac-v2.aac",
@@ -488,7 +489,7 @@ INSTANTIATE_TEST_CASE_P(MediaCodecAudioDecoderTest,
testing::ValuesIn(kMediaCodecTests));
#endif // defined(OS_ANDROID)
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
const DecodedBufferExpectations kSfxMp3Expectations[] = {
{0, 1065, "2.81,3.99,4.53,4.10,3.08,2.46,"},
{1065, 26122, "-3.81,-4.14,-3.90,-3.36,-3.03,-3.23,"},
@@ -547,7 +548,7 @@ const DecodedBufferExpectations kSfxOpusExpectations[] = {
#endif
const DecoderTestData kFFmpegTests[] = {
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
{FFMPEG, kCodecMP3, "sfx.mp3", kSfxMp3Expectations, 0, 44100,
CHANNEL_LAYOUT_MONO},
{FFMPEG, kCodecAAC, "sfx.adts", kSfxAdtsExpectations, 0, 44100,
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/filters/audio_file_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698