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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 2667283002: Refactor MediaResource to be multi-stream capable (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/renderers/renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index 8d103107a0cc54b5c59ee3b03f589f45ad4532c8..8b44eb7f26bb06fea2b6444bcd6c84276ab5aed9 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -1180,8 +1180,8 @@ TEST_F(PipelineIntegrationTest,
MAYBE_CLOCKLESS(BasicPlaybackOpusPrerollExceedsCodecDelay)) {
ASSERT_EQ(PIPELINE_OK, Start("bear-opus.webm", kHashed | kClockless));
- AudioDecoderConfig config =
- demuxer_->GetStream(DemuxerStream::AUDIO)->audio_decoder_config();
+ EXPECT_EQ(1u, demuxer_->GetStreams().size());
+ AudioDecoderConfig config = demuxer_->GetStreams()[0]->audio_decoder_config();
// Verify that this file's preroll is not eclipsed by the codec delay so we
// can detect when preroll is not properly performed.
@@ -1208,8 +1208,8 @@ TEST_F(PipelineIntegrationTest,
&source, kClockless | kHashed, nullptr));
source.EndOfStream();
- AudioDecoderConfig config =
- demuxer_->GetStream(DemuxerStream::AUDIO)->audio_decoder_config();
+ EXPECT_EQ(1u, demuxer_->GetStreams().size());
+ AudioDecoderConfig config = demuxer_->GetStreams()[0]->audio_decoder_config();
// Verify that this file's preroll is not eclipsed by the codec delay so we
// can detect when preroll is not properly performed.
@@ -2524,9 +2524,11 @@ TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) {
ASSERT_EQ(PIPELINE_OK, Start("sfx-opus-441.webm"));
Play();
ASSERT_TRUE(WaitUntilOnEnded());
- EXPECT_EQ(48000, demuxer_->GetStream(DemuxerStream::AUDIO)
- ->audio_decoder_config()
- .samples_per_second());
+
+ EXPECT_EQ(1u, demuxer_->GetStreams().size());
+ EXPECT_EQ(
+ 48000,
+ demuxer_->GetStreams()[0]->audio_decoder_config().samples_per_second());
}
// Same as above but using MediaSource.
@@ -2539,9 +2541,10 @@ TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_Opus441kHz) {
ASSERT_TRUE(WaitUntilOnEnded());
source.Shutdown();
Stop();
- EXPECT_EQ(48000, demuxer_->GetStream(DemuxerStream::AUDIO)
- ->audio_decoder_config()
- .samples_per_second());
+ EXPECT_EQ(1u, demuxer_->GetStreams().size());
+ EXPECT_EQ(
+ 48000,
+ demuxer_->GetStreams()[0]->audio_decoder_config().samples_per_second());
}
// Ensures audio-only playback with missing or negative timestamps works. Tests
« no previous file with comments | « media/renderers/renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698