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

Unified Diff: talk/media/webrtc/webrtcvideoframe_unittest.cc

Issue 1158273010: Re-land "Convert native handles to buffers before encoding." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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/java/jni/native_handle_impl.h ('k') | webrtc/common_video/i420_buffer_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoframe_unittest.cc
diff --git a/talk/media/webrtc/webrtcvideoframe_unittest.cc b/talk/media/webrtc/webrtcvideoframe_unittest.cc
index 7386f51e7b9c1b4dcfea06f9ac971537c33137e4..daa8ffa46efd5bdb66b4503d0f73b3f655e838f9 100644
--- a/talk/media/webrtc/webrtcvideoframe_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoframe_unittest.cc
@@ -29,6 +29,7 @@
#include "talk/media/base/videoframe_unittest.h"
#include "talk/media/webrtc/webrtcvideoframe.h"
+#include "webrtc/test/fake_texture_frame.h"
namespace {
@@ -297,10 +298,11 @@ TEST_F(WebRtcVideoFrameTest, InitRotated90DontApplyRotation) {
}
TEST_F(WebRtcVideoFrameTest, TextureInitialValues) {
- void* dummy_handle = reinterpret_cast<void*>(0x1);
- webrtc::TextureBuffer* buffer =
- new rtc::RefCountedObject<webrtc::TextureBuffer>(dummy_handle, 640, 480,
- rtc::Callback0<void>());
+ webrtc::test::FakeNativeHandle* dummy_handle =
+ new webrtc::test::FakeNativeHandle();
+ webrtc::NativeHandleBuffer* buffer =
+ new rtc::RefCountedObject<webrtc::test::FakeNativeHandleBuffer>(
+ dummy_handle, 640, 480);
cricket::WebRtcVideoFrame frame(buffer, 100, 200, webrtc::kVideoRotation_0);
EXPECT_EQ(dummy_handle, frame.GetNativeHandle());
EXPECT_EQ(640u, frame.GetWidth());
@@ -314,10 +316,11 @@ TEST_F(WebRtcVideoFrameTest, TextureInitialValues) {
}
TEST_F(WebRtcVideoFrameTest, CopyTextureFrame) {
- void* dummy_handle = reinterpret_cast<void*>(0x1);
- webrtc::TextureBuffer* buffer =
- new rtc::RefCountedObject<webrtc::TextureBuffer>(dummy_handle, 640, 480,
- rtc::Callback0<void>());
+ webrtc::test::FakeNativeHandle* dummy_handle =
+ new webrtc::test::FakeNativeHandle();
+ webrtc::NativeHandleBuffer* buffer =
+ new rtc::RefCountedObject<webrtc::test::FakeNativeHandleBuffer>(
+ dummy_handle, 640, 480);
cricket::WebRtcVideoFrame frame1(buffer, 100, 200, webrtc::kVideoRotation_0);
cricket::VideoFrame* frame2 = frame1.Copy();
EXPECT_EQ(frame1.GetNativeHandle(), frame2->GetNativeHandle());
« no previous file with comments | « talk/app/webrtc/java/jni/native_handle_impl.h ('k') | webrtc/common_video/i420_buffer_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698