今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2056 lines
46 KiB

.class public Lcom/viatech/VrPlayer/VideoPlayer;
.super Ljava/lang/Object;
.source "VideoPlayer.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;,
Lcom/viatech/VrPlayer/VideoPlayer$Listener;
}
.end annotation
# static fields
.field private static final MSG_VIDEO_DECODER_CONFIG:I = 0x2711
.field private static final MSG_VIDEO_DECODER_DECODE:I = 0x2712
.field private static final MSG_VIDEO_DECODER_SHOW:I = 0x2713
.field private static final MSG_VIDEO_DECODER_START:I = 0x2710
.field private static final MSG_VIDEO_DECODER_STOP:I = 0x2714
.field public static final VIDEO_DECODE_ERROR:I = 0x1
.field private static sMediaCodecCount:I
.field private static final sMutex:Ljava/lang/Object;
# instance fields
.field private final FRAME_FLUSH:I
.field private final IDR_TYPE:I
.field private final PACKET_FLUSH:I
.field private final SEI_TYPE:I
.field private final SLICE_TYPE:I
.field private final SPS_TYPE:I
.field private TAG:Ljava/lang/String;
.field private mAddFrameNumbers:I
.field private mAudioPlayer:Lcom/viatech/VrPlayer/AudioPlayer;
.field private mBufferedFrameNumbers:I
.field private mCodecInputBuffers:[Ljava/nio/ByteBuffer;
.field private mConfigData:[B
.field private mConfiged:I
.field private mDecodeErrorCounts:I
.field private final mDecodeInterval:J
.field private mDisplayFrameNumbers:I
.field private mFastMode:Z
.field private final mFastModeInterval:J
.field private mHeight:I
.field private mInputFrame:I
.field private mLastDecodeTime:J
.field private mLastPacketVideoTime:J
.field private mListener:Lcom/viatech/VrPlayer/VideoPlayer$Listener;
.field private final mMaxBufferFrameNumber:I
.field private mMediaCodec:Landroid/media/MediaCodec;
.field private final mMimeString:Ljava/lang/String;
.field private final mMinBufferFrameNumber:I
.field private mObject:Ljava/lang/Object;
.field private mOutputFrame:I
.field private mPaused:I
.field private mSurface:Landroid/view/Surface;
.field private mVideoFlush:I
.field private mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
.field private mWidth:I
.field private mWorkThread:Landroid/os/HandlerThread;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 25
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMutex:Ljava/lang/Object;
return-void
.end method
.method public constructor <init>(Landroid/view/Surface;Lcom/viatech/VrPlayer/AudioPlayer;)V
.locals 4
.prologue
const/4 v1, 0x1
const/4 v3, 0x0
const/4 v2, 0x0
.line 71
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 16
const-string v0, "Vpai_VideoPlayer"
iput-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
.line 34
const-string v0, "video/avc"
iput-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMimeString:Ljava/lang/String;
.line 35
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->SLICE_TYPE:I
.line 36
const/4 v0, 0x5
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->IDR_TYPE:I
.line 37
const/4 v0, 0x6
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->SEI_TYPE:I
.line 38
const/4 v0, 0x7
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->SPS_TYPE:I
.line 39
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->PACKET_FLUSH:I
.line 40
const/4 v0, 0x2
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->FRAME_FLUSH:I
.line 42
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mSurface:Landroid/view/Surface;
.line 43
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMediaCodec:Landroid/media/MediaCodec;
.line 44
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mCodecInputBuffers:[Ljava/nio/ByteBuffer;
.line 45
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWorkThread:Landroid/os/HandlerThread;
.line 46
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
.line 47
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAudioPlayer:Lcom/viatech/VrPlayer/AudioPlayer;
.line 48
const/16 v0, 0x500
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWidth:I
.line 49
const/16 v0, 0x2d0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mHeight:I
.line 50
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
.line 51
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfigData:[B
.line 52
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mInputFrame:I
.line 53
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mOutputFrame:I
.line 54
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastDecodeTime:J
.line 55
const-wide/16 v0, -0x1
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
.line 56
const-wide/16 v0, 0x28
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDecodeInterval:J
.line 57
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
.line 58
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
.line 59
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
.line 60
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAddFrameNumbers:I
.line 61
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDisplayFrameNumbers:I
.line 62
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
.line 63
const/16 v0, 0xf
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMaxBufferFrameNumber:I
.line 64
const/16 v0, 0x8
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMinBufferFrameNumber:I
.line 65
iput-boolean v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
.line 66
const-wide/16 v0, 0x1e
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastModeInterval:J
.line 69
iput-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mListener:Lcom/viatech/VrPlayer/VideoPlayer$Listener;
.line 72
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mSurface:Landroid/view/Surface;
.line 73
iput-object p2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAudioPlayer:Lcom/viatech/VrPlayer/AudioPlayer;
.line 75
new-instance v0, Landroid/os/HandlerThread;
const-string v1, "VideoPlayer"
invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
iput-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWorkThread:Landroid/os/HandlerThread;
.line 76
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWorkThread:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V
.line 77
new-instance v0, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWorkThread:Landroid/os/HandlerThread;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, p0, v1}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;-><init>(Lcom/viatech/VrPlayer/VideoPlayer;Landroid/os/Looper;)V
iput-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
.line 78
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "create VideoPlayer, surface="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 79
return-void
.end method
.method static synthetic access$000()Ljava/lang/Object;
.locals 1
.prologue
.line 15
sget-object v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMutex:Ljava/lang/Object;
return-object v0
.end method
.method static synthetic access$100(Lcom/viatech/VrPlayer/VideoPlayer;)Landroid/media/MediaCodec;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMediaCodec:Landroid/media/MediaCodec;
return-object v0
.end method
.method static synthetic access$1000(Lcom/viatech/VrPlayer/VideoPlayer;)[Ljava/nio/ByteBuffer;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mCodecInputBuffers:[Ljava/nio/ByteBuffer;
return-object v0
.end method
.method static synthetic access$1002(Lcom/viatech/VrPlayer/VideoPlayer;[Ljava/nio/ByteBuffer;)[Ljava/nio/ByteBuffer;
.locals 0
.prologue
.line 15
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mCodecInputBuffers:[Ljava/nio/ByteBuffer;
return-object p1
.end method
.method static synthetic access$102(Lcom/viatech/VrPlayer/VideoPlayer;Landroid/media/MediaCodec;)Landroid/media/MediaCodec;
.locals 0
.prologue
.line 15
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mMediaCodec:Landroid/media/MediaCodec;
return-object p1
.end method
.method static synthetic access$1100([B)Ljava/lang/String;
.locals 1
.prologue
.line 15
invoke-static {p0}, Lcom/viatech/VrPlayer/VideoPlayer;->byte2hex([B)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method static synthetic access$1200(Lcom/viatech/VrPlayer/VideoPlayer;)Ljava/lang/Object;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
return-object v0
.end method
.method static synthetic access$1300(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
return v0
.end method
.method static synthetic access$1302(Lcom/viatech/VrPlayer/VideoPlayer;I)I
.locals 0
.prologue
.line 15
iput p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
return p1
.end method
.method static synthetic access$1400(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
return v0
.end method
.method static synthetic access$1402(Lcom/viatech/VrPlayer/VideoPlayer;I)I
.locals 0
.prologue
.line 15
iput p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
return p1
.end method
.method static synthetic access$1500(Lcom/viatech/VrPlayer/VideoPlayer;)Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
return-object v0
.end method
.method static synthetic access$1608(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 2
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mInputFrame:I
add-int/lit8 v1, v0, 0x1
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mInputFrame:I
return v0
.end method
.method static synthetic access$1710(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 2
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
add-int/lit8 v1, v0, -0x1
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
return v0
.end method
.method static synthetic access$1800(Lcom/viatech/VrPlayer/VideoPlayer;)Lcom/viatech/VrPlayer/VideoPlayer$Listener;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mListener:Lcom/viatech/VrPlayer/VideoPlayer$Listener;
return-object v0
.end method
.method static synthetic access$1908(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 2
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mOutputFrame:I
add-int/lit8 v1, v0, 0x1
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mOutputFrame:I
return v0
.end method
.method static synthetic access$200()I
.locals 1
.prologue
.line 15
sget v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
return v0
.end method
.method static synthetic access$2000(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
invoke-direct {p0}, Lcom/viatech/VrPlayer/VideoPlayer;->addDisplayFrameNumber()I
move-result v0
return v0
.end method
.method static synthetic access$208()I
.locals 2
.prologue
.line 15
sget v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
add-int/lit8 v1, v0, 0x1
sput v1, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
return v0
.end method
.method static synthetic access$210()I
.locals 2
.prologue
.line 15
sget v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
add-int/lit8 v1, v0, -0x1
sput v1, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
return v0
.end method
.method static synthetic access$2100(Lcom/viatech/VrPlayer/VideoPlayer;)Landroid/os/HandlerThread;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWorkThread:Landroid/os/HandlerThread;
return-object v0
.end method
.method static synthetic access$300(Lcom/viatech/VrPlayer/VideoPlayer;)Ljava/lang/String;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
return-object v0
.end method
.method static synthetic access$400(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDecodeErrorCounts:I
return v0
.end method
.method static synthetic access$402(Lcom/viatech/VrPlayer/VideoPlayer;I)I
.locals 0
.prologue
.line 15
iput p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDecodeErrorCounts:I
return p1
.end method
.method static synthetic access$408(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 2
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDecodeErrorCounts:I
add-int/lit8 v1, v0, 0x1
iput v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDecodeErrorCounts:I
return v0
.end method
.method static synthetic access$500(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
return v0
.end method
.method static synthetic access$502(Lcom/viatech/VrPlayer/VideoPlayer;I)I
.locals 0
.prologue
.line 15
iput p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
return p1
.end method
.method static synthetic access$600(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mWidth:I
return v0
.end method
.method static synthetic access$700(Lcom/viatech/VrPlayer/VideoPlayer;)I
.locals 1
.prologue
.line 15
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mHeight:I
return v0
.end method
.method static synthetic access$800(Lcom/viatech/VrPlayer/VideoPlayer;)[B
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfigData:[B
return-object v0
.end method
.method static synthetic access$802(Lcom/viatech/VrPlayer/VideoPlayer;[B)[B
.locals 0
.prologue
.line 15
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfigData:[B
return-object p1
.end method
.method static synthetic access$900(Lcom/viatech/VrPlayer/VideoPlayer;)Landroid/view/Surface;
.locals 1
.prologue
.line 15
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mSurface:Landroid/view/Surface;
return-object v0
.end method
.method private addDisplayFrameNumber()I
.locals 2
.prologue
.line 319
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 320
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDisplayFrameNumbers:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDisplayFrameNumbers:I
.line 321
monitor-exit v1
.line 322
const/4 v0, 0x0
return v0
.line 321
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method private static byte2hex([B)Ljava/lang/String;
.locals 5
.prologue
.line 326
const-string v1, ""
.line 327
const/4 v0, 0x0
:goto_0
array-length v2, p0
if-ge v0, v2, :cond_1
.line 328
aget-byte v2, p0, v0
and-int/lit16 v2, v2, 0xff
invoke-static {v2}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v2
.line 329
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v3
const/4 v4, 0x1
if-ne v3, v4, :cond_0
.line 330
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "0"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
.line 332
:cond_0
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, " "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
.line 327
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 334
:cond_1
return-object v1
.end method
# virtual methods
.method public addVideoConfig([B)V
.locals 0
.prologue
.line 267
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfigData:[B
.line 268
return-void
.end method
.method public addVideoPacket([BI)I
.locals 11
.prologue
const/4 v4, 0x2
const/4 v10, 0x7
const/4 v3, -0x1
const/4 v9, 0x1
const/4 v1, 0x0
.line 154
aget-byte v0, p1, v1
if-eqz v0, :cond_1
aget-byte v0, p1, v9
if-eqz v0, :cond_1
aget-byte v0, p1, v4
if-eqz v0, :cond_1
.line 155
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Receive Error NALU data "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
aget-byte v3, p1, v1
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
aget-byte v3, p1, v9
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
aget-byte v3, p1, v4
.line 156
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const/4 v3, 0x3
aget-byte v3, p1, v3
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const/4 v3, 0x4
aget-byte v3, p1, v3
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
.line 155
invoke-static {v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 263
:cond_0
:goto_0
return v1
.line 160
:cond_1
const/4 v0, 0x4
aget-byte v0, p1, v0
and-int/lit8 v0, v0, 0xf
.line 161
iget v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAddFrameNumbers:I
add-int/lit8 v2, v2, 0x1
iput v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAddFrameNumbers:I
.line 163
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v2
.line 164
:try_start_0
iget v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
and-int/lit8 v4, v4, 0x1
if-eqz v4, :cond_3
.line 165
const/4 v4, 0x5
if-eq v0, v4, :cond_2
if-eq v0, v10, :cond_2
const/4 v4, 0x6
if-eq v0, v4, :cond_2
.line 166
iget-object v3, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Skip the naltype "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
const-string v4, " after flush"
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v3, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 167
monitor-exit v2
goto :goto_0
.line 171
:catchall_0
move-exception v0
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.line 169
:cond_2
:try_start_1
iget v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
and-int/lit8 v4, v4, -0x2
iput v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
.line 171
:cond_3
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 188
const/4 v2, 0x6
if-eq v0, v2, :cond_4
if-ne v0, v10, :cond_f
:cond_4
move v2, v3
move v4, v1
move v5, v0
move v0, v1
.line 192
:goto_1
array-length v6, p1
if-ge v0, v6, :cond_e
.line 193
shl-int/lit8 v4, v4, 0x8
aget-byte v6, p1, v0
or-int/2addr v4, v6
.line 194
if-ne v4, v9, :cond_8
.line 195
add-int/lit8 v5, v0, 0x1
aget-byte v5, p1, v5
and-int/lit8 v5, v5, 0xf
.line 196
if-ne v5, v10, :cond_5
.line 197
add-int/lit8 v2, v0, -0x3
.line 198
iget-object v6, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "Find SPS after SEI, Pos = "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
add-int/lit8 v8, v0, -0x3
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 200
:cond_5
const/4 v6, 0x5
if-eq v5, v6, :cond_6
if-ne v5, v9, :cond_8
.line 201
:cond_6
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "Find NAL "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, " after SEI, Pos = "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
add-int/lit8 v7, v0, -0x3
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v4, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 202
add-int/lit8 v0, v0, -0x3
.line 207
:goto_2
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "spsstart = "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, " spsend = "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v4, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 217
if-eq v2, v3, :cond_7
iget v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
if-nez v4, :cond_7
.line 218
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v6, "enter config."
invoke-static {v4, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 219
const/4 v4, 0x0
.line 220
if-le v0, v2, :cond_9
.line 221
sub-int/2addr v0, v2
new-array v0, v0, [B
.line 225
:goto_3
array-length v3, v0
invoke-static {p1, v2, v0, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 226
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v3, 0x2710
invoke-virtual {v2, v3}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->sendEmptyMessage(I)Z
.line 227
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v3, 0x2711
invoke-virtual {v2, v3, v0}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
.line 228
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
invoke-virtual {v2, v0}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->sendMessage(Landroid/os/Message;)Z
.line 229
iput v9, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
.line 233
:cond_7
:goto_4
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mConfiged:I
if-nez v0, :cond_a
.line 234
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "H264 Raw Stream Error, sps/pps should come first, current NAL type "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_0
.line 192
:cond_8
add-int/lit8 v0, v0, 0x1
goto/16 :goto_1
.line 222
:cond_9
if-ne v0, v3, :cond_d
.line 223
array-length v0, p1
new-array v0, v0, [B
goto :goto_3
.line 239
:cond_a
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v2
.line 240
:try_start_2
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
.line 242
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
const/16 v3, 0xf
if-lt v0, v3, :cond_c
.line 243
iget-boolean v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
if-nez v0, :cond_b
.line 244
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v3, "goto fast mode"
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 245
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
.line 253
:cond_b
:goto_5
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 255
new-instance v0, Lcom/viatech/VrPlayer/MediaPacket;
invoke-direct {v0, p1, p2, v1}, Lcom/viatech/VrPlayer/MediaPacket;-><init>([BIZ)V
.line 256
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v3, 0x2712
invoke-virtual {v2, v3, v0}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
.line 257
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
invoke-virtual {v2, v0}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->sendMessage(Landroid/os/Message;)Z
.line 258
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
if-ne v0, v9, :cond_0
.line 259
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v2, "addVideoPacket() when mPaused == 1"
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_0
.line 247
:cond_c
:try_start_3
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
const/16 v3, 0x8
if-gt v0, v3, :cond_b
.line 248
iget-boolean v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
if-eqz v0, :cond_b
.line 249
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v3, "goto normal mode"
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 250
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
goto :goto_5
.line 253
:catchall_1
move-exception v0
monitor-exit v2
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw v0
:cond_d
move-object v0, v4
goto/16 :goto_3
:cond_e
move v0, v3
goto/16 :goto_2
:cond_f
move v5, v0
goto/16 :goto_4
.end method
.method public flush()V
.locals 4
.prologue
.line 94
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 95
const/4 v0, 0x3
:try_start_0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoFlush:I
.line 96
const/4 v0, 0x0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDisplayFrameNumbers:I
.line 97
const/4 v0, 0x0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mBufferedFrameNumbers:I
.line 98
const-wide/16 v2, -0x1
iput-wide v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
.line 99
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 100
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v1, 0x2712
invoke-virtual {v0, v1}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->removeMessages(I)V
.line 101
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v1, 0x2713
invoke-virtual {v0, v1}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->removeMessages(I)V
.line 102
return-void
.line 99
:catchall_0
move-exception v0
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public getCurrentPosition()J
.locals 2
.prologue
.line 309
iget-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
return-wide v0
.end method
.method public getDisplayFrameNumber()I
.locals 2
.prologue
.line 313
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 314
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mDisplayFrameNumbers:I
monitor-exit v1
return v0
.line 315
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public isPlaying()Z
.locals 2
.prologue
.line 125
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 126
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
monitor-exit v1
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.line 127
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public pause()V
.locals 3
.prologue
.line 105
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 106
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
if-nez v0, :cond_0
.line 107
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v2, "pause() "
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 108
const/4 v0, 0x1
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
.line 109
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
invoke-virtual {v0}, Ljava/lang/Object;->notify()V
.line 111
:cond_0
monitor-exit v1
.line 112
return-void
.line 111
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public resume()V
.locals 3
.prologue
.line 115
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 116
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
const/4 v2, 0x1
if-ne v0, v2, :cond_0
.line 117
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v2, "resume() "
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 118
const/4 v0, 0x0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
.line 119
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
invoke-virtual {v0}, Ljava/lang/Object;->notify()V
.line 121
:cond_0
monitor-exit v1
.line 122
return-void
.line 121
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public setListener(Lcom/viatech/VrPlayer/VideoPlayer$Listener;)V
.locals 0
.prologue
.line 527
iput-object p1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mListener:Lcom/viatech/VrPlayer/VideoPlayer$Listener;
.line 528
return-void
.end method
.method public start()I
.locals 4
.prologue
const/4 v3, 0x0
.line 82
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 83
:try_start_0
iget v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
const/4 v2, 0x1
if-ne v0, v2, :cond_0
.line 84
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v2, "start->resume()"
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 85
const/4 v0, 0x0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
.line 87
:cond_0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 88
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v1, 0x2710
invoke-virtual {v0, v1}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->sendEmptyMessage(I)Z
.line 90
return v3
.line 87
:catchall_0
move-exception v0
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public stop()I
.locals 6
.prologue
const/4 v5, 0x0
.line 131
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "stop() "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 132
iget-object v1, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v1
.line 133
const/4 v0, 0x0
:try_start_0
iput v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mPaused:I
.line 134
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
.line 135
invoke-virtual {p0}, Lcom/viatech/VrPlayer/VideoPlayer;->flush()V
.line 136
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mVideoHandler:Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;
const/16 v1, 0x2714
invoke-virtual {v0, v1}, Lcom/viatech/VrPlayer/VideoPlayer$VideoHandler;->sendEmptyMessage(I)Z
.line 138
sget-object v1, Lcom/viatech/VrPlayer/VideoPlayer;->sMutex:Ljava/lang/Object;
monitor-enter v1
.line 139
:goto_0
:try_start_1
sget v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMediaCodecCount:I
if-lez v0, :cond_0
.line 140
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v2, "stop() while"
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 142
:try_start_2
sget-object v0, Lcom/viatech/VrPlayer/VideoPlayer;->sMutex:Ljava/lang/Object;
invoke-virtual {v0}, Ljava/lang/Object;->wait()V
:try_end_2
.catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto :goto_0
.line 143
:catch_0
move-exception v0
.line 144
:try_start_3
iget-object v2, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "stop() Exception: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v0}, Ljava/lang/InterruptedException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.line 147
:catchall_0
move-exception v0
monitor-exit v1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw v0
.line 134
:catchall_1
move-exception v0
:try_start_4
monitor-exit v1
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw v0
.line 147
:cond_0
:try_start_5
monitor-exit v1
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
.line 148
iget-object v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->TAG:Ljava/lang/String;
const-string v1, "stop() end"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 149
return v5
.end method
.method public syncAudio(J)V
.locals 13
.prologue
const-wide/16 v10, 0x3e8
const-wide/16 v8, -0x1
const-wide/16 v2, 0x0
.line 271
.line 276
iget-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastDecodeTime:J
cmp-long v0, v0, v2
if-eqz v0, :cond_4
iget-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
cmp-long v0, v0, v8
if-eqz v0, :cond_4
.line 277
div-long v0, p1, v10
iget-wide v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
sub-long/2addr v0, v4
.line 278
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
iget-wide v6, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastDecodeTime:J
sub-long/2addr v4, v6
.line 279
sub-long/2addr v0, v4
.line 282
:goto_0
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAudioPlayer:Lcom/viatech/VrPlayer/AudioPlayer;
invoke-virtual {v4}, Lcom/viatech/VrPlayer/AudioPlayer;->isPlaying()Z
move-result v4
if-eqz v4, :cond_0
.line 284
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mAudioPlayer:Lcom/viatech/VrPlayer/AudioPlayer;
invoke-virtual {v4}, Lcom/viatech/VrPlayer/AudioPlayer;->getCurrentPosition()I
move-result v4
int-to-long v4, v4
.line 285
cmp-long v6, v4, v8
if-eqz v6, :cond_0
.line 286
sub-long v4, p1, v4
.line 287
cmp-long v6, v4, v2
if-lez v6, :cond_0
.line 288
cmp-long v6, v4, v0
if-lez v6, :cond_3
.line 293
:cond_0
:goto_1
const-wide/16 v4, 0x28
invoke-static {v0, v1, v4, v5}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
.line 294
iget-object v4, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mObject:Ljava/lang/Object;
monitor-enter v4
.line 295
:try_start_0
iget-boolean v5, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mFastMode:Z
if-eqz v5, :cond_1
.line 296
const-wide/16 v6, 0x1e
invoke-static {v0, v1, v6, v7}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
.line 298
:cond_1
monitor-exit v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 300
cmp-long v2, v0, v2
if-lez v2, :cond_2
.line 301
invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
.line 304
:cond_2
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastDecodeTime:J
.line 305
div-long v0, p1, v10
iput-wide v0, p0, Lcom/viatech/VrPlayer/VideoPlayer;->mLastPacketVideoTime:J
.line 306
return-void
:cond_3
move-wide v0, v4
.line 288
goto :goto_1
.line 298
:catchall_0
move-exception v0
:try_start_1
monitor-exit v4
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
:cond_4
move-wide v0, v2
goto :goto_0
.end method