226 lines
7.2 KiB
Smali
226 lines
7.2 KiB
Smali
|
.class Lorg/webrtc/Camera1Session$2;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Camera1Session.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lorg/webrtc/SurfaceTextureHelper$OnTextureFrameAvailableListener;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
||
|
value = Lorg/webrtc/Camera1Session;->listenForTextureFrames()V
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x0
|
||
|
name = null
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field final synthetic this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method constructor <init>(Lorg/webrtc/Camera1Session;)V
|
||
|
.locals 0
|
||
|
|
||
|
iput-object p1, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public onTextureFrameAvailable(I[FJ)V
|
||
|
.locals 11
|
||
|
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$200(Lorg/webrtc/Camera1Session;)V
|
||
|
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$300(Lorg/webrtc/Camera1Session;)Lorg/webrtc/Camera1Session$SessionState;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
sget-object v1, Lorg/webrtc/Camera1Session$SessionState;->RUNNING:Lorg/webrtc/Camera1Session$SessionState;
|
||
|
|
||
|
if-eq v0, v1, :cond_0
|
||
|
|
||
|
const-string p1, "Camera1Session"
|
||
|
|
||
|
const-string p2, "Texture frame captured but camera is no longer running."
|
||
|
|
||
|
invoke-static {p1, p2}, Lorg/webrtc/Logging;->d(Ljava/lang/String;Ljava/lang/String;)V
|
||
|
|
||
|
iget-object p1, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p1}, Lorg/webrtc/Camera1Session;->access$400(Lorg/webrtc/Camera1Session;)Lorg/webrtc/SurfaceTextureHelper;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Lorg/webrtc/SurfaceTextureHelper;->returnTextureFrame()V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$500(Lorg/webrtc/Camera1Session;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
|
||
|
|
||
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
iget-object v4, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v4}, Lorg/webrtc/Camera1Session;->access$600(Lorg/webrtc/Camera1Session;)J
|
||
|
|
||
|
move-result-wide v4
|
||
|
|
||
|
sub-long/2addr v2, v4
|
||
|
|
||
|
invoke-virtual {v0, v2, v3}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
long-to-int v0, v2
|
||
|
|
||
|
invoke-static {}, Lorg/webrtc/Camera1Session;->access$700()Lorg/webrtc/Histogram;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
invoke-virtual {v2, v0}, Lorg/webrtc/Histogram;->addSample(I)V
|
||
|
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0, v1}, Lorg/webrtc/Camera1Session;->access$502(Lorg/webrtc/Camera1Session;Z)Z
|
||
|
|
||
|
:cond_1
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$800(Lorg/webrtc/Camera1Session;)I
|
||
|
|
||
|
move-result v8
|
||
|
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$900(Lorg/webrtc/Camera1Session;)Landroid/hardware/Camera$CameraInfo;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget v0, v0, Landroid/hardware/Camera$CameraInfo;->facing:I
|
||
|
|
||
|
if-ne v0, v1, :cond_2
|
||
|
|
||
|
invoke-static {}, Lorg/webrtc/RendererCommon;->horizontalFlipMatrix()[F
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p2, v0}, Lorg/webrtc/RendererCommon;->multiplyMatrices([F[F)[F
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
:cond_2
|
||
|
move-object v7, p2
|
||
|
|
||
|
iget-object p2, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p2}, Lorg/webrtc/Camera1Session;->access$1000(Lorg/webrtc/Camera1Session;)Z
|
||
|
|
||
|
move-result p2
|
||
|
|
||
|
if-eqz p2, :cond_3
|
||
|
|
||
|
iget-object p1, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p1}, Lorg/webrtc/Camera1Session;->access$400(Lorg/webrtc/Camera1Session;)Lorg/webrtc/SurfaceTextureHelper;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
iget-object p2, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p2}, Lorg/webrtc/Camera1Session;->access$1100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
iget p2, p2, Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;->width:I
|
||
|
|
||
|
iget-object v0, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/Camera1Session;->access$1100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget v0, v0, Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;->height:I
|
||
|
|
||
|
invoke-static {v7}, Lorg/webrtc/RendererCommon;->convertMatrixToAndroidGraphicsMatrix([F)Landroid/graphics/Matrix;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {p1, p2, v0, v1}, Lorg/webrtc/SurfaceTextureHelper;->createTextureBuffer(IILandroid/graphics/Matrix;)Lorg/webrtc/VideoFrame$TextureBuffer;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
new-instance p2, Lorg/webrtc/VideoFrame;
|
||
|
|
||
|
invoke-direct {p2, p1, v8, p3, p4}, Lorg/webrtc/VideoFrame;-><init>(Lorg/webrtc/VideoFrame$Buffer;IJ)V
|
||
|
|
||
|
iget-object p1, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p1}, Lorg/webrtc/Camera1Session;->access$100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraSession$Events;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
iget-object p3, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-interface {p1, p3, p2}, Lorg/webrtc/CameraSession$Events;->onFrameCaptured(Lorg/webrtc/CameraSession;Lorg/webrtc/VideoFrame;)V
|
||
|
|
||
|
invoke-virtual {p2}, Lorg/webrtc/VideoFrame;->release()V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_3
|
||
|
iget-object p2, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p2}, Lorg/webrtc/Camera1Session;->access$100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraSession$Events;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
iget-object v3, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {v3}, Lorg/webrtc/Camera1Session;->access$1100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
iget v4, p2, Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;->width:I
|
||
|
|
||
|
iget-object p2, p0, Lorg/webrtc/Camera1Session$2;->this$0:Lorg/webrtc/Camera1Session;
|
||
|
|
||
|
invoke-static {p2}, Lorg/webrtc/Camera1Session;->access$1100(Lorg/webrtc/Camera1Session;)Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
iget v5, p2, Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;->height:I
|
||
|
|
||
|
move v6, p1
|
||
|
|
||
|
move-wide v9, p3
|
||
|
|
||
|
invoke-interface/range {v2 .. v10}, Lorg/webrtc/CameraSession$Events;->onTextureFrameCaptured(Lorg/webrtc/CameraSession;III[FIJ)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|