Index: webrtc/api/java/jni/peerconnection_jni.cc |
diff --git a/webrtc/api/java/jni/peerconnection_jni.cc b/webrtc/api/java/jni/peerconnection_jni.cc |
index 09e8db24e791f31e566d13f6a3650791b14ac342..47a9b20cae26cf88aaad212e19710e5c5b605eed 100644 |
--- a/webrtc/api/java/jni/peerconnection_jni.cc |
+++ b/webrtc/api/java/jni/peerconnection_jni.cc |
@@ -52,6 +52,7 @@ |
#include "webrtc/api/java/jni/classreferenceholder.h" |
#include "webrtc/api/java/jni/jni_helpers.h" |
#include "webrtc/api/java/jni/native_handle_impl.h" |
+#include "webrtc/api/java/jni/surfacetexturehelper_jni.h" |
#include "webrtc/api/mediaconstraintsinterface.h" |
#include "webrtc/api/peerconnectioninterface.h" |
#include "webrtc/api/rtpreceiverinterface.h" |
@@ -795,7 +796,8 @@ class JavaVideoRendererWrapper |
NativeHandleImpl* handle = |
reinterpret_cast<NativeHandleImpl*>(frame->GetNativeHandle()); |
jfloatArray sampling_matrix = jni()->NewFloatArray(16); |
- jni()->SetFloatArrayRegion(sampling_matrix, 0, 16, handle->sampling_matrix); |
+ jni()->SetFloatArrayRegion(sampling_matrix, 0, 16, |
+ handle->sampling_matrix.elem); |
return jni()->NewObject( |
*j_frame_class_, j_texture_frame_ctor_id_, |
frame->width(), frame->height(), |
@@ -1224,12 +1226,15 @@ JOW(jlong, PeerConnectionFactory_nativeCreateLocalMediaStream)( |
JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource)( |
JNIEnv* jni, jclass, jlong native_factory, jobject j_egl_context, |
jobject j_video_capturer, jobject j_constraints) { |
+ rtc::scoped_refptr<SurfaceTextureHelper> surface_texture_helper = |
+ SurfaceTextureHelper::create( |
+ jni, "Camera SurfaceTextureHelper", j_egl_context); |
// Create a cricket::VideoCapturer from |j_video_capturer|. |
rtc::scoped_refptr<webrtc::AndroidVideoCapturerDelegate> delegate = |
new rtc::RefCountedObject<AndroidVideoCapturerJni>( |
- jni, j_video_capturer, j_egl_context); |
+ jni, j_video_capturer, surface_texture_helper); |
std::unique_ptr<cricket::VideoCapturer> capturer( |
- new webrtc::AndroidVideoCapturer(delegate)); |
+ new webrtc::AndroidVideoCapturer(delegate, surface_texture_helper)); |
// Create a webrtc::VideoTrackSourceInterface from the cricket::VideoCapturer, |
// native factory and constraints. |
std::unique_ptr<ConstraintsWrapper> constraints( |