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

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

Issue 2773793002: Allow mp3 audio codec for mpeg2ts containers in MSE (Closed)
Patch Set: CR feedback Created 3 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
« no previous file with comments | « media/test/data/bear-audio-mp4a.6B.ts ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 // calculated incorrectly and that leads to gaps in buffered ranges (so this 2127 // calculated incorrectly and that leads to gaps in buffered ranges (so this
2128 // check will fail) and eventually leads to stalled playback. 2128 // check will fail) and eventually leads to stalled playback.
2129 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 2129 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
2130 #else 2130 #else
2131 EXPECT_EQ( 2131 EXPECT_EQ(
2132 DEMUXER_ERROR_COULD_NOT_OPEN, 2132 DEMUXER_ERROR_COULD_NOT_OPEN,
2133 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr)); 2133 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr));
2134 #endif 2134 #endif
2135 } 2135 }
2136 2136
2137 TEST_F(PipelineIntegrationTest, Mpeg2ts_MP3Audio_Mp4a_6B) {
2138 MockMediaSource source("bear-audio-mp4a.6B.ts",
2139 "video/mp2t; codecs=\"mp4a.6B\"", kAppendWholeFile);
2140 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
2141 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source));
2142 source.EndOfStream();
2143 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
2144 #else
2145 EXPECT_EQ(
2146 DEMUXER_ERROR_COULD_NOT_OPEN,
2147 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr));
2148 #endif
2149 }
2150
2151 TEST_F(PipelineIntegrationTest, Mpeg2ts_MP3Audio_Mp4a_69) {
2152 MockMediaSource source("bear-audio-mp4a.69.ts",
2153 "video/mp2t; codecs=\"mp4a.69\"", kAppendWholeFile);
2154 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
2155 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source));
2156 source.EndOfStream();
2157 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
2158 #else
2159 EXPECT_EQ(
2160 DEMUXER_ERROR_COULD_NOT_OPEN,
2161 StartPipelineWithMediaSource(&source, kExpectDemuxerFailure, nullptr));
2162 #endif
2163 }
2164
2137 TEST_F(PipelineIntegrationTest, 2165 TEST_F(PipelineIntegrationTest,
2138 MAYBE_EME(EncryptedPlayback_NoEncryptedFrames_MP4_CENC_AudioOnly)) { 2166 MAYBE_EME(EncryptedPlayback_NoEncryptedFrames_MP4_CENC_AudioOnly)) {
2139 MockMediaSource source("bear-1280x720-a_frag-cenc_clear-all.mp4", kMP4Audio, 2167 MockMediaSource source("bear-1280x720-a_frag-cenc_clear-all.mp4", kMP4Audio,
2140 kAppendWholeFile); 2168 kAppendWholeFile);
2141 FakeEncryptedMedia encrypted_media(new NoResponseApp()); 2169 FakeEncryptedMedia encrypted_media(new NoResponseApp());
2142 EXPECT_EQ(PIPELINE_OK, 2170 EXPECT_EQ(PIPELINE_OK,
2143 StartPipelineWithEncryptedMedia(&source, &encrypted_media)); 2171 StartPipelineWithEncryptedMedia(&source, &encrypted_media));
2144 2172
2145 source.EndOfStream(); 2173 source.EndOfStream();
2146 2174
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 2644
2617 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2645 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2618 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2646 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2619 Play(); 2647 Play();
2620 ASSERT_TRUE(WaitUntilOnEnded()); 2648 ASSERT_TRUE(WaitUntilOnEnded());
2621 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2649 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2622 demuxer_->GetStartTime()); 2650 demuxer_->GetStartTime());
2623 } 2651 }
2624 2652
2625 } // namespace media 2653 } // namespace media
OLDNEW
« no previous file with comments | « media/test/data/bear-audio-mp4a.6B.ts ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698