MediaProjectionSource$DefaultCaptureFactory.smali
.class Lio/agora/rtc2/extensions/MediaProjectionSource$DefaultCaptureFactory;
.super Ljava/lang/Object;
.source "MediaProjectionSource.java"
# interfaces
.implements Lio/agora/rtc2/extensions/MediaProjectionSource$CaptureFactory;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/agora/rtc2/extensions/MediaProjectionSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "DefaultCaptureFactory"
.end annotation
# direct methods
.method constructor <init>()V
.registers 1
.line 93
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public createAudioCapture(IILandroid/media/projection/MediaProjection;Lio/agora/rtc2/extensions/MediaProjectionMgr$AudioRecordErrorCallback;Lio/agora/rtc2/extensions/MediaProjectionMgr$AudioFrameListener;)Lio/agora/rtc2/extensions/MediaProjectionMgr$IAudioCapture;
.registers 13
.line 105
invoke-virtual {p0}, Lio/agora/rtc2/extensions/MediaProjectionSource$DefaultCaptureFactory;->isAudioCaptureSupported()Z
move-result v0
if-nez v0, :cond_8
const/4 p1, 0x0
return-object p1
.line 108
:cond_8
new-instance v6, Lio/agora/rtc2/extensions/AudioCapture;
move-object v0, v6
move v1, p1
move v2, p2
move-object v3, p3
move-object v4, p4
move-object v5, p5
invoke-direct/range {v0 .. v5}, Lio/agora/rtc2/extensions/AudioCapture;-><init>(IILandroid/media/projection/MediaProjection;Lio/agora/rtc2/extensions/MediaProjectionMgr$AudioRecordErrorCallback;Lio/agora/rtc2/extensions/MediaProjectionMgr$AudioFrameListener;)V
return-object v6
.end method
.method public createScreenCapture(IIIZZLandroid/media/projection/MediaProjection;Lio/agora/base/internal/video/VideoSink;)Lio/agora/rtc2/extensions/MediaProjectionMgr$IScreenCapture;
.registers 17
.line 120
invoke-virtual {p0}, Lio/agora/rtc2/extensions/MediaProjectionSource$DefaultCaptureFactory;->isScreenCaptureSupported()Z
move-result v0
if-nez v0, :cond_8
const/4 v0, 0x0
return-object v0
.line 123
:cond_8
new-instance v0, Lio/agora/rtc2/extensions/ScreenCapture;
move-object v1, v0
move v2, p1
move v3, p2
move v4, p3
move v5, p4
move v6, p5
move-object v7, p6
move-object/from16 v8, p7
invoke-direct/range {v1 .. v8}, Lio/agora/rtc2/extensions/ScreenCapture;-><init>(IIIZZLandroid/media/projection/MediaProjection;Lio/agora/base/internal/video/VideoSink;)V
return-object v0
.end method
.method public isAudioCaptureSupported()Z
.registers 3
.line 96
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1d
if-lt v0, v1, :cond_8
const/4 v0, 0x1
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
return v0
.end method
.method public isScreenCaptureSupported()Z
.registers 3
.line 113
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_8
const/4 v0, 0x1
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
return v0
.end method