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

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

Issue 180153003: Implement core of compliant MediaSource coded frame processing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A couple nits, still not ready for review. Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 505
506 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-av_enc-av.webm"), 506 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-av_enc-av.webm"),
507 encrypted_media.decryptor())); 507 encrypted_media.decryptor()));
508 508
509 Play(); 509 Play();
510 510
511 ASSERT_TRUE(WaitUntilOnEnded()); 511 ASSERT_TRUE(WaitUntilOnEnded());
512 Stop(); 512 Stop();
513 } 513 }
514 514
515 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { 515 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
516 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
517 // always emit frames with valid durations (see http://crbug.com/351166).
518 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_MediaSource) {
516 MockMediaSource source("bear-320x240.webm", kWebM, 219229); 519 MockMediaSource source("bear-320x240.webm", kWebM, 219229);
517 StartPipelineWithMediaSource(&source); 520 StartPipelineWithMediaSource(&source);
518 source.EndOfStream(); 521 source.EndOfStream();
519 522
520 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 523 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
521 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 524 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
522 EXPECT_EQ(k320WebMFileDurationMs, 525 EXPECT_EQ(k320WebMFileDurationMs,
523 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 526 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
524 527
525 Play(); 528 Play();
526 529
527 ASSERT_TRUE(WaitUntilOnEnded()); 530 ASSERT_TRUE(WaitUntilOnEnded());
528 source.Abort(); 531 source.Abort();
529 Stop(); 532 Stop();
530 } 533 }
531 534
532 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VP9_WebM) { 535 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
536 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
537 // always emit frames with valid durations (see http://crbug.com/351166).
538 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_MediaSource_VP9_WebM) {
533 MockMediaSource source("bear-vp9.webm", kWebMVP9, 67504); 539 MockMediaSource source("bear-vp9.webm", kWebMVP9, 67504);
534 StartPipelineWithMediaSource(&source); 540 StartPipelineWithMediaSource(&source);
535 source.EndOfStream(); 541 source.EndOfStream();
536 542
537 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 543 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
538 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 544 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
539 EXPECT_EQ(kVP9WebMFileDurationMs, 545 EXPECT_EQ(kVP9WebMFileDurationMs,
540 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 546 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
541 547
542 Play(); 548 Play();
543 549
544 ASSERT_TRUE(WaitUntilOnEnded()); 550 ASSERT_TRUE(WaitUntilOnEnded());
545 source.Abort(); 551 source.Abort();
546 Stop(); 552 Stop();
547 } 553 }
548 554
549 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VP8A_WebM) { 555 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
556 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
557 // always emit frames with valid durations (see http://crbug.com/351166).
558 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_MediaSource_VP8A_WebM) {
550 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber()); 559 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber());
551 MockMediaSource source("bear-vp8a.webm", kVideoOnlyWebM, kAppendWholeFile); 560 MockMediaSource source("bear-vp8a.webm", kVideoOnlyWebM, kAppendWholeFile);
552 StartPipelineWithMediaSource(&source); 561 StartPipelineWithMediaSource(&source);
553 source.EndOfStream(); 562 source.EndOfStream();
554 563
555 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 564 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
556 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 565 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
557 EXPECT_EQ(kVP8AWebMFileDurationMs, 566 EXPECT_EQ(kVP8AWebMFileDurationMs,
558 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 567 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
559 568
560 Play(); 569 Play();
561 570
562 ASSERT_TRUE(WaitUntilOnEnded()); 571 ASSERT_TRUE(WaitUntilOnEnded());
563 source.Abort(); 572 source.Abort();
564 Stop(); 573 Stop();
565 } 574 }
566 575
567 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_Opus_WebM) { 576 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
577 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
578 // always emit frames with valid durations (see http://crbug.com/351166).
579 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_MediaSource_Opus_WebM) {
568 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber()); 580 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber());
569 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM, 581 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM,
570 kAppendWholeFile); 582 kAppendWholeFile);
571 StartPipelineWithMediaSource(&source); 583 StartPipelineWithMediaSource(&source);
572 source.EndOfStream(); 584 source.EndOfStream();
573 585
574 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 586 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
575 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 587 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
576 // TODO(acolwell/wolenetz): Drop the "+ 1" once WebM stream parser always 588 // TODO(acolwell/wolenetz): Drop the "+ 1" once WebM stream parser always
577 // emits frames with valid durations (see http://crbug.com/351166) and 589 // emits frames with valid durations (see http://crbug.com/351166) and
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 ASSERT_TRUE(Seek(seek_time)); 625 ASSERT_TRUE(Seek(seek_time));
614 626
615 ASSERT_TRUE(WaitUntilOnEnded()); 627 ASSERT_TRUE(WaitUntilOnEnded());
616 628
617 EXPECT_EQ("0.76,0.20,-0.82,-0.58,-1.29,-0.29,", GetAudioHash()); 629 EXPECT_EQ("0.76,0.20,-0.82,-0.58,-1.29,-0.29,", GetAudioHash());
618 630
619 source.Abort(); 631 source.Abort();
620 Stop(); 632 Stop();
621 } 633 }
622 634
623 TEST_F(PipelineIntegrationTest, MediaSource_ConfigChange_WebM) { 635 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
636 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
637 // always emit frames with valid durations (see http://crbug.com/351166).
638 TEST_F(PipelineIntegrationTest, DISABLED_MediaSource_ConfigChange_WebM) {
624 MockMediaSource source("bear-320x240-16x9-aspect.webm", kWebM, 639 MockMediaSource source("bear-320x240-16x9-aspect.webm", kWebM,
625 kAppendWholeFile); 640 kAppendWholeFile);
626 StartPipelineWithMediaSource(&source); 641 StartPipelineWithMediaSource(&source);
627 642
628 scoped_refptr<DecoderBuffer> second_file = 643 scoped_refptr<DecoderBuffer> second_file =
629 ReadTestDataFile("bear-640x360.webm"); 644 ReadTestDataFile("bear-640x360.webm");
630 645
631 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec), 646 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec),
632 second_file->data(), second_file->data_size()); 647 second_file->data(), second_file->data_size());
633 648
634 source.EndOfStream(); 649 source.EndOfStream();
635 650
636 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 651 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
637 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 652 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
638 EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs, 653 EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs,
639 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 654 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
640 655
641 Play(); 656 Play();
642 657
643 EXPECT_TRUE(WaitUntilOnEnded()); 658 EXPECT_TRUE(WaitUntilOnEnded());
644 source.Abort(); 659 source.Abort();
645 Stop(); 660 Stop();
646 } 661 }
647 662
648 TEST_F(PipelineIntegrationTest, MediaSource_ConfigChange_Encrypted_WebM) { 663 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
664 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
665 // always emit frames with valid durations (see http://crbug.com/351166).
666 TEST_F(PipelineIntegrationTest,
667 DISABLED_MediaSource_ConfigChange_Encrypted_WebM) {
649 MockMediaSource source("bear-320x240-16x9-aspect-av_enc-av.webm", kWebM, 668 MockMediaSource source("bear-320x240-16x9-aspect-av_enc-av.webm", kWebM,
650 kAppendWholeFile); 669 kAppendWholeFile);
651 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 670 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
652 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 671 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
653 672
654 scoped_refptr<DecoderBuffer> second_file = 673 scoped_refptr<DecoderBuffer> second_file =
655 ReadTestDataFile("bear-640x360-av_enc-av.webm"); 674 ReadTestDataFile("bear-640x360-av_enc-av.webm");
656 675
657 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec), 676 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec),
658 second_file->data(), second_file->data_size()); 677 second_file->data(), second_file->data_size());
659 678
660 source.EndOfStream(); 679 source.EndOfStream();
661 680
662 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 681 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
663 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 682 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
664 EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs, 683 EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs,
665 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 684 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
666 685
667 Play(); 686 Play();
668 687
669 EXPECT_TRUE(WaitUntilOnEnded()); 688 EXPECT_TRUE(WaitUntilOnEnded());
670 source.Abort(); 689 source.Abort();
671 Stop(); 690 Stop();
672 } 691 }
673 692
674 // Config changes from encrypted to clear are not currently supported. 693 // Config changes from encrypted to clear are not currently supported.
694 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
695 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
696 // always emit frames with valid durations (see http://crbug.com/351166).
675 TEST_F(PipelineIntegrationTest, 697 TEST_F(PipelineIntegrationTest,
676 MediaSource_ConfigChange_ClearThenEncrypted_WebM) { 698 DISABLED_MediaSource_ConfigChange_ClearThenEncrypted_WebM) {
677 MockMediaSource source("bear-320x240-16x9-aspect.webm", kWebM, 699 MockMediaSource source("bear-320x240-16x9-aspect.webm", kWebM,
678 kAppendWholeFile); 700 kAppendWholeFile);
679 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 701 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
680 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 702 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
681 703
682 scoped_refptr<DecoderBuffer> second_file = 704 scoped_refptr<DecoderBuffer> second_file =
683 ReadTestDataFile("bear-640x360-av_enc-av.webm"); 705 ReadTestDataFile("bear-640x360-av_enc-av.webm");
684 706
685 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec), 707 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec),
686 second_file->data(), second_file->data_size()); 708 second_file->data(), second_file->data_size());
687 709
688 source.EndOfStream(); 710 source.EndOfStream();
689 711
690 message_loop_.Run(); 712 message_loop_.Run();
691 EXPECT_EQ(PIPELINE_ERROR_DECODE, pipeline_status_); 713 EXPECT_EQ(PIPELINE_ERROR_DECODE, pipeline_status_);
692 714
693 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 715 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
694 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 716 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
695 // The second video was not added, so its time has not been added. 717 // The second video was not added, so its time has not been added.
696 EXPECT_EQ(k320WebMFileDurationMs, 718 EXPECT_EQ(k320WebMFileDurationMs,
697 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 719 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
698 720
699 Play(); 721 Play();
700 722
701 EXPECT_EQ(PIPELINE_ERROR_DECODE, WaitUntilEndedOrError()); 723 EXPECT_EQ(PIPELINE_ERROR_DECODE, WaitUntilEndedOrError());
702 source.Abort(); 724 source.Abort();
703 } 725 }
704 726
705 // Config changes from clear to encrypted are not currently supported. 727 // Config changes from clear to encrypted are not currently supported.
728 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
729 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
730 // always emit frames with valid durations (see http://crbug.com/351166).
706 TEST_F(PipelineIntegrationTest, 731 TEST_F(PipelineIntegrationTest,
707 MediaSource_ConfigChange_EncryptedThenClear_WebM) { 732 DISABLED_MediaSource_ConfigChange_EncryptedThenClear_WebM) {
708 MockMediaSource source("bear-320x240-16x9-aspect-av_enc-av.webm", kWebM, 733 MockMediaSource source("bear-320x240-16x9-aspect-av_enc-av.webm", kWebM,
709 kAppendWholeFile); 734 kAppendWholeFile);
710 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 735 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
711 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 736 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
712 737
713 scoped_refptr<DecoderBuffer> second_file = 738 scoped_refptr<DecoderBuffer> second_file =
714 ReadTestDataFile("bear-640x360.webm"); 739 ReadTestDataFile("bear-640x360.webm");
715 740
716 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec), 741 source.AppendAtTime(base::TimeDelta::FromSeconds(kAppendTimeSec),
717 second_file->data(), second_file->data_size()); 742 second_file->data(), second_file->data_size());
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 959
935 #endif 960 #endif
936 961
937 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) { 962 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) {
938 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-16x9-aspect.webm"), 963 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-16x9-aspect.webm"),
939 PIPELINE_OK)); 964 PIPELINE_OK));
940 Play(); 965 Play();
941 ASSERT_TRUE(WaitUntilOnEnded()); 966 ASSERT_TRUE(WaitUntilOnEnded());
942 } 967 }
943 968
944 TEST_F(PipelineIntegrationTest, EncryptedPlayback_WebM) { 969 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
970 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
971 // always emit frames with valid durations (see http://crbug.com/351166).
972 TEST_F(PipelineIntegrationTest, DISABLED_EncryptedPlayback_WebM) {
945 MockMediaSource source("bear-320x240-av_enc-av.webm", kWebM, 219816); 973 MockMediaSource source("bear-320x240-av_enc-av.webm", kWebM, 219816);
946 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 974 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
947 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 975 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
948 976
949 source.EndOfStream(); 977 source.EndOfStream();
950 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 978 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
951 979
952 Play(); 980 Play();
953 981
954 ASSERT_TRUE(WaitUntilOnEnded()); 982 ASSERT_TRUE(WaitUntilOnEnded());
955 source.Abort(); 983 source.Abort();
956 Stop(); 984 Stop();
957 } 985 }
958 986
959 TEST_F(PipelineIntegrationTest, EncryptedPlayback_ClearStart_WebM) { 987 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
988 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
989 // always emit frames with valid durations (see http://crbug.com/351166).
990 TEST_F(PipelineIntegrationTest, DISABLED_EncryptedPlayback_ClearStart_WebM) {
960 MockMediaSource source("bear-320x240-av_enc-av_clear-1s.webm", 991 MockMediaSource source("bear-320x240-av_enc-av_clear-1s.webm",
961 kWebM, kAppendWholeFile); 992 kWebM, kAppendWholeFile);
962 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 993 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
963 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 994 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
964 995
965 source.EndOfStream(); 996 source.EndOfStream();
966 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 997 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
967 998
968 Play(); 999 Play();
969 1000
970 ASSERT_TRUE(WaitUntilOnEnded()); 1001 ASSERT_TRUE(WaitUntilOnEnded());
971 source.Abort(); 1002 source.Abort();
972 Stop(); 1003 Stop();
973 } 1004 }
974 1005
975 TEST_F(PipelineIntegrationTest, EncryptedPlayback_NoEncryptedFrames_WebM) { 1006 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
1007 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
1008 // always emit frames with valid durations (see http://crbug.com/351166).
1009 TEST_F(PipelineIntegrationTest, DISABLED_EncryptedPlayback_NoEncryptedFrames_Web M) {
976 MockMediaSource source("bear-320x240-av_enc-av_clear-all.webm", 1010 MockMediaSource source("bear-320x240-av_enc-av_clear-all.webm",
977 kWebM, kAppendWholeFile); 1011 kWebM, kAppendWholeFile);
978 FakeEncryptedMedia encrypted_media(new NoResponseApp()); 1012 FakeEncryptedMedia encrypted_media(new NoResponseApp());
979 StartPipelineWithEncryptedMedia(&source, &encrypted_media); 1013 StartPipelineWithEncryptedMedia(&source, &encrypted_media);
980 1014
981 source.EndOfStream(); 1015 source.EndOfStream();
982 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 1016 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
983 1017
984 Play(); 1018 Play();
985 1019
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 source.EndOfStream(); 1082 source.EndOfStream();
1049 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 1083 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
1050 1084
1051 Play(); 1085 Play();
1052 1086
1053 ASSERT_TRUE(WaitUntilOnEnded()); 1087 ASSERT_TRUE(WaitUntilOnEnded());
1054 source.Abort(); 1088 source.Abort();
1055 Stop(); 1089 Stop();
1056 } 1090 }
1057 1091
1058 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_AVC3) { 1092 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
1093 // processor (see http://crbug.com/249422) once MP4 stream parser (or the
1094 // underlying file) fixed to emit frames whose decode timestamps NEVER exceed
1095 // presentation timestamp. See http://crbug.com/354518.
1096 TEST_F(PipelineIntegrationTest,
1097 DISABLED_BasicPlayback_MediaSource_VideoOnly_MP4_AVC3) {
1059 MockMediaSource source("bear-1280x720-v_frag-avc3.mp4", kMP4VideoAVC3, 1098 MockMediaSource source("bear-1280x720-v_frag-avc3.mp4", kMP4VideoAVC3,
1060 kAppendWholeFile); 1099 kAppendWholeFile);
1061 StartPipelineWithMediaSource(&source); 1100 StartPipelineWithMediaSource(&source);
1062 source.EndOfStream(); 1101 source.EndOfStream();
1063 1102
1064 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 1103 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
1065 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 1104 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
1066 EXPECT_EQ(k1280IsoAVC3FileDurationMs, 1105 EXPECT_EQ(k1280IsoAVC3FileDurationMs,
1067 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 1106 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
1068 1107
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); 1152 EXPECT_GE(pipeline_->GetMediaTime(), seek_time);
1114 ASSERT_TRUE(WaitUntilOnEnded()); 1153 ASSERT_TRUE(WaitUntilOnEnded());
1115 1154
1116 // Make sure seeking after reaching the end works as expected. 1155 // Make sure seeking after reaching the end works as expected.
1117 ASSERT_TRUE(Seek(seek_time)); 1156 ASSERT_TRUE(Seek(seek_time));
1118 EXPECT_GE(pipeline_->GetMediaTime(), seek_time); 1157 EXPECT_GE(pipeline_->GetMediaTime(), seek_time);
1119 ASSERT_TRUE(WaitUntilOnEnded()); 1158 ASSERT_TRUE(WaitUntilOnEnded());
1120 } 1159 }
1121 1160
1122 // Verify audio decoder & renderer can handle aborted demuxer reads. 1161 // Verify audio decoder & renderer can handle aborted demuxer reads.
1123 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) { 1162 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
1163 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
1164 // always emit frames with valid durations (see http://crbug.com/351166).
1165 TEST_F(PipelineIntegrationTest, DISABLED_ChunkDemuxerAbortRead_AudioOnly) {
1124 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM, 1166 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-audio-only.webm", kAudioOnlyWebM,
1125 8192, 1167 8192,
1126 base::TimeDelta::FromMilliseconds(464), 1168 base::TimeDelta::FromMilliseconds(464),
1127 base::TimeDelta::FromMilliseconds(617), 1169 base::TimeDelta::FromMilliseconds(617),
1128 0x10CA, 19730)); 1170 0x10CA, 19730));
1129 } 1171 }
1130 1172
1131 // Verify video decoder & renderer can handle aborted demuxer reads. 1173 // Verify video decoder & renderer can handle aborted demuxer reads.
1132 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { 1174 // TODO(acolwell/wolenetz): Re-enable for use with compliant coded frame
1175 // processor (see http://crbug.com/249422) once WebM stream parser fixed to
1176 // always emit frames with valid durations (see http://crbug.com/351166).
1177 TEST_F(PipelineIntegrationTest, DISABLED_ChunkDemuxerAbortRead_VideoOnly) {
1133 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, 1178 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM,
1134 32768, 1179 32768,
1135 base::TimeDelta::FromMilliseconds(200), 1180 base::TimeDelta::FromMilliseconds(200),
1136 base::TimeDelta::FromMilliseconds(1668), 1181 base::TimeDelta::FromMilliseconds(1668),
1137 0x1C896, 65536)); 1182 0x1C896, 65536));
1138 } 1183 }
1139 1184
1140 // Verify that Opus audio in WebM containers can be played back. 1185 // Verify that Opus audio in WebM containers can be played back.
1141 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { 1186 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) {
1142 ASSERT_TRUE(Start(GetTestDataFilePath("bear-opus-end-trimming.webm"), 1187 ASSERT_TRUE(Start(GetTestDataFilePath("bear-opus-end-trimming.webm"),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 // Verify that VP8 video with inband text track can be played back. 1234 // Verify that VP8 video with inband text track can be played back.
1190 TEST_F(PipelineIntegrationTest, 1235 TEST_F(PipelineIntegrationTest,
1191 BasicPlayback_VP8_WebVTT_WebM) { 1236 BasicPlayback_VP8_WebVTT_WebM) {
1192 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1237 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1193 PIPELINE_OK)); 1238 PIPELINE_OK));
1194 Play(); 1239 Play();
1195 ASSERT_TRUE(WaitUntilOnEnded()); 1240 ASSERT_TRUE(WaitUntilOnEnded());
1196 } 1241 }
1197 1242
1198 } // namespace media 1243 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698