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

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

Issue 111153003: FFmpeg fixups for M33 roll. Now with more Opus! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DEPS. Created 7 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 | 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }; 53 };
54 54
55 const int kAppendWholeFile = -1; 55 const int kAppendWholeFile = -1;
56 56
57 // Constants for the Media Source config change tests. 57 // Constants for the Media Source config change tests.
58 const int kAppendTimeSec = 1; 58 const int kAppendTimeSec = 1;
59 const int kAppendTimeMs = kAppendTimeSec * 1000; 59 const int kAppendTimeMs = kAppendTimeSec * 1000;
60 const int k320WebMFileDurationMs = 2737; 60 const int k320WebMFileDurationMs = 2737;
61 const int k640WebMFileDurationMs = 2763; 61 const int k640WebMFileDurationMs = 2763;
62 const int kOpusEndTrimmingWebMFileDurationMs = 2771; 62 const int kOpusEndTrimmingWebMFileDurationMs = 2771;
63 const uint32 kOpusEndTrimmingWebMFileAudioBytes = 528676;
64 const int kVP9WebMFileDurationMs = 2735; 63 const int kVP9WebMFileDurationMs = 2735;
65 const int kVP8AWebMFileDurationMs = 2700; 64 const int kVP8AWebMFileDurationMs = 2700;
66 65
67 #if defined(USE_PROPRIETARY_CODECS) 66 #if defined(USE_PROPRIETARY_CODECS)
68 const int k640IsoFileDurationMs = 2737; 67 const int k640IsoFileDurationMs = 2737;
69 const int k640IsoCencFileDurationMs = 2736; 68 const int k640IsoCencFileDurationMs = 2736;
70 const int k1280IsoFileDurationMs = 2736; 69 const int k1280IsoFileDurationMs = 2736;
71 const int k1280IsoAVC3FileDurationMs = 2735; 70 const int k1280IsoAVC3FileDurationMs = 2735;
72 #endif // defined(USE_PROPRIETARY_CODECS) 71 #endif // defined(USE_PROPRIETARY_CODECS)
73 72
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 StartPipelineWithMediaSource(&source); 556 StartPipelineWithMediaSource(&source);
558 source.EndOfStream(); 557 source.EndOfStream();
559 558
560 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 559 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
561 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 560 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
562 EXPECT_EQ(kOpusEndTrimmingWebMFileDurationMs, 561 EXPECT_EQ(kOpusEndTrimmingWebMFileDurationMs,
563 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 562 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
564 Play(); 563 Play();
565 564
566 ASSERT_TRUE(WaitUntilOnEnded()); 565 ASSERT_TRUE(WaitUntilOnEnded());
567 EXPECT_EQ(kOpusEndTrimmingWebMFileAudioBytes,
568 pipeline_->GetStatistics().audio_bytes_decoded);
569 source.Abort(); 566 source.Abort();
570 Stop(); 567 Stop();
571 } 568 }
572 569
573 // Flaky. http://crbug.com/304776 570 // Flaky. http://crbug.com/304776
574 TEST_F(PipelineIntegrationTest, DISABLED_MediaSource_Opus_Seeking_WebM) { 571 TEST_F(PipelineIntegrationTest, DISABLED_MediaSource_Opus_Seeking_WebM) {
575 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber()); 572 EXPECT_CALL(*this, OnSetOpaque(false)).Times(AnyNumber());
576 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM, 573 MockMediaSource source("bear-opus-end-trimming.webm", kOpusAudioOnlyWebM,
577 kAppendWholeFile); 574 kAppendWholeFile);
578 StartHashedPipelineWithMediaSource(&source); 575 StartHashedPipelineWithMediaSource(&source);
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 32768, 1050 32768,
1054 base::TimeDelta::FromMilliseconds(200), 1051 base::TimeDelta::FromMilliseconds(200),
1055 base::TimeDelta::FromMilliseconds(1668), 1052 base::TimeDelta::FromMilliseconds(1668),
1056 0x1C896, 65536)); 1053 0x1C896, 65536));
1057 } 1054 }
1058 1055
1059 // Verify that Opus audio in WebM containers can be played back. 1056 // Verify that Opus audio in WebM containers can be played back.
1060 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { 1057 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) {
1061 ASSERT_TRUE(Start(GetTestDataFilePath("bear-opus-end-trimming.webm"), 1058 ASSERT_TRUE(Start(GetTestDataFilePath("bear-opus-end-trimming.webm"),
1062 PIPELINE_OK)); 1059 PIPELINE_OK));
1060 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
1061 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
1062 EXPECT_EQ(kOpusEndTrimmingWebMFileDurationMs,
1063 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
vignesh 2013/12/11 20:10:18 Could you please verify manually if this test pass
DaleCurtis 2013/12/11 22:19:36 End trimming works, but start trimming appears bro
1063 Play(); 1064 Play();
1064 ASSERT_TRUE(WaitUntilOnEnded()); 1065 ASSERT_TRUE(WaitUntilOnEnded());
1065 EXPECT_EQ(kOpusEndTrimmingWebMFileAudioBytes,
1066 pipeline_->GetStatistics().audio_bytes_decoded);
1067 } 1066 }
1068 1067
1069 // Verify that VP9 video in WebM containers can be played back. 1068 // Verify that VP9 video in WebM containers can be played back.
1070 // TODO(fgalligan): Enable after new vp9 files are landed. 1069 // TODO(fgalligan): Enable after new vp9 files are landed.
1071 // http://crbug.com/259116 1070 // http://crbug.com/259116
1072 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VideoOnly_VP9_WebM) { 1071 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VideoOnly_VP9_WebM) {
1073 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9.webm"), 1072 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9.webm"),
1074 PIPELINE_OK)); 1073 PIPELINE_OK));
1075 Play(); 1074 Play();
1076 ASSERT_TRUE(WaitUntilOnEnded()); 1075 ASSERT_TRUE(WaitUntilOnEnded());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 // Verify that VP8 video with inband text track can be played back. 1109 // Verify that VP8 video with inband text track can be played back.
1111 TEST_F(PipelineIntegrationTest, 1110 TEST_F(PipelineIntegrationTest,
1112 BasicPlayback_VP8_WebVTT_WebM) { 1111 BasicPlayback_VP8_WebVTT_WebM) {
1113 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1112 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1114 PIPELINE_OK)); 1113 PIPELINE_OK));
1115 Play(); 1114 Play();
1116 ASSERT_TRUE(WaitUntilOnEnded()); 1115 ASSERT_TRUE(WaitUntilOnEnded());
1117 } 1116 }
1118 1117
1119 } // namespace media 1118 } // namespace media
OLDNEW
« media/filters/opus_audio_decoder.cc ('K') | « media/filters/opus_audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698