mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
144 lines
4.3 KiB
Smali
144 lines
4.3 KiB
Smali
.class public Lorg/webrtc/DefaultVideoEncoderFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "DefaultVideoEncoderFactory.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
|
|
# instance fields
|
|
.field private final hardwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.field private final softwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lorg/webrtc/EglBase$Context;ZZ)V
|
|
.locals 1
|
|
|
|
.line 24
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 20
|
|
new-instance v0, Lorg/webrtc/SoftwareVideoEncoderFactory;
|
|
|
|
invoke-direct {v0}, Lorg/webrtc/SoftwareVideoEncoderFactory;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->softwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.line 25
|
|
new-instance v0, Lorg/webrtc/HardwareVideoEncoderFactory;
|
|
|
|
invoke-direct {v0, p1, p2, p3}, Lorg/webrtc/HardwareVideoEncoderFactory;-><init>(Lorg/webrtc/EglBase$Context;ZZ)V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->hardwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>(Lorg/webrtc/VideoEncoderFactory;)V
|
|
.locals 1
|
|
|
|
.line 30
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 20
|
|
new-instance v0, Lorg/webrtc/SoftwareVideoEncoderFactory;
|
|
|
|
invoke-direct {v0}, Lorg/webrtc/SoftwareVideoEncoderFactory;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->softwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
iput-object p1, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->hardwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createEncoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoEncoder;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->softwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.line 37
|
|
invoke-interface {v0, p1}, Lorg/webrtc/VideoEncoderFactory;->createEncoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoEncoder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object p0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->hardwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.line 38
|
|
invoke-interface {p0, p1}, Lorg/webrtc/VideoEncoderFactory;->createEncoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoEncoder;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 41
|
|
new-instance p1, Lorg/webrtc/VideoEncoderFallback;
|
|
|
|
invoke-direct {p1, v0, p0}, Lorg/webrtc/VideoEncoderFallback;-><init>(Lorg/webrtc/VideoEncoder;Lorg/webrtc/VideoEncoder;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
if-eqz p0, :cond_1
|
|
|
|
move-object v0, p0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getSupportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
.locals 2
|
|
|
|
.line 49
|
|
new-instance v0, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
|
|
|
|
iget-object v1, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->softwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.line 51
|
|
invoke-interface {v1}, Lorg/webrtc/VideoEncoderFactory;->getSupportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/LinkedHashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
iget-object p0, p0, Lorg/webrtc/DefaultVideoEncoderFactory;->hardwareVideoEncoderFactory:Lorg/webrtc/VideoEncoderFactory;
|
|
|
|
.line 52
|
|
invoke-interface {p0}, Lorg/webrtc/VideoEncoderFactory;->getSupportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/LinkedHashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 54
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->size()I
|
|
|
|
move-result p0
|
|
|
|
new-array p0, p0, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/LinkedHashSet;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
return-object p0
|
|
.end method
|