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

Side by Side Diff: media/test/pipeline_integration_test.cc

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