Index: talk/media/base/videocapturer_unittest.cc |
diff --git a/talk/media/base/videocapturer_unittest.cc b/talk/media/base/videocapturer_unittest.cc |
index 635259ea6618b119d2b630d3480a870131f63e2b..70902325e9f1d9b26e7edc8adf99055317c07b59 100644 |
--- a/talk/media/base/videocapturer_unittest.cc |
+++ b/talk/media/base/videocapturer_unittest.cc |
@@ -33,7 +33,6 @@ |
#include "talk/media/base/fakevideorenderer.h" |
#include "talk/media/base/testutils.h" |
#include "talk/media/base/videocapturer.h" |
-#include "talk/media/base/videoprocessor.h" |
#include "webrtc/base/gunit.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/base/thread.h" |
@@ -49,26 +48,6 @@ const uint32 kTimeout = 5000U; |
} // namespace |
-// Sets the elapsed time in the video frame to 0. |
-class VideoProcessor0 : public cricket::VideoProcessor { |
- public: |
- virtual void OnFrame(uint32 /*ssrc*/, cricket::VideoFrame* frame, |
- bool* drop_frame) { |
- frame->SetElapsedTime(0u); |
- } |
-}; |
- |
-// Adds one to the video frame's elapsed time. Note that VideoProcessor0 and |
-// VideoProcessor1 are not commutative. |
-class VideoProcessor1 : public cricket::VideoProcessor { |
- public: |
- virtual void OnFrame(uint32 /*ssrc*/, cricket::VideoFrame* frame, |
- bool* drop_frame) { |
- int64 elapsed_time = frame->GetElapsedTime(); |
- frame->SetElapsedTime(elapsed_time + 1); |
- } |
-}; |
- |
class VideoCapturerTest |
: public sigslot::has_slots<>, |
public testing::Test { |
@@ -806,47 +785,6 @@ TEST_F(VideoCapturerTest, VideoFrame) { |
EXPECT_TRUE(capturer_.CaptureFrame()); |
EXPECT_EQ(1, video_frames_received()); |
} |
- |
-TEST_F(VideoCapturerTest, ProcessorChainTest) { |
- VideoProcessor0 processor0; |
- VideoProcessor1 processor1; |
- EXPECT_EQ(cricket::CS_RUNNING, capturer_.Start(cricket::VideoFormat( |
- 640, |
- 480, |
- cricket::VideoFormat::FpsToInterval(30), |
- cricket::FOURCC_I420))); |
- EXPECT_TRUE(capturer_.IsRunning()); |
- EXPECT_EQ(0, video_frames_received()); |
- // First processor sets elapsed time to 0. |
- capturer_.AddVideoProcessor(&processor0); |
- // Second processor adds 1 to the elapsed time. I.e. a frames elapsed time |
- // should now always be 1 (and not 0). |
- capturer_.AddVideoProcessor(&processor1); |
- EXPECT_TRUE(capturer_.CaptureFrame()); |
- EXPECT_EQ(1, video_frames_received()); |
- EXPECT_EQ(1u, last_frame_elapsed_time()); |
- capturer_.RemoveVideoProcessor(&processor1); |
- EXPECT_TRUE(capturer_.CaptureFrame()); |
- // Since processor1 has been removed the elapsed time should now be 0. |
- EXPECT_EQ(2, video_frames_received()); |
- EXPECT_EQ(0u, last_frame_elapsed_time()); |
-} |
- |
-TEST_F(VideoCapturerTest, ProcessorDropFrame) { |
- cricket::FakeMediaProcessor dropping_processor_; |
- dropping_processor_.set_drop_frames(true); |
- EXPECT_EQ(cricket::CS_RUNNING, capturer_.Start(cricket::VideoFormat( |
- 640, |
- 480, |
- cricket::VideoFormat::FpsToInterval(30), |
- cricket::FOURCC_I420))); |
- EXPECT_TRUE(capturer_.IsRunning()); |
- EXPECT_EQ(0, video_frames_received()); |
- // Install a processor that always drop frames. |
- capturer_.AddVideoProcessor(&dropping_processor_); |
- EXPECT_TRUE(capturer_.CaptureFrame()); |
- EXPECT_EQ(0, video_frames_received()); |
-} |
#endif // HAVE_WEBRTC_VIDEO |
bool HdFormatInList(const std::vector<cricket::VideoFormat>& formats) { |