| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 EXPECT_FALSE(video_config.extra_data()); | 236 EXPECT_FALSE(video_config.extra_data()); |
| 237 EXPECT_EQ(0u, video_config.extra_data_size()); | 237 EXPECT_EQ(0u, video_config.extra_data_size()); |
| 238 | 238 |
| 239 // Audio stream should be present. | 239 // Audio stream should be present. |
| 240 stream = demuxer_->GetStream(DemuxerStream::AUDIO); | 240 stream = demuxer_->GetStream(DemuxerStream::AUDIO); |
| 241 ASSERT_TRUE(stream); | 241 ASSERT_TRUE(stream); |
| 242 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); | 242 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); |
| 243 | 243 |
| 244 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); | 244 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); |
| 245 EXPECT_EQ(kCodecVorbis, audio_config.codec()); | 245 EXPECT_EQ(kCodecVorbis, audio_config.codec()); |
| 246 EXPECT_EQ(16, audio_config.bits_per_channel()); | 246 EXPECT_EQ(32, audio_config.bits_per_channel()); |
| 247 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, audio_config.channel_layout()); | 247 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, audio_config.channel_layout()); |
| 248 EXPECT_EQ(44100, audio_config.samples_per_second()); | 248 EXPECT_EQ(44100, audio_config.samples_per_second()); |
| 249 EXPECT_EQ(kSampleFormatPlanarF32, audio_config.sample_format()); |
| 249 EXPECT_TRUE(audio_config.extra_data()); | 250 EXPECT_TRUE(audio_config.extra_data()); |
| 250 EXPECT_GT(audio_config.extra_data_size(), 0u); | 251 EXPECT_GT(audio_config.extra_data_size(), 0u); |
| 251 | 252 |
| 252 // Unknown stream should never be present. | 253 // Unknown stream should never be present. |
| 253 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::UNKNOWN)); | 254 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::UNKNOWN)); |
| 254 } | 255 } |
| 255 | 256 |
| 256 TEST_F(FFmpegDemuxerTest, Initialize_Multitrack) { | 257 TEST_F(FFmpegDemuxerTest, Initialize_Multitrack) { |
| 257 // Open a file containing the following streams: | 258 // Open a file containing the following streams: |
| 258 // Stream #0: Video (VP8) | 259 // Stream #0: Video (VP8) |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 612 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
| 612 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 613 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
| 613 InitializeDemuxer(); | 614 InitializeDemuxer(); |
| 614 | 615 |
| 615 // Ensure the expected streams are present. | 616 // Ensure the expected streams are present. |
| 616 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 617 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
| 617 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 618 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
| 618 } | 619 } |
| 619 | 620 |
| 620 } // namespace media | 621 } // namespace media |
| OLD | NEW |