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

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

Issue 2343543002: MSE: Replace crossfade splicing overlap trimming. (Closed)
Patch Set: fix compile error Created 4 years, 3 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
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 case DemuxerStream::NUM_TYPES: { 323 case DemuxerStream::NUM_TYPES: {
324 ASSERT_FALSE(true); 324 ASSERT_FALSE(true);
325 } 325 }
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 StreamParserBuffer* last_read_parser_buffer = 899 StreamParserBuffer* last_read_parser_buffer =
900 static_cast<StreamParserBuffer*>(last_read_buffer_.get()); 900 static_cast<StreamParserBuffer*>(last_read_buffer_.get());
901 ASSERT_EQ(base::TimeDelta::FromMilliseconds(0), 901 ASSERT_EQ(base::TimeDelta::FromMilliseconds(0),
902 last_read_parser_buffer->preroll_buffer()->duration()); 902 last_read_parser_buffer->preroll_buffer()->duration());
903 } 903 }
904 904
905 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); 905 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
906 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); 906 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
907 907
908 } // namespace media 908 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698