| 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..749c0df248ec3bf1c91fc8a230f1ad36b04bf67e 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(
 | 
| @@ -1282,13 +1288,14 @@ JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource)(
 | 
|  }
 | 
|  
 | 
|  JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource2)
 | 
| -(JNIEnv* jni, jclass, jlong native_factory, jobject j_egl_context) {
 | 
| +(JNIEnv* jni, jclass, jlong native_factory, jobject j_egl_context,
 | 
| +    jboolean is_screencast) {
 | 
|    OwnedFactoryAndThreads* factory =
 | 
|        reinterpret_cast<OwnedFactoryAndThreads*>(native_factory);
 | 
|  
 | 
|    rtc::scoped_refptr<webrtc::AndroidVideoTrackSource> source(
 | 
|        new rtc::RefCountedObject<webrtc::AndroidVideoTrackSource>(
 | 
| -          factory->signaling_thread(), jni, j_egl_context));
 | 
| +          factory->signaling_thread(), jni, j_egl_context, is_screencast));
 | 
|    rtc::scoped_refptr<webrtc::VideoTrackSourceProxy> proxy_source =
 | 
|        webrtc::VideoTrackSourceProxy::Create(factory->signaling_thread(),
 | 
|                                              factory->worker_thread(), source);
 | 
| 
 |