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

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

Issue 2343543002: MSE: Replace crossfade splicing overlap trimming. (Closed)
Patch Set: Merge and feedback. Created 4 years, 1 month 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/filters/chunk_demuxer_unittest.cc ('k') | media/filters/source_buffer_state_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 read_callback_called_ = true; 295 read_callback_called_ = true;
296 last_read_status_ = status; 296 last_read_status_ = status;
297 last_read_buffer_ = buffer; 297 last_read_buffer_ = buffer;
298 } 298 }
299 299
300 void CreateAndConfigureStream(DemuxerStream::Type type) { 300 void CreateAndConfigureStream(DemuxerStream::Type type) {
301 // TODO(wolenetz/dalecurtis): Also test with splicing disabled? 301 // TODO(wolenetz/dalecurtis): Also test with splicing disabled?
302 switch (type) { 302 switch (type) {
303 case DemuxerStream::AUDIO: { 303 case DemuxerStream::AUDIO: {
304 ASSERT_FALSE(audio_); 304 ASSERT_FALSE(audio_);
305 audio_.reset(new ChunkDemuxerStream(DemuxerStream::AUDIO, true, "1")); 305 audio_.reset(new ChunkDemuxerStream(DemuxerStream::AUDIO, "1"));
306 AudioDecoderConfig decoder_config(kCodecVorbis, kSampleFormatPlanarF32, 306 AudioDecoderConfig decoder_config(kCodecVorbis, kSampleFormatPlanarF32,
307 CHANNEL_LAYOUT_STEREO, 1000, 307 CHANNEL_LAYOUT_STEREO, 1000,
308 EmptyExtraData(), Unencrypted()); 308 EmptyExtraData(), Unencrypted());
309 frame_processor_->OnPossibleAudioConfigUpdate(decoder_config); 309 frame_processor_->OnPossibleAudioConfigUpdate(decoder_config);
310 ASSERT_TRUE(audio_->UpdateAudioConfig(decoder_config, new MediaLog())); 310 ASSERT_TRUE(audio_->UpdateAudioConfig(decoder_config, new MediaLog()));
311 break; 311 break;
312 } 312 }
313 case DemuxerStream::VIDEO: { 313 case DemuxerStream::VIDEO: {
314 ASSERT_FALSE(video_); 314 ASSERT_FALSE(video_);
315 video_.reset(new ChunkDemuxerStream(DemuxerStream::VIDEO, true, "2")); 315 video_.reset(new ChunkDemuxerStream(DemuxerStream::VIDEO, "2"));
316 ASSERT_TRUE(video_->UpdateVideoConfig(TestVideoConfig::Normal(), 316 ASSERT_TRUE(video_->UpdateVideoConfig(TestVideoConfig::Normal(),
317 new MediaLog())); 317 new MediaLog()));
318 break; 318 break;
319 } 319 }
320 // TODO(wolenetz): Test text coded frame processing. 320 // TODO(wolenetz): Test text coded frame processing.
321 case DemuxerStream::TEXT: 321 case DemuxerStream::TEXT:
322 case DemuxerStream::UNKNOWN: { 322 case DemuxerStream::UNKNOWN: {
323 ASSERT_FALSE(true); 323 ASSERT_FALSE(true);
324 } 324 }
325 } 325 }
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 StreamParserBuffer* last_read_parser_buffer = 898 StreamParserBuffer* last_read_parser_buffer =
899 static_cast<StreamParserBuffer*>(last_read_buffer_.get()); 899 static_cast<StreamParserBuffer*>(last_read_buffer_.get());
900 ASSERT_EQ(base::TimeDelta::FromMilliseconds(0), 900 ASSERT_EQ(base::TimeDelta::FromMilliseconds(0),
901 last_read_parser_buffer->preroll_buffer()->duration()); 901 last_read_parser_buffer->preroll_buffer()->duration());
902 } 902 }
903 903
904 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); 904 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
905 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); 905 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
906 906
907 } // namespace media 907 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/source_buffer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698