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

Unified Diff: talk/media/base/capturemanager_unittest.cc

Issue 1594973006: New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Workaround to not break chrome. Created 4 years, 11 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/media/base/capturemanager.cc ('k') | talk/media/base/capturerenderadapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/capturemanager_unittest.cc
diff --git a/talk/media/base/capturemanager_unittest.cc b/talk/media/base/capturemanager_unittest.cc
index 709ec5bb8d3b95b633357a53ed982281f4448ebb..4a75fc368299bdab98503aa70948fe9b2aec08d9 100644
--- a/talk/media/base/capturemanager_unittest.cc
+++ b/talk/media/base/capturemanager_unittest.cc
@@ -89,12 +89,6 @@ class CaptureManagerTest : public ::testing::Test, public sigslot::has_slots<> {
};
// Incorrect use cases.
-TEST_F(CaptureManagerTest, InvalidCallOrder) {
- // Capturer must be registered before any of these calls.
- EXPECT_FALSE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
-}
-
TEST_F(CaptureManagerTest, InvalidAddingRemoving) {
EXPECT_FALSE(capture_manager_.StopVideoCapture(&video_capturer_,
cricket::VideoFormat()));
@@ -102,7 +96,8 @@ TEST_F(CaptureManagerTest, InvalidAddingRemoving) {
format_vga_));
EXPECT_EQ_WAIT(cricket::CS_RUNNING, capture_state(), kMsCallbackWait);
EXPECT_EQ(1, callback_count());
- EXPECT_FALSE(capture_manager_.AddVideoRenderer(&video_capturer_, NULL));
+ // NULL argument currently allowed, and does nothing.
+ capture_manager_.AddVideoSink(&video_capturer_, NULL);
EXPECT_TRUE(capture_manager_.StopVideoCapture(&video_capturer_, format_vga_));
}
@@ -112,8 +107,7 @@ TEST_F(CaptureManagerTest, KeepFirstResolutionHigh) {
format_vga_));
EXPECT_EQ_WAIT(cricket::CS_RUNNING, capture_state(), kMsCallbackWait);
EXPECT_EQ(1, callback_count());
- EXPECT_TRUE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
+ capture_manager_.AddVideoSink(&video_capturer_, &video_renderer_);
EXPECT_TRUE(video_capturer_.CaptureFrame());
EXPECT_EQ(1, NumFramesRendered());
// Renderer should be fed frames with the resolution of format_vga_.
@@ -142,8 +136,7 @@ TEST_F(CaptureManagerTest, KeepFirstResolutionLow) {
format_qvga_));
EXPECT_TRUE(capture_manager_.StartVideoCapture(&video_capturer_,
format_vga_));
- EXPECT_TRUE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
+ capture_manager_.AddVideoSink(&video_capturer_, &video_renderer_);
EXPECT_EQ_WAIT(1, callback_count(), kMsCallbackWait);
EXPECT_TRUE(video_capturer_.CaptureFrame());
EXPECT_EQ(1, NumFramesRendered());
@@ -164,8 +157,7 @@ TEST_F(CaptureManagerTest, MultipleStartStops) {
format_qvga_));
EXPECT_EQ_WAIT(cricket::CS_RUNNING, capture_state(), kMsCallbackWait);
EXPECT_EQ(1, callback_count());
- EXPECT_TRUE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
+ capture_manager_.AddVideoSink(&video_capturer_, &video_renderer_);
// Ensure that a frame can be captured when two start calls have been made.
EXPECT_TRUE(video_capturer_.CaptureFrame());
EXPECT_EQ(1, NumFramesRendered());
@@ -189,8 +181,7 @@ TEST_F(CaptureManagerTest, MultipleStartStops) {
TEST_F(CaptureManagerTest, TestForceRestart) {
EXPECT_TRUE(capture_manager_.StartVideoCapture(&video_capturer_,
format_qvga_));
- EXPECT_TRUE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
+ capture_manager_.AddVideoSink(&video_capturer_, &video_renderer_);
EXPECT_EQ_WAIT(1, callback_count(), kMsCallbackWait);
EXPECT_TRUE(video_capturer_.CaptureFrame());
EXPECT_EQ(1, NumFramesRendered());
@@ -209,8 +200,7 @@ TEST_F(CaptureManagerTest, TestForceRestart) {
TEST_F(CaptureManagerTest, TestRequestRestart) {
EXPECT_TRUE(capture_manager_.StartVideoCapture(&video_capturer_,
format_vga_));
- EXPECT_TRUE(capture_manager_.AddVideoRenderer(&video_capturer_,
- &video_renderer_));
+ capture_manager_.AddVideoSink(&video_capturer_, &video_renderer_);
EXPECT_EQ_WAIT(1, callback_count(), kMsCallbackWait);
EXPECT_TRUE(video_capturer_.CaptureFrame());
EXPECT_EQ(1, NumFramesRendered());
« no previous file with comments | « talk/media/base/capturemanager.cc ('k') | talk/media/base/capturerenderadapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698