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

Unified Diff: media/filters/ffmpeg_video_decoder_unittest.cc

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder_unittest.cc
diff --git a/media/filters/ffmpeg_video_decoder_unittest.cc b/media/filters/ffmpeg_video_decoder_unittest.cc
index 1e5f4683ec9ecb60a361639b3853e385e99f6256..9d97c82f8f90d0572845b6b80224b7abd9b26e40 100644
--- a/media/filters/ffmpeg_video_decoder_unittest.cc
+++ b/media/filters/ffmpeg_video_decoder_unittest.cc
@@ -101,7 +101,7 @@ class FFmpegVideoDecoderTest : public testing::Test {
void InitializeWithConfigAndStatus(const VideoDecoderConfig& config,
PipelineStatus status) {
EXPECT_CALL(*demuxer_, video_decoder_config())
- .WillOnce(ReturnRef(config));
+ .WillRepeatedly(ReturnRef(config));
decoder_->Initialize(demuxer_, NewExpectedStatusCB(status),
base::Bind(&MockStatisticsCB::OnStatistics,
@@ -167,8 +167,8 @@ class FFmpegVideoDecoderTest : public testing::Test {
// the file named |test_file_name|. This function expects both buffers
// to decode to frames that are the same size.
void DecodeIFrameThenTestFile(const std::string& test_file_name,
- size_t expected_width,
- size_t expected_height) {
+ int expected_width,
+ int expected_height) {
Initialize();
VideoDecoder::DecoderStatus status_a;
@@ -189,17 +189,15 @@ class FFmpegVideoDecoderTest : public testing::Test {
Read(&status_a, &video_frame_a);
Read(&status_b, &video_frame_b);
- size_t original_width = static_cast<size_t>(kVisibleRect.width());
- size_t original_height = static_cast<size_t>(kVisibleRect.height());
-
+ gfx::Size original_size = kVisibleRect.size();
EXPECT_EQ(status_a, VideoDecoder::kOk);
EXPECT_EQ(status_b, VideoDecoder::kOk);
ASSERT_TRUE(video_frame_a);
ASSERT_TRUE(video_frame_b);
- EXPECT_EQ(original_width, video_frame_a->width());
- EXPECT_EQ(original_height, video_frame_a->height());
- EXPECT_EQ(expected_width, video_frame_b->width());
- EXPECT_EQ(expected_height, video_frame_b->height());
+ EXPECT_EQ(original_size.width(), video_frame_a->data_size().width());
+ EXPECT_EQ(original_size.height(), video_frame_a->data_size().height());
+ EXPECT_EQ(expected_width, video_frame_b->data_size().width());
+ EXPECT_EQ(expected_height, video_frame_b->data_size().height());
}
void Read(VideoDecoder::DecoderStatus* status,
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698