Index: webrtc/video_engine/vie_capturer_unittest.cc |
diff --git a/webrtc/video_engine/vie_capturer_unittest.cc b/webrtc/video_engine/vie_capturer_unittest.cc |
index f144c2de0cfd3974baca9b894dfcab7275b5b1eb..3733b3d68c4c80417afb2a8d4520bb27f03ad429 100644 |
--- a/webrtc/video_engine/vie_capturer_unittest.cc |
+++ b/webrtc/video_engine/vie_capturer_unittest.cc |
@@ -24,6 +24,7 @@ |
#include "webrtc/system_wrappers/interface/event_wrapper.h" |
#include "webrtc/system_wrappers/interface/ref_count.h" |
#include "webrtc/system_wrappers/interface/scoped_vector.h" |
+#include "webrtc/test/fake_texture_frame.h" |
using ::testing::_; |
using ::testing::Invoke; |
@@ -159,11 +160,10 @@ TEST_F(ViECapturerTest, TestRtpTimeStampSet) { |
TEST_F(ViECapturerTest, TestTextureFrames) { |
const int kNumFrame = 3; |
for (int i = 0 ; i < kNumFrame; ++i) { |
- void* dummy_handle = reinterpret_cast<void*>(i+1); |
+ test::FakeNativeHandle* dummy_handle = new test::FakeNativeHandle(); |
// Add one to |i| so that width/height > 0. |
- input_frames_.push_back(new VideoFrame(dummy_handle, i + 1, i + 1, i + 1, |
- i + 1, webrtc::kVideoRotation_0, |
- rtc::Callback0<void>())); |
+ input_frames_.push_back(new VideoFrame(test::CreateFakeNativeHandleFrame( |
+ dummy_handle, i + 1, i + 1, i + 1, i + 1, webrtc::kVideoRotation_0))); |
AddInputFrame(input_frames_[i]); |
WaitOutputFrame(); |
EXPECT_EQ(dummy_handle, output_frames_[i]->native_handle()); |
@@ -190,10 +190,9 @@ TEST_F(ViECapturerTest, TestI420Frames) { |
} |
TEST_F(ViECapturerTest, TestI420FrameAfterTextureFrame) { |
- void* dummy_handle = &input_frames_; |
- input_frames_.push_back(new VideoFrame(dummy_handle, 1, 1, 1, 1, |
- webrtc::kVideoRotation_0, |
- rtc::Callback0<void>())); |
+ test::FakeNativeHandle* dummy_handle = new test::FakeNativeHandle(); |
+ input_frames_.push_back(new VideoFrame(test::CreateFakeNativeHandleFrame( |
+ dummy_handle, 1, 1, 1, 1, webrtc::kVideoRotation_0))); |
AddInputFrame(input_frames_[0]); |
WaitOutputFrame(); |
EXPECT_EQ(dummy_handle, output_frames_[0]->native_handle()); |
@@ -210,10 +209,9 @@ TEST_F(ViECapturerTest, TestTextureFrameAfterI420Frame) { |
AddInputFrame(input_frames_[0]); |
WaitOutputFrame(); |
- void* dummy_handle = &input_frames_; |
- input_frames_.push_back(new VideoFrame(dummy_handle, 1, 1, 2, 2, |
- webrtc::kVideoRotation_0, |
- rtc::Callback0<void>())); |
+ test::FakeNativeHandle* dummy_handle = new test::FakeNativeHandle(); |
+ input_frames_.push_back(new VideoFrame(test::CreateFakeNativeHandleFrame( |
+ dummy_handle, 1, 1, 2, 2, webrtc::kVideoRotation_0))); |
AddInputFrame(input_frames_[1]); |
WaitOutputFrame(); |