OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <deque> | 6 #include <deque> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 EXPECT_FALSE(video_config.extra_data()); | 244 EXPECT_FALSE(video_config.extra_data()); |
245 EXPECT_EQ(0u, video_config.extra_data_size()); | 245 EXPECT_EQ(0u, video_config.extra_data_size()); |
246 | 246 |
247 // Audio stream should be present. | 247 // Audio stream should be present. |
248 stream = demuxer_->GetStream(DemuxerStream::AUDIO); | 248 stream = demuxer_->GetStream(DemuxerStream::AUDIO); |
249 ASSERT_TRUE(stream); | 249 ASSERT_TRUE(stream); |
250 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); | 250 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); |
251 | 251 |
252 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); | 252 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); |
253 EXPECT_EQ(kCodecVorbis, audio_config.codec()); | 253 EXPECT_EQ(kCodecVorbis, audio_config.codec()); |
254 EXPECT_EQ(16, audio_config.bits_per_channel()); | 254 EXPECT_EQ(32, audio_config.bits_per_channel()); |
255 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, audio_config.channel_layout()); | 255 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, audio_config.channel_layout()); |
256 EXPECT_EQ(44100, audio_config.samples_per_second()); | 256 EXPECT_EQ(44100, audio_config.samples_per_second()); |
| 257 EXPECT_EQ(kSampleFormatFLTP, audio_config.sample_format()); |
257 EXPECT_TRUE(audio_config.extra_data()); | 258 EXPECT_TRUE(audio_config.extra_data()); |
258 EXPECT_GT(audio_config.extra_data_size(), 0u); | 259 EXPECT_GT(audio_config.extra_data_size(), 0u); |
259 | 260 |
260 // Unknown stream should never be present. | 261 // Unknown stream should never be present. |
261 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::UNKNOWN)); | 262 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::UNKNOWN)); |
262 } | 263 } |
263 | 264 |
264 TEST_F(FFmpegDemuxerTest, Initialize_Multitrack) { | 265 TEST_F(FFmpegDemuxerTest, Initialize_Multitrack) { |
265 // Open a file containing the following streams: | 266 // Open a file containing the following streams: |
266 // Stream #0: Video (VP8) | 267 // Stream #0: Video (VP8) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 617 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
617 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 618 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
618 InitializeDemuxer(); | 619 InitializeDemuxer(); |
619 | 620 |
620 // Ensure the expected streams are present. | 621 // Ensure the expected streams are present. |
621 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 622 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
622 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 623 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
623 } | 624 } |
624 | 625 |
625 } // namespace media | 626 } // namespace media |
OLD | NEW |