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

Unified Diff: webrtc/api/android/jni/peerconnection_jni.cc

Issue 2276593003: Android Screen Capturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix comments. Created 4 years, 4 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
Index: webrtc/api/android/jni/peerconnection_jni.cc
diff --git a/webrtc/api/android/jni/peerconnection_jni.cc b/webrtc/api/android/jni/peerconnection_jni.cc
index 9efe037c9ff2d036976dce06c2e8029ff146a696..94259954901fbe1065309c0a7f32aed82e40b446 100644
--- a/webrtc/api/android/jni/peerconnection_jni.cc
+++ b/webrtc/api/android/jni/peerconnection_jni.cc
@@ -1268,8 +1268,14 @@ JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource)(
rtc::scoped_refptr<webrtc::AndroidVideoCapturerDelegate> delegate =
new rtc::RefCountedObject<AndroidVideoCapturerJni>(
jni, j_video_capturer, j_egl_context);
+
+ jboolean is_screencast = jni->CallBooleanMethod(j_video_capturer,
+ GetMethodID(jni, FindClass(jni, "org/webrtc/VideoCapturer"),
+ "isScreencast", "()Z"));
+ CHECK_EXCEPTION(jni) << "error during creating native video source.";
+
std::unique_ptr<cricket::VideoCapturer> capturer(
- new webrtc::AndroidVideoCapturer(delegate));
+ new webrtc::AndroidVideoCapturer(delegate, is_screencast));
// Create a webrtc::VideoTrackSourceInterface from the cricket::VideoCapturer,
// native factory and constraints.
std::unique_ptr<ConstraintsWrapper> constraints(

Powered by Google App Engine
This is Rietveld 408576698