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

Side by Side Diff: webrtc/sdk/android/api/org/webrtc/PeerConnectionFactoryDatachannelOnly.java

Issue 2767643002: Enable the Java wrapper to load different .so library.
Patch Set: Add static method to the subclass to solve the linking error. Created 3 years, 7 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
(Empty)
1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 package org.webrtc;
12
13 import java.util.List;
14
15 /**
16 * The subclass of PeerConnectionFactoryBase loading with the datachannel only s hared library
17 * support. Main entry point to the PeerConnection API for clients.
18 */
19 public class PeerConnectionFactoryDatachannelOnly extends PeerConnectionFactoryB ase {
Taylor Brandstetter 2017/05/11 10:17:11 Could the class still be called "PeerConnectionFac
20 static {
21 try {
22 System.loadLibrary("jingle_peerconnection_datachannel_only_so");
Taylor Brandstetter 2017/05/11 10:17:11 Is the only difference this line of code? If so, w
23 nativeLibLoaded = true;
24 } catch (UnsatisfiedLinkError t) {
25 nativeLibLoaded = false;
26 }
27 }
28
29 // Must be called at least once before creating a PeerConnectionFactory
30 // (for example, at application startup time).
31 public static void initializeAndroidGlobals(
32 android.content.Context context, boolean videoHwAcceleration) {
33 PeerConnectionFactoryBase.initializeAndroidGlobals(context, videoHwAccelerat ion);
34 }
35 // Field trial initialization. Must be called before PeerConnectionFactory
36 // is created.
37 public static void initializeFieldTrials(String fieldTrialsInitString) {
38 PeerConnectionFactoryBase.initializeFieldTrials(fieldTrialsInitString);
39 }
40 // Wrapper of webrtc::field_trial::FindFullName. Develop the feature with defa ult behaviour off.
41 // Example usage:
42 // if (PeerConnectionFactory.fieldTrialsFindFullName("WebRTCExperiment").equal s("Enabled")) {
43 // method1();
44 // } else {
45 // method2();
46 // }
47 public static String fieldTrialsFindFullName(String name) {
48 return PeerConnectionFactoryBase.fieldTrialsFindFullName(name);
49 }
50 // Internal tracing initialization. Must be called before PeerConnectionFactor y is created to
51 // prevent racing with tracing code.
52 public static void initializeInternalTracer() {
53 PeerConnectionFactoryBase.initializeInternalTracer();
54 }
55 // Internal tracing shutdown, called to prevent resource leaks. Must be called after
56 // PeerConnectionFactory is gone to prevent races with code performing tracing .
57 public static void shutdownInternalTracer() {
58 PeerConnectionFactoryBase.shutdownInternalTracer();
59 }
60 // Start/stop internal capturing of internal tracing.
61 public static boolean startInternalTracingCapture(String tracing_filename) {
62 return PeerConnectionFactoryBase.startInternalTracingCapture(tracing_filenam e);
63 }
64 public static void stopInternalTracingCapture() {
65 PeerConnectionFactoryBase.stopInternalTracingCapture();
66 }
67
68 @Deprecated
69 public PeerConnectionFactoryDatachannelOnly() {
70 super();
71 }
72
73 public PeerConnectionFactoryDatachannelOnly(Options options) {
74 super(options);
75 }
76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698