| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 const VideoDecoderConfig& video_config = stream->video_decoder_config(); | 236 const VideoDecoderConfig& video_config = stream->video_decoder_config(); |
| 237 EXPECT_EQ(kCodecVP8, video_config.codec()); | 237 EXPECT_EQ(kCodecVP8, video_config.codec()); |
| 238 EXPECT_EQ(VideoFrame::YV12, video_config.format()); | 238 EXPECT_EQ(VideoFrame::YV12, video_config.format()); |
| 239 EXPECT_EQ(320, video_config.coded_size().width()); | 239 EXPECT_EQ(320, video_config.coded_size().width()); |
| 240 EXPECT_EQ(240, video_config.coded_size().height()); | 240 EXPECT_EQ(240, video_config.coded_size().height()); |
| 241 EXPECT_EQ(0, video_config.visible_rect().x()); | 241 EXPECT_EQ(0, video_config.visible_rect().x()); |
| 242 EXPECT_EQ(0, video_config.visible_rect().y()); | 242 EXPECT_EQ(0, video_config.visible_rect().y()); |
| 243 EXPECT_EQ(320, video_config.visible_rect().width()); | 243 EXPECT_EQ(320, video_config.visible_rect().width()); |
| 244 EXPECT_EQ(240, video_config.visible_rect().height()); | 244 EXPECT_EQ(240, video_config.visible_rect().height()); |
| 245 EXPECT_EQ(1, video_config.aspect_ratio_numerator()); | 245 EXPECT_EQ(320, video_config.natural_size().width()); |
| 246 EXPECT_EQ(1, video_config.aspect_ratio_denominator()); | 246 EXPECT_EQ(240, video_config.natural_size().height()); |
| 247 EXPECT_FALSE(video_config.extra_data()); | 247 EXPECT_FALSE(video_config.extra_data()); |
| 248 EXPECT_EQ(0u, video_config.extra_data_size()); | 248 EXPECT_EQ(0u, video_config.extra_data_size()); |
| 249 | 249 |
| 250 // Audio stream should be present. | 250 // Audio stream should be present. |
| 251 stream = demuxer_->GetStream(DemuxerStream::AUDIO); | 251 stream = demuxer_->GetStream(DemuxerStream::AUDIO); |
| 252 ASSERT_TRUE(stream); | 252 ASSERT_TRUE(stream); |
| 253 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); | 253 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); |
| 254 | 254 |
| 255 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); | 255 const AudioDecoderConfig& audio_config = stream->audio_decoder_config(); |
| 256 EXPECT_EQ(kCodecVorbis, audio_config.codec()); | 256 EXPECT_EQ(kCodecVorbis, audio_config.codec()); |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 717 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
| 718 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 718 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
| 719 InitializeDemuxer(); | 719 InitializeDemuxer(); |
| 720 | 720 |
| 721 // Ensure the expected streams are present. | 721 // Ensure the expected streams are present. |
| 722 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 722 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
| 723 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 723 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
| 724 } | 724 } |
| 725 | 725 |
| 726 } // namespace media | 726 } // namespace media |
| OLD | NEW |