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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 2643333002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/test/pipeline_integration_perftest.cc ('k') | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index b2599ee2c765016b2afe76401d6ac0e42a262e64..0cb1ad3855aeab55ff44c322d58c751ac5b9de69 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -31,6 +31,7 @@
#include "media/cdm/aes_decryptor.h"
#include "media/cdm/json_web_key.h"
#include "media/filters/chunk_demuxer.h"
+#include "media/media_features.h"
#include "media/renderers/renderer_impl.h"
#include "media/test/pipeline_integration_test_base.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -100,7 +101,7 @@ const char kWebMVP9[] = "video/webm; codecs=\"vp9\"";
const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\"";
const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\"";
const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\"";
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
const char kADTS[] = "audio/aac";
const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\"";
const char kMP4VideoAVC3[] = "video/mp4; codecs=\"avc3.64001f\"";
@@ -111,7 +112,7 @@ const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\"";
const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\"";
const char kMP3[] = "audio/mpeg";
const char kMP2AudioSBR[] = "video/mp2t; codecs=\"avc1.4D4041,mp4a.40.5\"";
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
const size_t kAppendWholeFile = std::numeric_limits<size_t>::max();
@@ -157,12 +158,12 @@ static const char kOpusSmallCodecDelayHash_2[] =
#endif // defined(OPUS_FIXED_POINT)
#endif // !defined(MOJO_RENDERER)
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
const int k640IsoFileDurationMs = 2737;
const int k640IsoCencFileDurationMs = 2736;
const int k1280IsoFileDurationMs = 2736;
const int k1280IsoAVC3FileDurationMs = 2736;
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
// Return a timeline offset for bear-320x240-live.webm.
static base::Time kLiveTimelineOffset() {
@@ -864,7 +865,7 @@ TEST_P(BasicMSEPlaybackTest, PlayToEnd) {
Stop();
}
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
const PlaybackTestData kADTSTests[] = {
{"bear-audio-main-aac.aac", 0, 2724},
@@ -890,7 +891,7 @@ INSTANTIATE_TEST_CASE_P(PropritaryCodecs,
BasicMSEPlaybackTest,
testing::ValuesIn(kMediaSourceADTSTests));
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, BasicPlayback) {
ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
@@ -1611,7 +1612,7 @@ TEST_F(PipelineIntegrationTest, BasicPlaybackHi12PVP9) {
}
#endif
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, BasicPlaybackHi10P) {
ASSERT_EQ(PIPELINE_OK, Start("bear-320x180-hi10p.mp4", kClockless));
@@ -1968,7 +1969,7 @@ TEST_F(PipelineIntegrationTest, MidStreamConfigChangesFail) {
Play();
ASSERT_EQ(WaitUntilEndedOrError(), PIPELINE_ERROR_DECODE);
}
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) {
ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-16x9-aspect.webm"));
@@ -2027,7 +2028,7 @@ TEST_F(PipelineIntegrationTest,
Stop();
}
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest,
MAYBE_EME(EncryptedPlayback_MP4_CENC_VideoOnly)) {
MockMediaSource source("bear-1280x720-v_frag-cenc.mp4", kMP4Video,
@@ -2288,7 +2289,7 @@ TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_HEVC2) {
#endif
}
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, SeekWhilePaused) {
ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
@@ -2378,7 +2379,7 @@ TEST_F(PipelineIntegrationTest, SuspendWhilePlaying) {
ASSERT_TRUE(WaitUntilOnEnded());
}
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, Rotated_Metadata_0) {
ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_0.mp4"));
ASSERT_EQ(VIDEO_ROTATION_0, metadata_.video_rotation);
@@ -2398,7 +2399,7 @@ TEST_F(PipelineIntegrationTest, Rotated_Metadata_270) {
ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_270.mp4"));
ASSERT_EQ(VIDEO_ROTATION_270, metadata_.video_rotation);
}
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
// Verify audio decoder & renderer can handle aborted demuxer reads.
TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) {
« no previous file with comments | « media/test/pipeline_integration_perftest.cc ('k') | third_party/widevine/cdm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698