diff options
author | wuchengli@chromium.org <wuchengli@chromium.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-05-28 07:00:51 +0000 |
---|---|---|
committer | wuchengli@chromium.org <wuchengli@chromium.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-05-28 07:00:51 +0000 |
commit | 1bdf186e6ae8d2f1a7d055237a75c0d7fd189624 (patch) | |
tree | 177d34dd7671cde3d7f785ac3110b17ffef74936 /video_engine/encoder_state_feedback_unittest.cc | |
parent | 605e4d0b2646bade7b814d3efca23a7acbd85ff8 (diff) | |
download | webrtc-1bdf186e6ae8d2f1a7d055237a75c0d7fd189624.tar.gz |
Add support of texture frames for video capturer.
This is a reland of r6252. The video_capture_tests failure on
builder Android Chromium-APK Tests should be flaky.
- Add ViECapturer unittest.
- Add CloneFrame function in I420VideoFrame.
- Encoders do not support texture yet and texture frames
are dropped in ViEEncoder for now.
Corresponding CLs:
https://codereview.chromium.org/277943002
http://cl/66620352
BUG=chromium:362437
TEST=WebRTC video stream forwarding, video_engine_core_unittests,
common_video_unittests and video_capture_tests_apk.
TBR=fischman@webrtc.org, perkj@webrtc.org, stefan@webrtc.org, wu@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/12609004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6258 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/encoder_state_feedback_unittest.cc')
-rw-r--r-- | video_engine/encoder_state_feedback_unittest.cc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/video_engine/encoder_state_feedback_unittest.cc b/video_engine/encoder_state_feedback_unittest.cc index f85d9897..4e15752f 100644 --- a/video_engine/encoder_state_feedback_unittest.cc +++ b/video_engine/encoder_state_feedback_unittest.cc @@ -17,26 +17,17 @@ #include "webrtc/common.h" #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" -#include "webrtc/modules/utility/interface/process_thread.h" +#include "webrtc/modules/utility/interface/mock/mock_process_thread.h" #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/video_engine/vie_encoder.h" -namespace webrtc { +using ::testing::NiceMock; -// TODO(mflodman) Create a common mock in module utility. -class TestProcessThread : public ProcessThread { - public: - TestProcessThread() {} - ~TestProcessThread() {} - virtual int32_t Start() { return 0; } - virtual int32_t Stop() { return 0; } - virtual int32_t RegisterModule(Module* module) { return 0; } - virtual int32_t DeRegisterModule(const Module* module) { return 0; } -}; +namespace webrtc { class MockVieEncoder : public ViEEncoder { public: - explicit MockVieEncoder(TestProcessThread* process_thread) + explicit MockVieEncoder(ProcessThread* process_thread) : ViEEncoder(1, 1, 1, config_, *process_thread, NULL) {} ~MockVieEncoder() {} @@ -55,10 +46,10 @@ class MockVieEncoder : public ViEEncoder { class VieKeyRequestTest : public ::testing::Test { protected: virtual void SetUp() { - process_thread_.reset(new TestProcessThread()); + process_thread_.reset(new NiceMock<MockProcessThread>); encoder_state_feedback_.reset(new EncoderStateFeedback()); } - scoped_ptr<TestProcessThread> process_thread_; + scoped_ptr<MockProcessThread> process_thread_; scoped_ptr<EncoderStateFeedback> encoder_state_feedback_; }; |