940 lines
28 KiB
Smali
940 lines
28 KiB
Smali
.class public Lorg/webrtc/PeerConnectionFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "PeerConnectionFactory.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lorg/webrtc/PeerConnectionFactory$Builder;,
|
|
Lorg/webrtc/PeerConnectionFactory$Options;,
|
|
Lorg/webrtc/PeerConnectionFactory$InitializationOptions;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final TAG:Ljava/lang/String; = "PeerConnectionFactory"
|
|
|
|
.field public static final TRIAL_ENABLED:Ljava/lang/String; = "Enabled"
|
|
|
|
.field public static final VIDEO_CAPTURER_THREAD_NAME:Ljava/lang/String; = "VideoCapturerThread"
|
|
|
|
.field public static final VIDEO_FRAME_EMIT_TRIAL:Ljava/lang/String; = "VideoFrameEmit"
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static volatile internalTracerInitialized:Z
|
|
|
|
.field public static networkThread:Ljava/lang/Thread;
|
|
|
|
.field public static signalingThread:Ljava/lang/Thread;
|
|
|
|
.field public static workerThread:Ljava/lang/Thread;
|
|
|
|
|
|
# instance fields
|
|
.field public nativeFactory:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(J)V
|
|
.locals 3
|
|
.annotation build Lorg/webrtc/CalledByNative;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkInitializeHasBeenCalled()V
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iput-wide p1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
const-string p2, "Failed to initialize PeerConnectionFactory!"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public constructor <init>(Lorg/webrtc/PeerConnectionFactory$Options;Lorg/webrtc/audio/AudioDeviceModule;Lorg/webrtc/AudioEncoderFactoryFactory;Lorg/webrtc/AudioDecoderFactoryFactory;Lorg/webrtc/VideoEncoderFactory;Lorg/webrtc/VideoDecoderFactory;Lorg/webrtc/AudioProcessingFactory;Lorg/webrtc/FecControllerFactoryFactoryInterface;Lorg/webrtc/MediaTransportFactoryFactory;)V
|
|
.locals 19
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lorg/webrtc/PeerConnectionFactory;->checkInitializeHasBeenCalled()V
|
|
|
|
invoke-static {}, Lorg/webrtc/ContextUtils;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const-wide/16 v17, 0x0
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
move-wide/from16 v3, v17
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface/range {p2 .. p2}, Lorg/webrtc/audio/AudioDeviceModule;->getNativeAudioDeviceModulePointer()J
|
|
|
|
move-result-wide v2
|
|
|
|
move-wide v3, v2
|
|
|
|
:goto_0
|
|
invoke-interface/range {p3 .. p3}, Lorg/webrtc/AudioEncoderFactoryFactory;->createNativeAudioEncoderFactory()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-interface/range {p4 .. p4}, Lorg/webrtc/AudioDecoderFactoryFactory;->createNativeAudioDecoderFactory()J
|
|
|
|
move-result-wide v7
|
|
|
|
if-nez p7, :cond_1
|
|
|
|
move-wide/from16 v11, v17
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-interface/range {p7 .. p7}, Lorg/webrtc/AudioProcessingFactory;->createNative()J
|
|
|
|
move-result-wide v9
|
|
|
|
move-wide v11, v9
|
|
|
|
:goto_1
|
|
if-nez p8, :cond_2
|
|
|
|
move-wide/from16 v13, v17
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-interface/range {p8 .. p8}, Lorg/webrtc/FecControllerFactoryFactoryInterface;->createNative()J
|
|
|
|
move-result-wide v9
|
|
|
|
move-wide v13, v9
|
|
|
|
:goto_2
|
|
if-nez p9, :cond_3
|
|
|
|
move-wide/from16 v15, v17
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-interface/range {p9 .. p9}, Lorg/webrtc/MediaTransportFactoryFactory;->createNativeMediaTransportFactory()J
|
|
|
|
move-result-wide v9
|
|
|
|
move-wide v15, v9
|
|
|
|
:goto_3
|
|
move-object/from16 v2, p1
|
|
|
|
move-object/from16 v9, p5
|
|
|
|
move-object/from16 v10, p6
|
|
|
|
invoke-static/range {v1 .. v16}, Lorg/webrtc/PeerConnectionFactory;->nativeCreatePeerConnectionFactory(Landroid/content/Context;Lorg/webrtc/PeerConnectionFactory$Options;JJJLorg/webrtc/VideoEncoderFactory;Lorg/webrtc/VideoDecoderFactory;JJJ)J
|
|
|
|
move-result-wide v1
|
|
|
|
iput-wide v1, v0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
iget-wide v1, v0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
cmp-long v3, v1, v17
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
new-instance v1, Ljava/lang/RuntimeException;
|
|
|
|
const-string v2, "Failed to initialize PeerConnectionFactory!"
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lorg/webrtc/PeerConnectionFactory$Options;Lorg/webrtc/audio/AudioDeviceModule;Lorg/webrtc/AudioEncoderFactoryFactory;Lorg/webrtc/AudioDecoderFactoryFactory;Lorg/webrtc/VideoEncoderFactory;Lorg/webrtc/VideoDecoderFactory;Lorg/webrtc/AudioProcessingFactory;Lorg/webrtc/FecControllerFactoryFactoryInterface;Lorg/webrtc/MediaTransportFactoryFactory;Lorg/webrtc/PeerConnectionFactory$1;)V
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p9}, Lorg/webrtc/PeerConnectionFactory;-><init>(Lorg/webrtc/PeerConnectionFactory$Options;Lorg/webrtc/audio/AudioDeviceModule;Lorg/webrtc/AudioEncoderFactoryFactory;Lorg/webrtc/AudioDecoderFactoryFactory;Lorg/webrtc/VideoEncoderFactory;Lorg/webrtc/VideoDecoderFactory;Lorg/webrtc/AudioProcessingFactory;Lorg/webrtc/FecControllerFactoryFactoryInterface;Lorg/webrtc/MediaTransportFactoryFactory;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static builder()Lorg/webrtc/PeerConnectionFactory$Builder;
|
|
.locals 2
|
|
|
|
new-instance v0, Lorg/webrtc/PeerConnectionFactory$Builder;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lorg/webrtc/PeerConnectionFactory$Builder;-><init>(Lorg/webrtc/PeerConnectionFactory$1;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private checkInitializeHasBeenCalled()V
|
|
.locals 2
|
|
|
|
invoke-static {}, Lorg/webrtc/NativeLibrary;->isLoaded()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {}, Lorg/webrtc/ContextUtils;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "PeerConnectionFactory.initialize was not called before creating a PeerConnectionFactory."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private checkPeerConnectionFactoryExists()V
|
|
.locals 5
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "PeerConnectionFactory has been disposed."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static fieldTrialsFindFullName(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
invoke-static {}, Lorg/webrtc/NativeLibrary;->isLoaded()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0}, Lorg/webrtc/PeerConnectionFactory;->nativeFindFieldTrialsFullName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p0, ""
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static initialize(Lorg/webrtc/PeerConnectionFactory$InitializationOptions;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->applicationContext:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lorg/webrtc/ContextUtils;->initialize(Landroid/content/Context;)V
|
|
|
|
iget-object v0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->nativeLibraryLoader:Lorg/webrtc/NativeLibraryLoader;
|
|
|
|
iget-object v1, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->nativeLibraryName:Ljava/lang/String;
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/NativeLibrary;->initialize(Lorg/webrtc/NativeLibraryLoader;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->nativeInitializeAndroidGlobals()V
|
|
|
|
iget-object v0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->fieldTrials:Ljava/lang/String;
|
|
|
|
invoke-static {v0}, Lorg/webrtc/PeerConnectionFactory;->nativeInitializeFieldTrials(Ljava/lang/String;)V
|
|
|
|
iget-boolean v0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->enableInternalTracer:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-boolean v0, Lorg/webrtc/PeerConnectionFactory;->internalTracerInitialized:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->initializeInternalTracer()V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->loggable:Lorg/webrtc/Loggable;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v1, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->loggableSeverity:Lorg/webrtc/Logging$Severity;
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/Logging;->injectLoggable(Lorg/webrtc/Loggable;Lorg/webrtc/Logging$Severity;)V
|
|
|
|
new-instance v0, Lorg/webrtc/JNILogging;
|
|
|
|
iget-object v1, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->loggable:Lorg/webrtc/Loggable;
|
|
|
|
invoke-direct {v0, v1}, Lorg/webrtc/JNILogging;-><init>(Lorg/webrtc/Loggable;)V
|
|
|
|
iget-object p0, p0, Lorg/webrtc/PeerConnectionFactory$InitializationOptions;->loggableSeverity:Lorg/webrtc/Logging$Severity;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {v0, p0}, Lorg/webrtc/PeerConnectionFactory;->nativeInjectLoggable(Lorg/webrtc/JNILogging;I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string p0, "PeerConnectionFactory"
|
|
|
|
const-string v0, "PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted."
|
|
|
|
invoke-static {p0, v0}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Lorg/webrtc/Logging;->deleteInjectedLoggable()V
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->nativeDeleteLoggable()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static initializeFieldTrials(Ljava/lang/String;)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-static {p0}, Lorg/webrtc/PeerConnectionFactory;->nativeInitializeFieldTrials(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static initializeInternalTracer()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
sput-boolean v0, Lorg/webrtc/PeerConnectionFactory;->internalTracerInitialized:Z
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->nativeInitializeInternalTracer()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static native nativeCreateAudioSource(JLorg/webrtc/MediaConstraints;)J
|
|
.end method
|
|
|
|
.method public static native nativeCreateAudioTrack(JLjava/lang/String;J)J
|
|
.end method
|
|
|
|
.method public static native nativeCreateLocalMediaStream(JLjava/lang/String;)J
|
|
.end method
|
|
|
|
.method public static native nativeCreatePeerConnection(JLorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;JLorg/webrtc/SSLCertificateVerifier;)J
|
|
.end method
|
|
|
|
.method public static native nativeCreatePeerConnectionFactory(Landroid/content/Context;Lorg/webrtc/PeerConnectionFactory$Options;JJJLorg/webrtc/VideoEncoderFactory;Lorg/webrtc/VideoDecoderFactory;JJJ)J
|
|
.end method
|
|
|
|
.method public static native nativeCreateVideoSource(JZZ)J
|
|
.end method
|
|
|
|
.method public static native nativeCreateVideoTrack(JLjava/lang/String;J)J
|
|
.end method
|
|
|
|
.method public static native nativeDeleteLoggable()V
|
|
.end method
|
|
|
|
.method public static native nativeFindFieldTrialsFullName(Ljava/lang/String;)Ljava/lang/String;
|
|
.end method
|
|
|
|
.method public static native nativeFreeFactory(J)V
|
|
.end method
|
|
|
|
.method public static native nativeGetNativePeerConnectionFactory(J)J
|
|
.end method
|
|
|
|
.method public static native nativeInitializeAndroidGlobals()V
|
|
.end method
|
|
|
|
.method public static native nativeInitializeFieldTrials(Ljava/lang/String;)V
|
|
.end method
|
|
|
|
.method public static native nativeInitializeInternalTracer()V
|
|
.end method
|
|
|
|
.method public static native nativeInjectLoggable(Lorg/webrtc/JNILogging;I)V
|
|
.end method
|
|
|
|
.method public static native nativeInvokeThreadsCallbacks(J)V
|
|
.end method
|
|
|
|
.method public static native nativeShutdownInternalTracer()V
|
|
.end method
|
|
|
|
.method public static native nativeStartAecDump(JII)Z
|
|
.end method
|
|
|
|
.method public static native nativeStartInternalTracingCapture(Ljava/lang/String;)Z
|
|
.end method
|
|
|
|
.method public static native nativeStopAecDump(J)V
|
|
.end method
|
|
|
|
.method public static native nativeStopInternalTracingCapture()V
|
|
.end method
|
|
|
|
.method public static onNetworkThreadReady()V
|
|
.locals 2
|
|
.annotation build Lorg/webrtc/CalledByNative;
|
|
.end annotation
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->networkThread:Ljava/lang/Thread;
|
|
|
|
const-string v0, "PeerConnectionFactory"
|
|
|
|
const-string v1, "onNetworkThreadReady"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static onSignalingThreadReady()V
|
|
.locals 2
|
|
.annotation build Lorg/webrtc/CalledByNative;
|
|
.end annotation
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->signalingThread:Ljava/lang/Thread;
|
|
|
|
const-string v0, "PeerConnectionFactory"
|
|
|
|
const-string v1, "onSignalingThreadReady"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static onWorkerThreadReady()V
|
|
.locals 2
|
|
.annotation build Lorg/webrtc/CalledByNative;
|
|
.end annotation
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->workerThread:Ljava/lang/Thread;
|
|
|
|
const-string v0, "PeerConnectionFactory"
|
|
|
|
const-string v1, "onWorkerThreadReady"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static printStackTrace(Ljava/lang/Thread;Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Thread;->getStackTrace()[Ljava/lang/StackTraceElement;
|
|
|
|
move-result-object p0
|
|
|
|
array-length v0, p0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " stacks trace:"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "PeerConnectionFactory"
|
|
|
|
invoke-static {v0, p1}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
array-length p1, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, p1, :cond_0
|
|
|
|
aget-object v2, p0, v1
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StackTraceElement;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v2}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static printStackTraces()V
|
|
.locals 2
|
|
|
|
sget-object v0, Lorg/webrtc/PeerConnectionFactory;->networkThread:Ljava/lang/Thread;
|
|
|
|
const-string v1, "Network thread"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->printStackTrace(Ljava/lang/Thread;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lorg/webrtc/PeerConnectionFactory;->workerThread:Ljava/lang/Thread;
|
|
|
|
const-string v1, "Worker thread"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->printStackTrace(Ljava/lang/Thread;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lorg/webrtc/PeerConnectionFactory;->signalingThread:Ljava/lang/Thread;
|
|
|
|
const-string v1, "Signaling thread"
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->printStackTrace(Ljava/lang/Thread;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static shutdownInternalTracer()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-boolean v0, Lorg/webrtc/PeerConnectionFactory;->internalTracerInitialized:Z
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->nativeShutdownInternalTracer()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static startInternalTracingCapture(Ljava/lang/String;)Z
|
|
.locals 0
|
|
|
|
invoke-static {p0}, Lorg/webrtc/PeerConnectionFactory;->nativeStartInternalTracingCapture(Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static stopInternalTracingCapture()V
|
|
.locals 0
|
|
|
|
invoke-static {}, Lorg/webrtc/PeerConnectionFactory;->nativeStopInternalTracingCapture()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createAudioSource(Lorg/webrtc/MediaConstraints;)Lorg/webrtc/AudioSource;
|
|
.locals 3
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
new-instance v0, Lorg/webrtc/AudioSource;
|
|
|
|
iget-wide v1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v1, v2, p1}, Lorg/webrtc/PeerConnectionFactory;->nativeCreateAudioSource(JLorg/webrtc/MediaConstraints;)J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {v0, v1, v2}, Lorg/webrtc/AudioSource;-><init>(J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createAudioTrack(Ljava/lang/String;Lorg/webrtc/AudioSource;)Lorg/webrtc/AudioTrack;
|
|
.locals 5
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
new-instance v0, Lorg/webrtc/AudioTrack;
|
|
|
|
iget-wide v1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-virtual {p2}, Lorg/webrtc/AudioSource;->getNativeAudioSource()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v1, v2, p1, v3, v4}, Lorg/webrtc/PeerConnectionFactory;->nativeCreateAudioTrack(JLjava/lang/String;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {v0, p1, p2}, Lorg/webrtc/AudioTrack;-><init>(J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createLocalMediaStream(Ljava/lang/String;)Lorg/webrtc/MediaStream;
|
|
.locals 3
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
new-instance v0, Lorg/webrtc/MediaStream;
|
|
|
|
iget-wide v1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v1, v2, p1}, Lorg/webrtc/PeerConnectionFactory;->nativeCreateLocalMediaStream(JLjava/lang/String;)J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {v0, v1, v2}, Lorg/webrtc/MediaStream;-><init>(J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createPeerConnection(Ljava/util/List;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lorg/webrtc/PeerConnection$IceServer;",
|
|
">;",
|
|
"Lorg/webrtc/MediaConstraints;",
|
|
"Lorg/webrtc/PeerConnection$Observer;",
|
|
")",
|
|
"Lorg/webrtc/PeerConnection;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
new-instance v0, Lorg/webrtc/PeerConnection$RTCConfiguration;
|
|
|
|
invoke-direct {v0, p1}, Lorg/webrtc/PeerConnection$RTCConfiguration;-><init>(Ljava/util/List;)V
|
|
|
|
invoke-virtual {p0, v0, p2, p3}, Lorg/webrtc/PeerConnectionFactory;->createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createPeerConnection(Ljava/util/List;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lorg/webrtc/PeerConnection$IceServer;",
|
|
">;",
|
|
"Lorg/webrtc/PeerConnection$Observer;",
|
|
")",
|
|
"Lorg/webrtc/PeerConnection;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lorg/webrtc/PeerConnection$RTCConfiguration;
|
|
|
|
invoke-direct {v0, p1}, Lorg/webrtc/PeerConnection$RTCConfiguration;-><init>(Ljava/util/List;)V
|
|
|
|
invoke-virtual {p0, v0, p2}, Lorg/webrtc/PeerConnectionFactory;->createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, p1, p2, p3, v0}, Lorg/webrtc/PeerConnectionFactory;->createPeerConnectionInternal(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;Lorg/webrtc/SSLCertificateVerifier;)Lorg/webrtc/PeerConnection;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, p1, v0, p2}, Lorg/webrtc/PeerConnectionFactory;->createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;)Lorg/webrtc/PeerConnection;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createPeerConnection(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/PeerConnectionDependencies;)Lorg/webrtc/PeerConnection;
|
|
.locals 2
|
|
|
|
invoke-virtual {p2}, Lorg/webrtc/PeerConnectionDependencies;->getObserver()Lorg/webrtc/PeerConnection$Observer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2}, Lorg/webrtc/PeerConnectionDependencies;->getSSLCertificateVerifier()Lorg/webrtc/SSLCertificateVerifier;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, p1, v1, v0, p2}, Lorg/webrtc/PeerConnectionFactory;->createPeerConnectionInternal(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;Lorg/webrtc/SSLCertificateVerifier;)Lorg/webrtc/PeerConnection;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createPeerConnectionInternal(Lorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;Lorg/webrtc/PeerConnection$Observer;Lorg/webrtc/SSLCertificateVerifier;)Lorg/webrtc/PeerConnection;
|
|
.locals 9
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
invoke-static {p3}, Lorg/webrtc/PeerConnection;->createNativePeerConnectionObserver(Lorg/webrtc/PeerConnection$Observer;)J
|
|
|
|
move-result-wide v4
|
|
|
|
const/4 p3, 0x0
|
|
|
|
const-wide/16 v7, 0x0
|
|
|
|
cmp-long v0, v4, v7
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object p3
|
|
|
|
:cond_0
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v6, p4
|
|
|
|
invoke-static/range {v0 .. v6}, Lorg/webrtc/PeerConnectionFactory;->nativeCreatePeerConnection(JLorg/webrtc/PeerConnection$RTCConfiguration;Lorg/webrtc/MediaConstraints;JLorg/webrtc/SSLCertificateVerifier;)J
|
|
|
|
move-result-wide p1
|
|
|
|
cmp-long p4, p1, v7
|
|
|
|
if-nez p4, :cond_1
|
|
|
|
return-object p3
|
|
|
|
:cond_1
|
|
new-instance p3, Lorg/webrtc/PeerConnection;
|
|
|
|
invoke-direct {p3, p1, p2}, Lorg/webrtc/PeerConnection;-><init>(J)V
|
|
|
|
return-object p3
|
|
.end method
|
|
|
|
.method public createVideoSource(Z)Lorg/webrtc/VideoSource;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p0, p1, v0}, Lorg/webrtc/PeerConnectionFactory;->createVideoSource(ZZ)Lorg/webrtc/VideoSource;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createVideoSource(ZZ)Lorg/webrtc/VideoSource;
|
|
.locals 3
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
new-instance v0, Lorg/webrtc/VideoSource;
|
|
|
|
iget-wide v1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v1, v2, p1, p2}, Lorg/webrtc/PeerConnectionFactory;->nativeCreateVideoSource(JZZ)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {v0, p1, p2}, Lorg/webrtc/VideoSource;-><init>(J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public createVideoTrack(Ljava/lang/String;Lorg/webrtc/VideoSource;)Lorg/webrtc/VideoTrack;
|
|
.locals 5
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
new-instance v0, Lorg/webrtc/VideoTrack;
|
|
|
|
iget-wide v1, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-virtual {p2}, Lorg/webrtc/VideoSource;->getNativeVideoTrackSource()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v1, v2, p1, v3, v4}, Lorg/webrtc/PeerConnectionFactory;->nativeCreateVideoTrack(JLjava/lang/String;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {v0, p1, p2}, Lorg/webrtc/VideoTrack;-><init>(J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public dispose()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->nativeFreeFactory(J)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->networkThread:Ljava/lang/Thread;
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->workerThread:Ljava/lang/Thread;
|
|
|
|
sput-object v0, Lorg/webrtc/PeerConnectionFactory;->signalingThread:Ljava/lang/Thread;
|
|
|
|
invoke-static {}, Lorg/webrtc/MediaCodecVideoEncoder;->disposeEglContext()V
|
|
|
|
invoke-static {}, Lorg/webrtc/MediaCodecVideoDecoder;->disposeEglContext()V
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
iput-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getNativeOwnedFactoryAndThreads()J
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getNativePeerConnectionFactory()J
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->nativeGetNativePeerConnectionFactory(J)J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public startAecDump(II)Z
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v0, v1, p1, p2}, Lorg/webrtc/PeerConnectionFactory;->nativeStartAecDump(JII)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public stopAecDump()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->nativeStopAecDump(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public threadsCallbacks()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lorg/webrtc/PeerConnectionFactory;->checkPeerConnectionFactoryExists()V
|
|
|
|
iget-wide v0, p0, Lorg/webrtc/PeerConnectionFactory;->nativeFactory:J
|
|
|
|
invoke-static {v0, v1}, Lorg/webrtc/PeerConnectionFactory;->nativeInvokeThreadsCallbacks(J)V
|
|
|
|
return-void
|
|
.end method
|