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

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: Fixing includes Created 7 years 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/cast/test/encode_decode_test.cc ('k') | media/cast/test/linux_output_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/end2end_unittest.cc
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc
index 0a2e0976a71b866b4bba0f5ffbd43f7341ee5c87..bba27b8bd64cf2d6cdd1d9470e3d609aab76f927 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_;}
« no previous file with comments | « media/cast/test/encode_decode_test.cc ('k') | media/cast/test/linux_output_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698