| OLD | NEW |
| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 void CreateAndConfigureStream(DemuxerStream::Type type) { | 289 void CreateAndConfigureStream(DemuxerStream::Type type) { |
| 290 // TODO(wolenetz/dalecurtis): Also test with splicing disabled? | 290 // TODO(wolenetz/dalecurtis): Also test with splicing disabled? |
| 291 switch (type) { | 291 switch (type) { |
| 292 case DemuxerStream::AUDIO: { | 292 case DemuxerStream::AUDIO: { |
| 293 ASSERT_FALSE(audio_); | 293 ASSERT_FALSE(audio_); |
| 294 audio_.reset(new ChunkDemuxerStream(DemuxerStream::AUDIO, true)); | 294 audio_.reset(new ChunkDemuxerStream(DemuxerStream::AUDIO, true)); |
| 295 AudioDecoderConfig decoder_config(kCodecVorbis, kSampleFormatPlanarF32, | 295 AudioDecoderConfig decoder_config(kCodecVorbis, kSampleFormatPlanarF32, |
| 296 CHANNEL_LAYOUT_STEREO, 1000, | 296 CHANNEL_LAYOUT_STEREO, 1000, |
| 297 EmptyExtraData(), Unencrypted()); | 297 EmptyExtraData(), false); |
| 298 frame_processor_->OnPossibleAudioConfigUpdate(decoder_config); | 298 frame_processor_->OnPossibleAudioConfigUpdate(decoder_config); |
| 299 ASSERT_TRUE(audio_->UpdateAudioConfig(decoder_config, new MediaLog())); | 299 ASSERT_TRUE(audio_->UpdateAudioConfig(decoder_config, new MediaLog())); |
| 300 break; | 300 break; |
| 301 } | 301 } |
| 302 case DemuxerStream::VIDEO: { | 302 case DemuxerStream::VIDEO: { |
| 303 ASSERT_FALSE(video_); | 303 ASSERT_FALSE(video_); |
| 304 video_.reset(new ChunkDemuxerStream(DemuxerStream::VIDEO, true)); | 304 video_.reset(new ChunkDemuxerStream(DemuxerStream::VIDEO, true)); |
| 305 ASSERT_TRUE(video_->UpdateVideoConfig(TestVideoConfig::Normal(), | 305 ASSERT_TRUE(video_->UpdateVideoConfig(TestVideoConfig::Normal(), |
| 306 new MediaLog())); | 306 new MediaLog())); |
| 307 break; | 307 break; |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 EXPECT_EQ(frame_duration_ * -9, timestamp_offset_); | 738 EXPECT_EQ(frame_duration_ * -9, timestamp_offset_); |
| 739 EXPECT_TRUE(in_coded_frame_group()); | 739 EXPECT_TRUE(in_coded_frame_group()); |
| 740 CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }"); | 740 CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }"); |
| 741 CheckReadsThenReadStalls(audio_.get(), "0 10:100"); | 741 CheckReadsThenReadStalls(audio_.get(), "0 10:100"); |
| 742 } | 742 } |
| 743 | 743 |
| 744 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); | 744 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); |
| 745 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); | 745 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); |
| 746 | 746 |
| 747 } // namespace media | 747 } // namespace media |
| OLD | NEW |