61 lines
1.9 KiB
Smali
61 lines
1.9 KiB
Smali
.class public Lorg/webrtc/DefaultVideoDecoderFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "DefaultVideoDecoderFactory.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/webrtc/VideoDecoderFactory;
|
|
|
|
|
|
# instance fields
|
|
.field private final hardwareVideoDecoderFactory:Lorg/webrtc/HardwareVideoDecoderFactory;
|
|
|
|
.field private final softwareVideoDecoderFactory:Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lorg/webrtc/EglBase$Context;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lorg/webrtc/HardwareVideoDecoderFactory;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, p1, v1}, Lorg/webrtc/HardwareVideoDecoderFactory;-><init>(Lorg/webrtc/EglBase$Context;Z)V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/HardwareVideoDecoderFactory;
|
|
|
|
new-instance p1, Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
invoke-direct {p1}, Lorg/webrtc/SoftwareVideoDecoderFactory;-><init>()V
|
|
|
|
iput-object p1, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createDecoder(Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->hardwareVideoDecoderFactory:Lorg/webrtc/HardwareVideoDecoderFactory;
|
|
|
|
invoke-virtual {v0, p1}, Lorg/webrtc/HardwareVideoDecoderFactory;->createDecoder(Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lorg/webrtc/DefaultVideoDecoderFactory;->softwareVideoDecoderFactory:Lorg/webrtc/SoftwareVideoDecoderFactory;
|
|
|
|
invoke-virtual {v0, p1}, Lorg/webrtc/SoftwareVideoDecoderFactory;->createDecoder(Ljava/lang/String;)Lorg/webrtc/VideoDecoder;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|