mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
113 lines
3.3 KiB
Smali
113 lines
3.3 KiB
Smali
.class Lorg/webrtc/NativeCapturerObserver;
|
|
.super Ljava/lang/Object;
|
|
.source "NativeCapturerObserver.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/webrtc/CapturerObserver;
|
|
|
|
|
|
# instance fields
|
|
.field private final nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(J)V
|
|
.locals 1
|
|
|
|
.line 23
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 24
|
|
new-instance v0, Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
invoke-direct {v0, p1, p2}, Lorg/webrtc/NativeAndroidVideoTrackSource;-><init>(J)V
|
|
|
|
iput-object v0, p0, Lorg/webrtc/NativeCapturerObserver;->nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCapturerStarted(Z)V
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lorg/webrtc/NativeCapturerObserver;->nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
.line 29
|
|
invoke-virtual {p0, p1}, Lorg/webrtc/NativeAndroidVideoTrackSource;->setState(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCapturerStopped()V
|
|
.locals 1
|
|
|
|
iget-object p0, p0, Lorg/webrtc/NativeCapturerObserver;->nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 34
|
|
invoke-virtual {p0, v0}, Lorg/webrtc/NativeAndroidVideoTrackSource;->setState(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onFrameCaptured(Lorg/webrtc/VideoFrame;)V
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lorg/webrtc/NativeCapturerObserver;->nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
.line 40
|
|
invoke-virtual {v0, p1}, Lorg/webrtc/NativeAndroidVideoTrackSource;->adaptFrame(Lorg/webrtc/VideoFrame;)Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 47
|
|
:cond_0
|
|
invoke-virtual {p1}, Lorg/webrtc/VideoFrame;->getBuffer()Lorg/webrtc/VideoFrame$Buffer;
|
|
|
|
move-result-object v1
|
|
|
|
iget v2, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->cropX:I
|
|
|
|
iget v3, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->cropY:I
|
|
|
|
iget v4, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->cropWidth:I
|
|
|
|
iget v5, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->cropHeight:I
|
|
|
|
iget v6, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->scaleWidth:I
|
|
|
|
iget v7, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->scaleHeight:I
|
|
|
|
invoke-interface/range {v1 .. v7}, Lorg/webrtc/VideoFrame$Buffer;->cropAndScale(IIIIII)Lorg/webrtc/VideoFrame$Buffer;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object p0, p0, Lorg/webrtc/NativeCapturerObserver;->nativeAndroidVideoTrackSource:Lorg/webrtc/NativeAndroidVideoTrackSource;
|
|
|
|
.line 49
|
|
new-instance v2, Lorg/webrtc/VideoFrame;
|
|
|
|
.line 50
|
|
invoke-virtual {p1}, Lorg/webrtc/VideoFrame;->getRotation()I
|
|
|
|
move-result p1
|
|
|
|
iget-wide v3, v0, Lorg/webrtc/VideoProcessor$FrameAdaptationParameters;->timestampNs:J
|
|
|
|
invoke-direct {v2, v1, p1, v3, v4}, Lorg/webrtc/VideoFrame;-><init>(Lorg/webrtc/VideoFrame$Buffer;IJ)V
|
|
|
|
.line 49
|
|
invoke-virtual {p0, v2}, Lorg/webrtc/NativeAndroidVideoTrackSource;->onFrameCaptured(Lorg/webrtc/VideoFrame;)V
|
|
|
|
.line 51
|
|
invoke-interface {v1}, Lorg/webrtc/VideoFrame$Buffer;->release()V
|
|
|
|
return-void
|
|
.end method
|