185 lines
5.9 KiB
Smali
185 lines
5.9 KiB
Smali
.class public Lorg/webrtc/DefaultVideoDecoderFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "DefaultVideoDecoderFactory.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
|
|
# instance fields
|
|
.field public final hardwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
.field public final platformSoftwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
.field public final softwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lorg/webrtc/EglBase$Context;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
invoke-direct {v0}, Lorg/webrtc/SoftwareVideoDecoderFactory;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
new-instance v0, Lorg/webrtc/HardwareVideoDecoderFactory;
|
|
|
|
invoke-direct {v0, p1}, Lorg/webrtc/HardwareVideoDecoderFactory;-><init>(Lorg/webrtc/EglBase$Context;)V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
new-instance v0, Lorg/webrtc/PlatformSoftwareVideoDecoderFactory;
|
|
|
|
invoke-direct {v0, p1}, Lorg/webrtc/PlatformSoftwareVideoDecoderFactory;-><init>(Lorg/webrtc/EglBase$Context;)V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->platformSoftwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lorg/webrtc/VideoDecoderFactory;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
invoke-direct {v0}, Lorg/webrtc/SoftwareVideoDecoderFactory;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
iput-object p1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-object p1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->platformSoftwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic createDecoder(Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-static {p0, p1}, Li0/c/l0;->$default$createDecoder(Lorg/webrtc/VideoDecoderFactory;Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
invoke-interface {v0, p1}, Lorg/webrtc/VideoDecoderFactory;->createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
invoke-interface {v1, p1}, Lorg/webrtc/VideoDecoderFactory;->createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v2, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->platformSoftwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v2, p1}, Lorg/webrtc/VideoDecoderFactory;->createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
if-eqz v1, :cond_1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
new-instance p1, Lorg/webrtc/VideoDecoderFallback;
|
|
|
|
invoke-direct {p1, v0, v1}, Lorg/webrtc/VideoDecoderFallback;-><init>(Lorg/webrtc/VideoDecoder;Lorg/webrtc/VideoDecoder;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public getSupportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
|
|
|
|
iget-object v1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
invoke-interface {v1}, Lorg/webrtc/VideoDecoderFactory;->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 v1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
invoke-interface {v1}, Lorg/webrtc/VideoDecoderFactory;->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 v1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->platformSoftwareVideoDecoderFactory:Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v1}, Lorg/webrtc/VideoDecoderFactory;->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
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->size()I
|
|
|
|
move-result v1
|
|
|
|
new-array v1, v1, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/LinkedHashSet;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
return-object v0
|
|
.end method
|