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

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

Issue 10832087: Remove VideoDecoderConfig.frame_rate_xxx() & VideoFrame:Get/SetDuration() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR comments. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(30000, video_config.frame_rate_numerator());
246 EXPECT_EQ(1001, video_config.frame_rate_denominator());
247 EXPECT_EQ(1, video_config.aspect_ratio_numerator()); 245 EXPECT_EQ(1, video_config.aspect_ratio_numerator());
248 EXPECT_EQ(1, video_config.aspect_ratio_denominator()); 246 EXPECT_EQ(1, video_config.aspect_ratio_denominator());
249 EXPECT_FALSE(video_config.extra_data()); 247 EXPECT_FALSE(video_config.extra_data());
250 EXPECT_EQ(0u, video_config.extra_data_size()); 248 EXPECT_EQ(0u, video_config.extra_data_size());
251 249
252 // Audio stream should be present. 250 // Audio stream should be present.
253 stream = demuxer_->GetStream(DemuxerStream::AUDIO); 251 stream = demuxer_->GetStream(DemuxerStream::AUDIO);
254 ASSERT_TRUE(stream); 252 ASSERT_TRUE(stream);
255 EXPECT_EQ(DemuxerStream::AUDIO, stream->type()); 253 EXPECT_EQ(DemuxerStream::AUDIO, stream->type());
256 254
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { 717 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) {
720 CreateDemuxer("vorbis_audio_wmv_video.mkv"); 718 CreateDemuxer("vorbis_audio_wmv_video.mkv");
721 InitializeDemuxer(); 719 InitializeDemuxer();
722 720
723 // Ensure the expected streams are present. 721 // Ensure the expected streams are present.
724 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); 722 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO));
725 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); 723 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO));
726 } 724 }
727 725
728 } // namespace media 726 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698