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

Side by Side Diff: webrtc/api/android/java/src/org/webrtc/PeerConnectionFactory.java

Issue 2276593003: Android Screen Capturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: merge master Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 public MediaStream createLocalMediaStream(String label) { 109 public MediaStream createLocalMediaStream(String label) {
110 return new MediaStream( 110 return new MediaStream(
111 nativeCreateLocalMediaStream(nativeFactory, label)); 111 nativeCreateLocalMediaStream(nativeFactory, label));
112 } 112 }
113 113
114 public VideoSource createVideoSource(VideoCapturer capturer) { 114 public VideoSource createVideoSource(VideoCapturer capturer) {
115 final EglBase.Context eglContext = 115 final EglBase.Context eglContext =
116 localEglbase == null ? null : localEglbase.getEglBaseContext(); 116 localEglbase == null ? null : localEglbase.getEglBaseContext();
117 long nativeAndroidVideoTrackSource = nativeCreateVideoSource(nativeFactory, eglContext); 117 long nativeAndroidVideoTrackSource = nativeCreateVideoSource(
118 nativeFactory, eglContext, capturer.isScreencast());
118 VideoCapturer.CapturerObserver capturerObserver 119 VideoCapturer.CapturerObserver capturerObserver
119 = new VideoCapturer.AndroidVideoTrackSourceObserver(nativeAndroidVideoTr ackSource); 120 = new VideoCapturer.AndroidVideoTrackSourceObserver(nativeAndroidVideoTr ackSource);
120 nativeInitializeVideoCapturer(nativeFactory, capturer, nativeAndroidVideoTra ckSource, 121 nativeInitializeVideoCapturer(nativeFactory, capturer, nativeAndroidVideoTra ckSource,
121 capturerObserver); 122 capturerObserver);
122 return new VideoSource(nativeAndroidVideoTrackSource); 123 return new VideoSource(nativeAndroidVideoTrackSource);
123 } 124 }
124 125
125 public VideoTrack createVideoTrack(String id, VideoSource source) { 126 public VideoTrack createVideoTrack(String id, VideoSource source) {
126 return new VideoTrack(nativeCreateVideoTrack( 127 return new VideoTrack(nativeCreateVideoTrack(
127 nativeFactory, id, source.nativeSource)); 128 nativeFactory, id, source.nativeSource));
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 PeerConnection.Observer observer); 231 PeerConnection.Observer observer);
231 232
232 private static native long nativeCreatePeerConnection( 233 private static native long nativeCreatePeerConnection(
233 long nativeFactory, PeerConnection.RTCConfiguration rtcConfig, 234 long nativeFactory, PeerConnection.RTCConfiguration rtcConfig,
234 MediaConstraints constraints, long nativeObserver); 235 MediaConstraints constraints, long nativeObserver);
235 236
236 private static native long nativeCreateLocalMediaStream( 237 private static native long nativeCreateLocalMediaStream(
237 long nativeFactory, String label); 238 long nativeFactory, String label);
238 239
239 private static native long nativeCreateVideoSource( 240 private static native long nativeCreateVideoSource(
240 long nativeFactory, EglBase.Context eglContext); 241 long nativeFactory, EglBase.Context eglContext, boolean is_screencast);
241 242
242 private static native void nativeInitializeVideoCapturer( 243 private static native void nativeInitializeVideoCapturer(
243 long native_factory, VideoCapturer j_video_capturer, long native_source, 244 long native_factory, VideoCapturer j_video_capturer, long native_source,
244 VideoCapturer.CapturerObserver j_frame_observer); 245 VideoCapturer.CapturerObserver j_frame_observer);
245 246
246 private static native long nativeCreateVideoTrack( 247 private static native long nativeCreateVideoTrack(
247 long nativeFactory, String id, long nativeVideoSource); 248 long nativeFactory, String id, long nativeVideoSource);
248 249
249 private static native long nativeCreateAudioSource( 250 private static native long nativeCreateAudioSource(
250 long nativeFactory, MediaConstraints constraints); 251 long nativeFactory, MediaConstraints constraints);
251 252
252 private static native long nativeCreateAudioTrack( 253 private static native long nativeCreateAudioTrack(
253 long nativeFactory, String id, long nativeSource); 254 long nativeFactory, String id, long nativeSource);
254 255
255 private static native boolean nativeStartAecDump( 256 private static native boolean nativeStartAecDump(
256 long nativeFactory, int file_descriptor, int filesize_limit_bytes); 257 long nativeFactory, int file_descriptor, int filesize_limit_bytes);
257 258
258 private static native void nativeStopAecDump(long nativeFactory); 259 private static native void nativeStopAecDump(long nativeFactory);
259 260
260 @Deprecated 261 @Deprecated
261 public native void nativeSetOptions(long nativeFactory, Options options); 262 public native void nativeSetOptions(long nativeFactory, Options options);
262 263
263 private static native void nativeSetVideoHwAccelerationOptions( 264 private static native void nativeSetVideoHwAccelerationOptions(
264 long nativeFactory, Object localEGLContext, Object remoteEGLContext); 265 long nativeFactory, Object localEGLContext, Object remoteEGLContext);
265 266
266 private static native void nativeThreadsCallbacks(long nativeFactory); 267 private static native void nativeThreadsCallbacks(long nativeFactory);
267 268
268 private static native void nativeFreeFactory(long nativeFactory); 269 private static native void nativeFreeFactory(long nativeFactory);
269 } 270 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698