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

Side by Side Diff: media/test/pipeline_integration_test.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/test/pipeline_integration_perftest.cc ('k') | third_party/widevine/cdm/BUILD.gn » ('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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "media/base/content_decryption_module.h" 24 #include "media/base/content_decryption_module.h"
25 #include "media/base/decoder_buffer.h" 25 #include "media/base/decoder_buffer.h"
26 #include "media/base/media.h" 26 #include "media/base/media.h"
27 #include "media/base/media_switches.h" 27 #include "media/base/media_switches.h"
28 #include "media/base/media_tracks.h" 28 #include "media/base/media_tracks.h"
29 #include "media/base/test_data_util.h" 29 #include "media/base/test_data_util.h"
30 #include "media/base/timestamp_constants.h" 30 #include "media/base/timestamp_constants.h"
31 #include "media/cdm/aes_decryptor.h" 31 #include "media/cdm/aes_decryptor.h"
32 #include "media/cdm/json_web_key.h" 32 #include "media/cdm/json_web_key.h"
33 #include "media/filters/chunk_demuxer.h" 33 #include "media/filters/chunk_demuxer.h"
34 #include "media/media_features.h"
34 #include "media/renderers/renderer_impl.h" 35 #include "media/renderers/renderer_impl.h"
35 #include "media/test/pipeline_integration_test_base.h" 36 #include "media/test/pipeline_integration_test_base.h"
36 #include "testing/gmock/include/gmock/gmock.h" 37 #include "testing/gmock/include/gmock/gmock.h"
37 #include "url/gurl.h" 38 #include "url/gurl.h"
38 39
39 #if defined(MOJO_RENDERER) 40 #if defined(MOJO_RENDERER)
40 #include "media/mojo/clients/mojo_renderer.h" 41 #include "media/mojo/clients/mojo_renderer.h"
41 #include "media/mojo/interfaces/interface_factory.mojom.h" 42 #include "media/mojo/interfaces/interface_factory.mojom.h"
42 #include "media/mojo/interfaces/renderer.mojom.h" 43 #include "media/mojo/interfaces/renderer.mojom.h"
43 #include "services/service_manager/public/cpp/connect.h" 44 #include "services/service_manager/public/cpp/connect.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 94
94 namespace media { 95 namespace media {
95 96
96 const char kSourceId[] = "SourceId"; 97 const char kSourceId[] = "SourceId";
97 98
98 const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\""; 99 const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\"";
99 const char kWebMVP9[] = "video/webm; codecs=\"vp9\""; 100 const char kWebMVP9[] = "video/webm; codecs=\"vp9\"";
100 const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\""; 101 const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\"";
101 const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\""; 102 const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\"";
102 const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\""; 103 const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\"";
103 #if defined(USE_PROPRIETARY_CODECS) 104 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
104 const char kADTS[] = "audio/aac"; 105 const char kADTS[] = "audio/aac";
105 const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\""; 106 const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\"";
106 const char kMP4VideoAVC3[] = "video/mp4; codecs=\"avc3.64001f\""; 107 const char kMP4VideoAVC3[] = "video/mp4; codecs=\"avc3.64001f\"";
107 const char kMP4VideoVP9[] = "video/mp4; codecs=\"vp09.00.00.08.01.01.00.00\""; 108 const char kMP4VideoVP9[] = "video/mp4; codecs=\"vp09.00.00.08.01.01.00.00\"";
108 const char kMP4VideoHEVC1[] = "video/mp4; codecs=\"hvc1.1.6.L93.B0\""; 109 const char kMP4VideoHEVC1[] = "video/mp4; codecs=\"hvc1.1.6.L93.B0\"";
109 const char kMP4VideoHEVC2[] = "video/mp4; codecs=\"hev1.1.6.L93.B0\""; 110 const char kMP4VideoHEVC2[] = "video/mp4; codecs=\"hev1.1.6.L93.B0\"";
110 const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\""; 111 const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\"";
111 const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\""; 112 const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\"";
112 const char kMP3[] = "audio/mpeg"; 113 const char kMP3[] = "audio/mpeg";
113 const char kMP2AudioSBR[] = "video/mp2t; codecs=\"avc1.4D4041,mp4a.40.5\""; 114 const char kMP2AudioSBR[] = "video/mp2t; codecs=\"avc1.4D4041,mp4a.40.5\"";
114 #endif // defined(USE_PROPRIETARY_CODECS) 115 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
115 116
116 const size_t kAppendWholeFile = std::numeric_limits<size_t>::max(); 117 const size_t kAppendWholeFile = std::numeric_limits<size_t>::max();
117 118
118 // Constants for the Media Source config change tests. 119 // Constants for the Media Source config change tests.
119 const int kAppendTimeSec = 1; 120 const int kAppendTimeSec = 1;
120 const int kAppendTimeMs = kAppendTimeSec * 1000; 121 const int kAppendTimeMs = kAppendTimeSec * 1000;
121 const int k320WebMFileDurationMs = 2736; 122 const int k320WebMFileDurationMs = 2736;
122 const int k320EncWebMFileDurationMs = 2737; 123 const int k320EncWebMFileDurationMs = 2737;
123 const int k640WebMFileDurationMs = 2749; 124 const int k640WebMFileDurationMs = 2749;
124 const int kOpusEndTrimmingWebMFileDurationMs = 2741; 125 const int kOpusEndTrimmingWebMFileDurationMs = 2741;
(...skipping 24 matching lines...) Expand all
149 "-13.28,-14.35,-13.67,-11.68,-10.18,-10.46,"; 150 "-13.28,-14.35,-13.67,-11.68,-10.18,-10.46,";
150 // Hash for a full playthrough of "bear-opus.webm". 151 // Hash for a full playthrough of "bear-opus.webm".
151 static const char kOpusSmallCodecDelayHash_1[] = 152 static const char kOpusSmallCodecDelayHash_1[] =
152 "-0.47,-0.09,1.28,1.07,1.55,-0.22,"; 153 "-0.47,-0.09,1.28,1.07,1.55,-0.22,";
153 // The above hash, plus an additional playthrough starting from T=1.414s. 154 // The above hash, plus an additional playthrough starting from T=1.414s.
154 static const char kOpusSmallCodecDelayHash_2[] = 155 static const char kOpusSmallCodecDelayHash_2[] =
155 "0.31,0.15,-0.18,0.25,0.70,0.84,"; 156 "0.31,0.15,-0.18,0.25,0.70,0.84,";
156 #endif // defined(OPUS_FIXED_POINT) 157 #endif // defined(OPUS_FIXED_POINT)
157 #endif // !defined(MOJO_RENDERER) 158 #endif // !defined(MOJO_RENDERER)
158 159
159 #if defined(USE_PROPRIETARY_CODECS) 160 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
160 const int k640IsoFileDurationMs = 2737; 161 const int k640IsoFileDurationMs = 2737;
161 const int k640IsoCencFileDurationMs = 2736; 162 const int k640IsoCencFileDurationMs = 2736;
162 const int k1280IsoFileDurationMs = 2736; 163 const int k1280IsoFileDurationMs = 2736;
163 const int k1280IsoAVC3FileDurationMs = 2736; 164 const int k1280IsoAVC3FileDurationMs = 2736;
164 #endif // defined(USE_PROPRIETARY_CODECS) 165 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
165 166
166 // Return a timeline offset for bear-320x240-live.webm. 167 // Return a timeline offset for bear-320x240-live.webm.
167 static base::Time kLiveTimelineOffset() { 168 static base::Time kLiveTimelineOffset() {
168 // The file contians the following UTC timeline offset: 169 // The file contians the following UTC timeline offset:
169 // 2012-11-10 12:34:56.789123456 170 // 2012-11-10 12:34:56.789123456
170 // Since base::Time only has a resolution of microseconds, 171 // Since base::Time only has a resolution of microseconds,
171 // construct a base::Time for 2012-11-10 12:34:56.789123. 172 // construct a base::Time for 2012-11-10 12:34:56.789123.
172 base::Time::Exploded exploded_time; 173 base::Time::Exploded exploded_time;
173 exploded_time.year = 2012; 174 exploded_time.year = 2012;
174 exploded_time.month = 11; 175 exploded_time.month = 11;
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 857
857 Play(); 858 Play();
858 859
859 ASSERT_TRUE(WaitUntilOnEnded()); 860 ASSERT_TRUE(WaitUntilOnEnded());
860 861
861 EXPECT_TRUE(demuxer_->GetTimelineOffset().is_null()); 862 EXPECT_TRUE(demuxer_->GetTimelineOffset().is_null());
862 source.Shutdown(); 863 source.Shutdown();
863 Stop(); 864 Stop();
864 } 865 }
865 866
866 #if defined(USE_PROPRIETARY_CODECS) 867 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
867 868
868 const PlaybackTestData kADTSTests[] = { 869 const PlaybackTestData kADTSTests[] = {
869 {"bear-audio-main-aac.aac", 0, 2724}, 870 {"bear-audio-main-aac.aac", 0, 2724},
870 {"bear-audio-lc-aac.aac", 0, 2858}, 871 {"bear-audio-lc-aac.aac", 0, 2858},
871 {"bear-audio-implicit-he-aac-v1.aac", 0, 2812}, 872 {"bear-audio-implicit-he-aac-v1.aac", 0, 2812},
872 {"bear-audio-implicit-he-aac-v2.aac", 0, 3047}, 873 {"bear-audio-implicit-he-aac-v2.aac", 0, 3047},
873 }; 874 };
874 875
875 // TODO(chcunningham): Migrate other basic playback tests to TEST_P. 876 // TODO(chcunningham): Migrate other basic playback tests to TEST_P.
876 INSTANTIATE_TEST_CASE_P(PropritaryCodecs, 877 INSTANTIATE_TEST_CASE_P(PropritaryCodecs,
877 BasicPlaybackTest, 878 BasicPlaybackTest,
878 testing::ValuesIn(kADTSTests)); 879 testing::ValuesIn(kADTSTests));
879 880
880 const MSEPlaybackTestData kMediaSourceADTSTests[] = { 881 const MSEPlaybackTestData kMediaSourceADTSTests[] = {
881 {"bear-audio-main-aac.aac", kADTS, kAppendWholeFile, 2773}, 882 {"bear-audio-main-aac.aac", kADTS, kAppendWholeFile, 2773},
882 {"bear-audio-lc-aac.aac", kADTS, kAppendWholeFile, 2794}, 883 {"bear-audio-lc-aac.aac", kADTS, kAppendWholeFile, 2794},
883 {"bear-audio-implicit-he-aac-v1.aac", kADTS, kAppendWholeFile, 2858}, 884 {"bear-audio-implicit-he-aac-v1.aac", kADTS, kAppendWholeFile, 2858},
884 {"bear-audio-implicit-he-aac-v2.aac", kADTS, kAppendWholeFile, 2901}, 885 {"bear-audio-implicit-he-aac-v2.aac", kADTS, kAppendWholeFile, 2901},
885 }; 886 };
886 887
887 // TODO(chcunningham): Migrate other basic MSE playback tests to TEST_P. 888 // TODO(chcunningham): Migrate other basic MSE playback tests to TEST_P.
888 INSTANTIATE_TEST_CASE_P(PropritaryCodecs, 889 INSTANTIATE_TEST_CASE_P(PropritaryCodecs,
889 BasicMSEPlaybackTest, 890 BasicMSEPlaybackTest,
890 testing::ValuesIn(kMediaSourceADTSTests)); 891 testing::ValuesIn(kMediaSourceADTSTests));
891 892
892 #endif // defined(USE_PROPRIETARY_CODECS) 893 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
893 894
894 TEST_F(PipelineIntegrationTest, BasicPlayback) { 895 TEST_F(PipelineIntegrationTest, BasicPlayback) {
895 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm")); 896 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
896 897
897 Play(); 898 Play();
898 899
899 ASSERT_TRUE(WaitUntilOnEnded()); 900 ASSERT_TRUE(WaitUntilOnEnded());
900 } 901 }
901 902
902 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg) { 903 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg) {
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 1574
1574 TEST_F(PipelineIntegrationTest, BasicPlaybackHi12PVP9) { 1575 TEST_F(PipelineIntegrationTest, BasicPlaybackHi12PVP9) {
1575 ASSERT_EQ(PIPELINE_OK, Start("bear-320x180-hi12p-vp9.webm", kClockless)); 1576 ASSERT_EQ(PIPELINE_OK, Start("bear-320x180-hi12p-vp9.webm", kClockless));
1576 1577
1577 Play(); 1578 Play();
1578 1579
1579 ASSERT_TRUE(WaitUntilOnEnded()); 1580 ASSERT_TRUE(WaitUntilOnEnded());
1580 } 1581 }
1581 #endif 1582 #endif
1582 1583
1583 #if defined(USE_PROPRIETARY_CODECS) 1584 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
1584 1585
1585 TEST_F(PipelineIntegrationTest, BasicPlaybackHi10P) { 1586 TEST_F(PipelineIntegrationTest, BasicPlaybackHi10P) {
1586 ASSERT_EQ(PIPELINE_OK, Start("bear-320x180-hi10p.mp4", kClockless)); 1587 ASSERT_EQ(PIPELINE_OK, Start("bear-320x180-hi10p.mp4", kClockless));
1587 1588
1588 Play(); 1589 Play();
1589 1590
1590 ASSERT_TRUE(WaitUntilOnEnded()); 1591 ASSERT_TRUE(WaitUntilOnEnded());
1591 } 1592 }
1592 1593
1593 TEST_F(PipelineIntegrationTest, BasicFallback) { 1594 TEST_F(PipelineIntegrationTest, BasicFallback) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 EXPECT_EQ(CHUNK_DEMUXER_ERROR_APPEND_FAILED, WaitUntilEndedOrError()); 1931 EXPECT_EQ(CHUNK_DEMUXER_ERROR_APPEND_FAILED, WaitUntilEndedOrError());
1931 source.Shutdown(); 1932 source.Shutdown();
1932 } 1933 }
1933 1934
1934 // Verify files which change configuration midstream fail gracefully. 1935 // Verify files which change configuration midstream fail gracefully.
1935 TEST_F(PipelineIntegrationTest, MidStreamConfigChangesFail) { 1936 TEST_F(PipelineIntegrationTest, MidStreamConfigChangesFail) {
1936 ASSERT_EQ(PIPELINE_OK, Start("midstream_config_change.mp3")); 1937 ASSERT_EQ(PIPELINE_OK, Start("midstream_config_change.mp3"));
1937 Play(); 1938 Play();
1938 ASSERT_EQ(WaitUntilEndedOrError(), PIPELINE_ERROR_DECODE); 1939 ASSERT_EQ(WaitUntilEndedOrError(), PIPELINE_ERROR_DECODE);
1939 } 1940 }
1940 #endif // defined(USE_PROPRIETARY_CODECS) 1941 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
1941 1942
1942 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) { 1943 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) {
1943 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-16x9-aspect.webm")); 1944 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-16x9-aspect.webm"));
1944 Play(); 1945 Play();
1945 ASSERT_TRUE(WaitUntilOnEnded()); 1946 ASSERT_TRUE(WaitUntilOnEnded());
1946 } 1947 }
1947 1948
1948 TEST_F(PipelineIntegrationTest, MAYBE_EME(EncryptedPlayback_WebM)) { 1949 TEST_F(PipelineIntegrationTest, MAYBE_EME(EncryptedPlayback_WebM)) {
1949 MockMediaSource source("bear-320x240-av_enc-av.webm", kWebM, 219816); 1950 MockMediaSource source("bear-320x240-av_enc-av.webm", kWebM, 219816);
1950 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 1951 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 source.EndOfStream(); 1990 source.EndOfStream();
1990 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 1991 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
1991 1992
1992 Play(); 1993 Play();
1993 1994
1994 ASSERT_TRUE(WaitUntilOnEnded()); 1995 ASSERT_TRUE(WaitUntilOnEnded());
1995 source.Shutdown(); 1996 source.Shutdown();
1996 Stop(); 1997 Stop();
1997 } 1998 }
1998 1999
1999 #if defined(USE_PROPRIETARY_CODECS) 2000 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
2000 TEST_F(PipelineIntegrationTest, 2001 TEST_F(PipelineIntegrationTest,
2001 MAYBE_EME(EncryptedPlayback_MP4_CENC_VideoOnly)) { 2002 MAYBE_EME(EncryptedPlayback_MP4_CENC_VideoOnly)) {
2002 MockMediaSource source("bear-1280x720-v_frag-cenc.mp4", kMP4Video, 2003 MockMediaSource source("bear-1280x720-v_frag-cenc.mp4", kMP4Video,
2003 kAppendWholeFile); 2004 kAppendWholeFile);
2004 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 2005 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
2005 EXPECT_EQ(PIPELINE_OK, 2006 EXPECT_EQ(PIPELINE_OK,
2006 StartPipelineWithEncryptedMedia(&source, &encrypted_media)); 2007 StartPipelineWithEncryptedMedia(&source, &encrypted_media));
2007 2008
2008 source.EndOfStream(); 2009 source.EndOfStream();
2009 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 2010 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 2251 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
2251 PipelineStatus status = StartPipelineWithMediaSource(&source); 2252 PipelineStatus status = StartPipelineWithMediaSource(&source);
2252 EXPECT_TRUE(status == PIPELINE_OK || status == DECODER_ERROR_NOT_SUPPORTED); 2253 EXPECT_TRUE(status == PIPELINE_OK || status == DECODER_ERROR_NOT_SUPPORTED);
2253 #else 2254 #else
2254 EXPECT_EQ( 2255 EXPECT_EQ(
2255 DEMUXER_ERROR_COULD_NOT_OPEN, 2256 DEMUXER_ERROR_COULD_NOT_OPEN,
2256 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr)); 2257 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr));
2257 #endif 2258 #endif
2258 } 2259 }
2259 2260
2260 #endif // defined(USE_PROPRIETARY_CODECS) 2261 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
2261 2262
2262 TEST_F(PipelineIntegrationTest, SeekWhilePaused) { 2263 TEST_F(PipelineIntegrationTest, SeekWhilePaused) {
2263 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm")); 2264 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm"));
2264 2265
2265 base::TimeDelta duration(pipeline_->GetMediaDuration()); 2266 base::TimeDelta duration(pipeline_->GetMediaDuration());
2266 base::TimeDelta start_seek_time(duration / 4); 2267 base::TimeDelta start_seek_time(duration / 4);
2267 base::TimeDelta seek_time(duration * 3 / 4); 2268 base::TimeDelta seek_time(duration * 3 / 4);
2268 2269
2269 Play(); 2270 Play();
2270 ASSERT_TRUE(WaitUntilCurrentTimeIsAfter(start_seek_time)); 2271 ASSERT_TRUE(WaitUntilCurrentTimeIsAfter(start_seek_time));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 // Resuming the pipeline will create a new Renderer, 2341 // Resuming the pipeline will create a new Renderer,
2341 // which in turn will trigger video size and opacity notifications. 2342 // which in turn will trigger video size and opacity notifications.
2342 EXPECT_CALL(*this, OnVideoNaturalSizeChange(gfx::Size(320, 240))).Times(1); 2343 EXPECT_CALL(*this, OnVideoNaturalSizeChange(gfx::Size(320, 240))).Times(1);
2343 EXPECT_CALL(*this, OnVideoOpacityChange(true)).Times(1); 2344 EXPECT_CALL(*this, OnVideoOpacityChange(true)).Times(1);
2344 2345
2345 ASSERT_TRUE(Resume(seek_time)); 2346 ASSERT_TRUE(Resume(seek_time));
2346 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); 2347 EXPECT_GE(pipeline_->GetMediaTime(), seek_time);
2347 ASSERT_TRUE(WaitUntilOnEnded()); 2348 ASSERT_TRUE(WaitUntilOnEnded());
2348 } 2349 }
2349 2350
2350 #if defined(USE_PROPRIETARY_CODECS) 2351 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
2351 TEST_F(PipelineIntegrationTest, Rotated_Metadata_0) { 2352 TEST_F(PipelineIntegrationTest, Rotated_Metadata_0) {
2352 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_0.mp4")); 2353 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_0.mp4"));
2353 ASSERT_EQ(VIDEO_ROTATION_0, metadata_.video_rotation); 2354 ASSERT_EQ(VIDEO_ROTATION_0, metadata_.video_rotation);
2354 } 2355 }
2355 2356
2356 TEST_F(PipelineIntegrationTest, Rotated_Metadata_90) { 2357 TEST_F(PipelineIntegrationTest, Rotated_Metadata_90) {
2357 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_90.mp4")); 2358 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_90.mp4"));
2358 ASSERT_EQ(VIDEO_ROTATION_90, metadata_.video_rotation); 2359 ASSERT_EQ(VIDEO_ROTATION_90, metadata_.video_rotation);
2359 } 2360 }
2360 2361
2361 TEST_F(PipelineIntegrationTest, Rotated_Metadata_180) { 2362 TEST_F(PipelineIntegrationTest, Rotated_Metadata_180) {
2362 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_180.mp4")); 2363 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_180.mp4"));
2363 ASSERT_EQ(VIDEO_ROTATION_180, metadata_.video_rotation); 2364 ASSERT_EQ(VIDEO_ROTATION_180, metadata_.video_rotation);
2364 } 2365 }
2365 2366
2366 TEST_F(PipelineIntegrationTest, Rotated_Metadata_270) { 2367 TEST_F(PipelineIntegrationTest, Rotated_Metadata_270) {
2367 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_270.mp4")); 2368 ASSERT_EQ(PIPELINE_OK, Start("bear_rotate_270.mp4"));
2368 ASSERT_EQ(VIDEO_ROTATION_270, metadata_.video_rotation); 2369 ASSERT_EQ(VIDEO_ROTATION_270, metadata_.video_rotation);
2369 } 2370 }
2370 #endif // defined(USE_PROPRIETARY_CODECS) 2371 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
2371 2372
2372 // Verify audio decoder & renderer can handle aborted demuxer reads. 2373 // Verify audio decoder & renderer can handle aborted demuxer reads.
2373 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { 2374 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) {
2374 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, 2375 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM,
2375 16384, base::TimeDelta::FromMilliseconds(464), 2376 16384, base::TimeDelta::FromMilliseconds(464),
2376 base::TimeDelta::FromMilliseconds(617), 0x10CA, 2377 base::TimeDelta::FromMilliseconds(617), 0x10CA,
2377 19730)); 2378 19730));
2378 } 2379 }
2379 2380
2380 // Verify video decoder & renderer can handle aborted demuxer reads. 2381 // Verify video decoder & renderer can handle aborted demuxer reads.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 2552
2552 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2553 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2553 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2554 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2554 Play(); 2555 Play();
2555 ASSERT_TRUE(WaitUntilOnEnded()); 2556 ASSERT_TRUE(WaitUntilOnEnded());
2556 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2557 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2557 demuxer_->GetStartTime()); 2558 demuxer_->GetStartTime());
2558 } 2559 }
2559 2560
2560 } // namespace media 2561 } // namespace media
OLDNEW
« 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