OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 VideoCapturer capturer, MediaConstraints constraints) { | 118 VideoCapturer capturer, MediaConstraints constraints) { |
119 final EglBase.Context eglContext = | 119 final EglBase.Context eglContext = |
120 localEglbase == null ? null : localEglbase.getEglBaseContext(); | 120 localEglbase == null ? null : localEglbase.getEglBaseContext(); |
121 return new VideoSource(nativeCreateVideoSource(nativeFactory, | 121 return new VideoSource(nativeCreateVideoSource(nativeFactory, |
122 eglContext, capturer, constraints)); | 122 eglContext, capturer, constraints)); |
123 } | 123 } |
124 | 124 |
125 public VideoSource createVideoSource(VideoCapturer capturer) { | 125 public VideoSource createVideoSource(VideoCapturer capturer) { |
126 final EglBase.Context eglContext = | 126 final EglBase.Context eglContext = |
127 localEglbase == null ? null : localEglbase.getEglBaseContext(); | 127 localEglbase == null ? null : localEglbase.getEglBaseContext(); |
128 long nativeAndroidVideoTrackSource = nativeCreateVideoSource2(nativeFactory,
eglContext); | 128 long nativeAndroidVideoTrackSource = nativeCreateVideoSource2( |
| 129 nativeFactory, eglContext, capturer.isScreencast()); |
129 VideoCapturer.CapturerObserver capturerObserver | 130 VideoCapturer.CapturerObserver capturerObserver |
130 = new VideoCapturer.AndroidVideoTrackSourceObserver(nativeAndroidVideoTr
ackSource); | 131 = new VideoCapturer.AndroidVideoTrackSourceObserver(nativeAndroidVideoTr
ackSource); |
131 nativeInitializeVideoCapturer(nativeFactory, capturer, nativeAndroidVideoTra
ckSource, | 132 nativeInitializeVideoCapturer(nativeFactory, capturer, nativeAndroidVideoTra
ckSource, |
132 capturerObserver); | 133 capturerObserver); |
133 return new VideoSource(nativeAndroidVideoTrackSource); | 134 return new VideoSource(nativeAndroidVideoTrackSource); |
134 } | 135 } |
135 | 136 |
136 public VideoTrack createVideoTrack(String id, VideoSource source) { | 137 public VideoTrack createVideoTrack(String id, VideoSource source) { |
137 return new VideoTrack(nativeCreateVideoTrack( | 138 return new VideoTrack(nativeCreateVideoTrack( |
138 nativeFactory, id, source.nativeSource)); | 139 nativeFactory, id, source.nativeSource)); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 MediaConstraints constraints, long nativeObserver); | 246 MediaConstraints constraints, long nativeObserver); |
246 | 247 |
247 private static native long nativeCreateLocalMediaStream( | 248 private static native long nativeCreateLocalMediaStream( |
248 long nativeFactory, String label); | 249 long nativeFactory, String label); |
249 | 250 |
250 private static native long nativeCreateVideoSource( | 251 private static native long nativeCreateVideoSource( |
251 long nativeFactory, EglBase.Context eglContext, VideoCapturer videoCapture
r, | 252 long nativeFactory, EglBase.Context eglContext, VideoCapturer videoCapture
r, |
252 MediaConstraints constraints); | 253 MediaConstraints constraints); |
253 | 254 |
254 private static native long nativeCreateVideoSource2( | 255 private static native long nativeCreateVideoSource2( |
255 long nativeFactory, EglBase.Context eglContext); | 256 long nativeFactory, EglBase.Context eglContext, boolean is_screencast); |
256 | 257 |
257 private static native void nativeInitializeVideoCapturer( | 258 private static native void nativeInitializeVideoCapturer( |
258 long native_factory, VideoCapturer j_video_capturer, long native_source, | 259 long native_factory, VideoCapturer j_video_capturer, long native_source, |
259 VideoCapturer.CapturerObserver j_frame_observer); | 260 VideoCapturer.CapturerObserver j_frame_observer); |
260 | 261 |
261 private static native long nativeCreateVideoTrack( | 262 private static native long nativeCreateVideoTrack( |
262 long nativeFactory, String id, long nativeVideoSource); | 263 long nativeFactory, String id, long nativeVideoSource); |
263 | 264 |
264 private static native long nativeCreateAudioSource( | 265 private static native long nativeCreateAudioSource( |
265 long nativeFactory, MediaConstraints constraints); | 266 long nativeFactory, MediaConstraints constraints); |
266 | 267 |
267 private static native long nativeCreateAudioTrack( | 268 private static native long nativeCreateAudioTrack( |
268 long nativeFactory, String id, long nativeSource); | 269 long nativeFactory, String id, long nativeSource); |
269 | 270 |
270 private static native boolean nativeStartAecDump( | 271 private static native boolean nativeStartAecDump( |
271 long nativeFactory, int file_descriptor, int filesize_limit_bytes); | 272 long nativeFactory, int file_descriptor, int filesize_limit_bytes); |
272 | 273 |
273 private static native void nativeStopAecDump(long nativeFactory); | 274 private static native void nativeStopAecDump(long nativeFactory); |
274 | 275 |
275 @Deprecated | 276 @Deprecated |
276 public native void nativeSetOptions(long nativeFactory, Options options); | 277 public native void nativeSetOptions(long nativeFactory, Options options); |
277 | 278 |
278 private static native void nativeSetVideoHwAccelerationOptions( | 279 private static native void nativeSetVideoHwAccelerationOptions( |
279 long nativeFactory, Object localEGLContext, Object remoteEGLContext); | 280 long nativeFactory, Object localEGLContext, Object remoteEGLContext); |
280 | 281 |
281 private static native void nativeThreadsCallbacks(long nativeFactory); | 282 private static native void nativeThreadsCallbacks(long nativeFactory); |
282 | 283 |
283 private static native void nativeFreeFactory(long nativeFactory); | 284 private static native void nativeFreeFactory(long nativeFactory); |
284 } | 285 } |
OLD | NEW |