| 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) { |
| 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 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2477 0x1C896, 65536)); | 2493 0x1C896, 65536)); |
| 2478 } | 2494 } |
| 2479 | 2495 |
| 2480 // Verify that Opus audio in WebM containers can be played back. | 2496 // Verify that Opus audio in WebM containers can be played back. |
| 2481 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { | 2497 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { |
| 2482 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm")); | 2498 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm")); |
| 2483 Play(); | 2499 Play(); |
| 2484 ASSERT_TRUE(WaitUntilOnEnded()); | 2500 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2485 } | 2501 } |
| 2486 | 2502 |
| 2503 TEST_F(PipelineIntegrationTest, |
| 2504 BasicPlayback_AudioOnly_Opus_4ch_ChannelMapping2_WebM) { |
| 2505 ASSERT_EQ(PIPELINE_OK, |
| 2506 Start("bear-opus-end-trimming-4ch-channelmapping2.webm")); |
| 2507 Play(); |
| 2508 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2509 } |
| 2510 |
| 2511 TEST_F(PipelineIntegrationTest, |
| 2512 BasicPlayback_AudioOnly_Opus_11ch_ChannelMapping2_WebM) { |
| 2513 ASSERT_EQ(PIPELINE_OK, |
| 2514 Start("bear-opus-end-trimming-11ch-channelmapping2.webm")); |
| 2515 Play(); |
| 2516 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2517 } |
| 2518 |
| 2487 // Verify that VP9 video in WebM containers can be played back. | 2519 // Verify that VP9 video in WebM containers can be played back. |
| 2488 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { | 2520 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { |
| 2489 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm")); | 2521 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm")); |
| 2490 Play(); | 2522 Play(); |
| 2491 ASSERT_TRUE(WaitUntilOnEnded()); | 2523 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2492 } | 2524 } |
| 2493 | 2525 |
| 2494 // Verify that VP9 video and Opus audio in the same WebM container can be played | 2526 // Verify that VP9 video and Opus audio in the same WebM container can be played |
| 2495 // back. | 2527 // back. |
| 2496 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { | 2528 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 | 2676 |
| 2645 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2677 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2646 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2678 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2647 Play(); | 2679 Play(); |
| 2648 ASSERT_TRUE(WaitUntilOnEnded()); | 2680 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2649 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2681 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2650 demuxer_->GetStartTime()); | 2682 demuxer_->GetStartTime()); |
| 2651 } | 2683 } |
| 2652 | 2684 |
| 2653 } // namespace media | 2685 } // namespace media |
| OLD | NEW |