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

Unified Diff: media/cast/test/end2end_unittest.cc

Issue 82593005: Cast: Switching recevier to use media::VideoFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding media to DEPS + rebase Created 7 years, 1 month 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
Index: media/cast/test/end2end_unittest.cc
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc
index c461f8235ca6996be6bfeb5f810b76567b02d3ea..954d1546e5eae75177aaaa63f75151466e857364 100644
--- a/media/cast/test/end2end_unittest.cc
+++ b/media/cast/test/end2end_unittest.cc
@@ -273,7 +273,7 @@ class TestReceiverVideoCallback :
expected_frame_.push_back(expected_video_frame);
}
- void CheckVideoFrame(scoped_ptr<I420VideoFrame> video_frame,
+ void CheckVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame,
const base::TimeTicks& render_time) {
++num_called_;
@@ -290,8 +290,8 @@ class TestReceiverVideoCallback :
<< "time_since_capture - upper_bound == "
<< (time_since_capture - upper_bound).InMicroseconds() << " usec";
EXPECT_LE(expected_video_frame.capture_time, render_time);
- EXPECT_EQ(expected_video_frame.width, video_frame->width);
- EXPECT_EQ(expected_video_frame.height, video_frame->height);
+ EXPECT_EQ(expected_video_frame.width, video_frame->coded_size().width());
+ EXPECT_EQ(expected_video_frame.height, video_frame->coded_size().height());
gfx::Size size(expected_video_frame.width, expected_video_frame.height);
scoped_refptr<media::VideoFrame> expected_I420_frame =
@@ -299,8 +299,7 @@ class TestReceiverVideoCallback :
VideoFrame::I420, size, gfx::Rect(size), size, base::TimeDelta());
PopulateVideoFrame(expected_I420_frame, expected_video_frame.start_value);
- double psnr = I420PSNR(*(expected_I420_frame.get()), *(video_frame.get()));
- EXPECT_GE(psnr, kVideoAcceptedPSNR);
+ EXPECT_GE(I420PSNR(expected_I420_frame, video_frame), kVideoAcceptedPSNR);
}
int number_times_called() { return num_called_;}

Powered by Google App Engine
This is Rietveld 408576698