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

Unified Diff: talk/app/webrtc/videotrack_unittest.cc

Issue 1660103003: Delete FrameInput method and FrameInputWrapper class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment improvement. Created 4 years, 10 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 | « talk/app/webrtc/videotrack.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/videotrack_unittest.cc
diff --git a/talk/app/webrtc/videotrack_unittest.cc b/talk/app/webrtc/videotrack_unittest.cc
index 491c45bcaa79a69a3f2a4801804aebbaac8ed7f4..184c9b58bc845219770974014dd38e1ef0653ab2 100644
--- a/talk/app/webrtc/videotrack_unittest.cc
+++ b/talk/app/webrtc/videotrack_unittest.cc
@@ -77,13 +77,13 @@ TEST_F(VideoTrackTest, RenderVideo) {
rtc::scoped_ptr<FakeVideoTrackRenderer> renderer_1(
new FakeVideoTrackRenderer(video_track_.get()));
- cricket::VideoRenderer* renderer_input =
- video_track_->GetSource()->FrameInput();
+ rtc::VideoSinkInterface<cricket::VideoFrame>* renderer_input =
+ video_track_->GetSink();
ASSERT_FALSE(renderer_input == NULL);
cricket::WebRtcVideoFrame frame;
frame.InitToBlack(123, 123, 0);
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(1, renderer_1->num_rendered_frames());
EXPECT_EQ(123, renderer_1->width());
@@ -93,7 +93,7 @@ TEST_F(VideoTrackTest, RenderVideo) {
rtc::scoped_ptr<FakeVideoTrackRenderer> renderer_2(
new FakeVideoTrackRenderer(video_track_.get()));
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(123, renderer_1->width());
EXPECT_EQ(123, renderer_1->height());
@@ -104,7 +104,7 @@ TEST_F(VideoTrackTest, RenderVideo) {
EXPECT_EQ(1, renderer_2->num_rendered_frames());
video_track_->RemoveRenderer(renderer_1.get());
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(2, renderer_1->num_rendered_frames());
EXPECT_EQ(2, renderer_2->num_rendered_frames());
@@ -115,8 +115,8 @@ TEST_F(VideoTrackTest, DisableTrackBlackout) {
rtc::scoped_ptr<FakeVideoTrackRenderer> renderer(
new FakeVideoTrackRenderer(video_track_.get()));
- cricket::VideoRenderer* renderer_input =
- video_track_->GetSource()->FrameInput();
+ rtc::VideoSinkInterface<cricket::VideoFrame>* renderer_input =
+ video_track_->GetSink();
ASSERT_FALSE(renderer_input == NULL);
cricket::WebRtcVideoFrame frame;
@@ -124,21 +124,21 @@ TEST_F(VideoTrackTest, DisableTrackBlackout) {
// Make it not all-black
frame.GetUPlane()[0] = 0;
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(1, renderer->num_rendered_frames());
EXPECT_FALSE(renderer->black_frame());
EXPECT_EQ(100, renderer->width());
EXPECT_EQ(200, renderer->height());
video_track_->set_enabled(false);
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(2, renderer->num_rendered_frames());
EXPECT_TRUE(renderer->black_frame());
EXPECT_EQ(100, renderer->width());
EXPECT_EQ(200, renderer->height());
video_track_->set_enabled(true);
- renderer_input->RenderFrame(&frame);
+ renderer_input->OnFrame(frame);
EXPECT_EQ(3, renderer->num_rendered_frames());
EXPECT_FALSE(renderer->black_frame());
EXPECT_EQ(100, renderer->width());
« no previous file with comments | « talk/app/webrtc/videotrack.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698