Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 902 } | 902 } |
| 903 | 903 |
| 904 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg) { | 904 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg) { |
| 905 ASSERT_EQ(PIPELINE_OK, Start("bear-opus.ogg")); | 905 ASSERT_EQ(PIPELINE_OK, Start("bear-opus.ogg")); |
| 906 | 906 |
| 907 Play(); | 907 Play(); |
| 908 | 908 |
| 909 ASSERT_TRUE(WaitUntilOnEnded()); | 909 ASSERT_TRUE(WaitUntilOnEnded()); |
| 910 } | 910 } |
| 911 | 911 |
| 912 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_4ch_ChannelMapping2) { | |
|
DaleCurtis
2017/03/31 19:06:53
Do we need the 4ch one if we have the 11ch one? We
flim-chromium
2017/04/05 18:19:35
Now that we check that webaudio is attached before
| |
| 913 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-4ch-channelmapping2.ogg")); | |
| 914 | |
| 915 Play(); | |
| 916 | |
| 917 ASSERT_TRUE(WaitUntilOnEnded()); | |
| 918 } | |
| 919 | |
| 920 TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_11ch_ChannelMapping2) { | |
| 921 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-11ch-channelmapping2.ogg")); | |
| 922 | |
| 923 Play(); | |
| 924 | |
| 925 ASSERT_TRUE(WaitUntilOnEnded()); | |
| 926 } | |
| 927 | |
| 912 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { | 928 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { |
| 913 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed)); | 929 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed)); |
| 914 | 930 |
| 915 Play(); | 931 Play(); |
| 916 | 932 |
| 917 ASSERT_TRUE(WaitUntilOnEnded()); | 933 ASSERT_TRUE(WaitUntilOnEnded()); |
| 918 | 934 |
| 919 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); | 935 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); |
| 920 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); | 936 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); |
| 921 EXPECT_TRUE(demuxer_->GetTimelineOffset().is_null()); | 937 EXPECT_TRUE(demuxer_->GetTimelineOffset().is_null()); |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2449 0x1C896, 65536)); | 2465 0x1C896, 65536)); |
| 2450 } | 2466 } |
| 2451 | 2467 |
| 2452 // Verify that Opus audio in WebM containers can be played back. | 2468 // Verify that Opus audio in WebM containers can be played back. |
| 2453 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { | 2469 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { |
| 2454 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm")); | 2470 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm")); |
| 2455 Play(); | 2471 Play(); |
| 2456 ASSERT_TRUE(WaitUntilOnEnded()); | 2472 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2457 } | 2473 } |
| 2458 | 2474 |
| 2475 TEST_F(PipelineIntegrationTest, | |
| 2476 BasicPlayback_AudioOnly_Opus_4ch_ChannelMapping2_WebM) { | |
| 2477 ASSERT_EQ(PIPELINE_OK, | |
| 2478 Start("bear-opus-end-trimming-4ch-channelmapping2.webm")); | |
| 2479 Play(); | |
| 2480 ASSERT_TRUE(WaitUntilOnEnded()); | |
| 2481 } | |
| 2482 | |
| 2483 TEST_F(PipelineIntegrationTest, | |
| 2484 BasicPlayback_AudioOnly_Opus_11ch_ChannelMapping2_WebM) { | |
| 2485 ASSERT_EQ(PIPELINE_OK, | |
| 2486 Start("bear-opus-end-trimming-11ch-channelmapping2.webm")); | |
| 2487 Play(); | |
| 2488 ASSERT_TRUE(WaitUntilOnEnded()); | |
| 2489 } | |
| 2490 | |
| 2459 // Verify that VP9 video in WebM containers can be played back. | 2491 // Verify that VP9 video in WebM containers can be played back. |
| 2460 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { | 2492 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { |
| 2461 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm")); | 2493 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm")); |
| 2462 Play(); | 2494 Play(); |
| 2463 ASSERT_TRUE(WaitUntilOnEnded()); | 2495 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2464 } | 2496 } |
| 2465 | 2497 |
| 2466 // Verify that VP9 video and Opus audio in the same WebM container can be played | 2498 // Verify that VP9 video and Opus audio in the same WebM container can be played |
| 2467 // back. | 2499 // back. |
| 2468 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { | 2500 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2616 | 2648 |
| 2617 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2649 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2618 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2650 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2619 Play(); | 2651 Play(); |
| 2620 ASSERT_TRUE(WaitUntilOnEnded()); | 2652 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2621 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2653 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2622 demuxer_->GetStartTime()); | 2654 demuxer_->GetStartTime()); |
| 2623 } | 2655 } |
| 2624 | 2656 |
| 2625 } // namespace media | 2657 } // namespace media |
| OLD | NEW |