2020-05-17 12:40:10 +00:00
|
|
|
.class public Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "SoftwareVideoDecoderFactory.java"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static supportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
new-instance v1, Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
const-string v3, "VP8"
|
|
|
|
|
|
|
|
invoke-direct {v1, v3, v2}, Lorg/webrtc/VideoCodecInfo;-><init>(Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {}, Lorg/webrtc/LibvpxVp9Decoder;->nativeIsSupported()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
new-instance v1, Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
const-string v3, "VP9"
|
|
|
|
|
|
|
|
invoke-direct {v1, v3, v2}, Lorg/webrtc/VideoCodecInfo;-><init>(Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
new-array v1, v1, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, [Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public createDecoder(Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
|
|
.locals 2
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-direct {v0, p1, v1}, Lorg/webrtc/VideoCodecInfo;-><init>(Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lorg/webrtc/SoftwareVideoDecoderFactory;->createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public createDecoder(Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lorg/webrtc/VideoCodecInfo;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "VP8"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
new-instance p1, Lorg/webrtc/LibvpxVp8Decoder;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Lorg/webrtc/LibvpxVp8Decoder;-><init>()V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lorg/webrtc/VideoCodecInfo;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "VP9"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
invoke-static {}, Lorg/webrtc/LibvpxVp9Decoder;->nativeIsSupported()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
new-instance p1, Lorg/webrtc/LibvpxVp9Decoder;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Lorg/webrtc/LibvpxVp9Decoder;-><init>()V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getSupportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-static {}, Lorg/webrtc/SoftwareVideoDecoderFactory;->supportedCodecs()[Lorg/webrtc/VideoCodecInfo;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|