MMCMediaPlayer.smali
.class public Lcom/mmc/player/MMCMediaPlayer;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroid/view/SurfaceHolder$Callback;
.implements Landroid/view/TextureView$SurfaceTextureListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/mmc/player/MMCMediaPlayer$PlayEventListener;,
Lcom/mmc/player/MMCMediaPlayer$PLAY_STATE;
}
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "MMCMediaPlayer"
# instance fields
.field private disableReportFirstTextureUpdate:Z
.field private disableTextureFps:Z
.field private elapsedTimeFromPause:J
.field private isLive:Z
.field private lastSurfaceTextureUpdateFpsTime:J
.field private mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
.field private mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
.field private mSurfaceHolder:Landroid/view/SurfaceHolder;
.field private mUseExoCache:Z
.field private pauseClock:J
.field private surfaceTextureUpdatedCount:I
.field private textureUpdateFps:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Ljava/lang/Float;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/mmc/player/MMCMediaPlayer$PlayEventListener;)V
.registers 5
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
.line 2
iput-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mUseExoCache:Z
.line 3
iput-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->isLive:Z
const/4 v1, 0x0
.line 4
iput-object v1, p0, Lcom/mmc/player/MMCMediaPlayer;->mSurfaceHolder:Landroid/view/SurfaceHolder;
.line 5
iput-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->disableTextureFps:Z
.line 6
iput-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->disableReportFirstTextureUpdate:Z
.line 7
iput-object v1, p0, Lcom/mmc/player/MMCMediaPlayer;->mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
.line 8
new-instance v1, Ljava/util/concurrent/atomic/AtomicReference;
const/4 v2, 0x0
invoke-static {v2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v2
invoke-direct {v1, v2}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object v1, p0, Lcom/mmc/player/MMCMediaPlayer;->textureUpdateFps:Ljava/util/concurrent/atomic/AtomicReference;
const-wide/16 v1, 0x0
.line 9
iput-wide v1, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
.line 10
iput v0, p0, Lcom/mmc/player/MMCMediaPlayer;->surfaceTextureUpdatedCount:I
.line 11
iput-wide v1, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
.line 12
iput-wide v1, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
.line 13
invoke-static {p1}, Lcom/mmc/player/MMCPlayerNative;->createNativePlayer(Lcom/mmc/player/MMCMediaPlayer$PlayEventListener;)Lcom/mmc/player/MMCPlayerNative;
move-result-object p1
iput-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
const-string p1, "disable_texture_fps"
.line 14
invoke-static {p1}, Lcom/mmc/player/config/MMCConfigManager;->getBooleanForKey(Ljava/lang/String;)Z
move-result p1
iput-boolean p1, p0, Lcom/mmc/player/MMCMediaPlayer;->disableTextureFps:Z
const-string p1, "disable_report_first_texture"
.line 15
invoke-static {p1}, Lcom/mmc/player/config/MMCConfigManager;->getBooleanForKey(Ljava/lang/String;)Z
move-result p1
iput-boolean p1, p0, Lcom/mmc/player/MMCMediaPlayer;->disableReportFirstTextureUpdate:Z
.line 16
iget-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
new-instance v0, Lcom/mmc/player/MMCMediaPlayer$1;
invoke-direct {v0, p0}, Lcom/mmc/player/MMCMediaPlayer$1;-><init>(Lcom/mmc/player/MMCMediaPlayer;)V
invoke-virtual {p1, v0}, Lcom/mmc/player/MMCPlayerNative;->setDefaultPlayEventListener(Lcom/mmc/player/MMCDefaultPlayEventListener;)V
return-void
.end method
.method public static synthetic access$000(Lcom/mmc/player/MMCMediaPlayer;)Lcom/mmc/player/MMCDefaultPlayEventListener;
.registers 1
iget-object p0, p0, Lcom/mmc/player/MMCMediaPlayer;->mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
return-object p0
.end method
.method public static synthetic access$100(Lcom/mmc/player/MMCMediaPlayer;)Z
.registers 1
iget-boolean p0, p0, Lcom/mmc/player/MMCMediaPlayer;->disableTextureFps:Z
return p0
.end method
.method public static synthetic access$200(Lcom/mmc/player/MMCMediaPlayer;)Ljava/util/concurrent/atomic/AtomicReference;
.registers 1
iget-object p0, p0, Lcom/mmc/player/MMCMediaPlayer;->textureUpdateFps:Ljava/util/concurrent/atomic/AtomicReference;
return-object p0
.end method
.method private calculatePauseTime()V
.registers 7
.line 1
iget-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-nez v4, :cond_9
return-void
.line 2
:cond_9
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
.line 3
iget-wide v4, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
sub-long/2addr v0, v4
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
.line 4
iput-wide v2, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
return-void
.end method
.method private checkPlayerIsNull()Z
.registers 2
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
if-nez v0, :cond_6
const/4 v0, 0x1
goto :goto_7
:cond_6
const/4 v0, 0x0
:goto_7
return v0
.end method
.method private removeCallbacks()V
.registers 2
.line 1
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mSurfaceHolder:Landroid/view/SurfaceHolder;
if-eqz v0, :cond_7
.line 2
invoke-interface {v0, p0}, Landroid/view/SurfaceHolder;->removeCallback(Landroid/view/SurfaceHolder$Callback;)V
:cond_7
return-void
.end method
.method private reportTextureFirstFrameUpdated(J)V
.registers 6
.line 1
iget-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->disableReportFirstTextureUpdate:Z
if-eqz v0, :cond_5
return-void
.line 2
:cond_5
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
if-eqz v0, :cond_2b
invoke-virtual {p0}, Lcom/mmc/player/MMCMediaPlayer;->isPlaying()Z
move-result v0
if-eqz v0, :cond_2b
.line 3
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
.line 4
invoke-static {p1, p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object p1
const-string p2, "render_time"
invoke-virtual {v0, p2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 5
new-instance p1, Lcom/mmc/player/MMCBundle;
const-wide/16 v1, 0x0
const/16 p2, 0x960
invoke-direct {p1, p2, v0, v1, v2}, Lcom/mmc/player/MMCBundle;-><init>(ILjava/util/HashMap;J)V
.line 6
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
invoke-interface {v0, p2, p1}, Lcom/mmc/player/MMCDefaultPlayEventListener;->onPlayEvent(ILcom/mmc/player/MMCBundle;)V
:cond_2b
return-void
.end method
# virtual methods
.method public enableAudioHardware(Z)Z
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_8
const/4 p1, 0x0
return p1
.line 2
:cond_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->enableAudioHardware(Z)Z
move-result p1
return p1
.end method
.method public enableVideoHardware(Z)Z
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_8
const/4 p1, 0x0
return p1
.line 2
:cond_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->enableVideoHardware(Z)Z
move-result p1
return p1
.end method
.method public getContext()Ljava/lang/String;
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
const-string v1, ""
if-eqz v0, :cond_9
return-object v1
.line 2
:cond_9
:try_start_9
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->getContext()Ljava/lang/String;
move-result-object v0
:try_end_f
.catchall {:try_start_9 .. :try_end_f} :catchall_10
return-object v0
:catchall_10
return-object v1
.end method
.method public getCurrentPosition()J
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_9
const-wide/16 v0, -0x1
return-wide v0
.line 2
:cond_9
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->getCurrentPosition()J
move-result-wide v0
return-wide v0
.end method
.method public getRender()Lcom/mmc/player/render/SurfaceRender;
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_8
const/4 v0, 0x0
return-object v0
.line 2
:cond_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->getRender()Lcom/mmc/player/render/SurfaceRender;
move-result-object v0
return-object v0
.end method
.method public getSDKVersionStr()Ljava/lang/String;
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_9
const-string v0, "0.0.0"
return-object v0
.line 2
:cond_9
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->getSDKVersionStr()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public getState()I
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_8
const/4 v0, 0x0
return v0
.line 2
:cond_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->getState()I
move-result v0
return v0
.end method
.method public isLive()Z
.registers 2
iget-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->isLive:Z
return v0
.end method
.method public isPlaying()Z
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_8
const/4 v0, 0x0
return v0
.line 2
:cond_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->isPlay()Z
move-result v0
return v0
.end method
.method public isReady()Z
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_8
return v1
.line 2
:cond_8
:try_start_8
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->isReady()Z
move-result v0
:try_end_e
.catchall {:try_start_8 .. :try_end_e} :catchall_f
return v0
:catchall_f
return v1
.end method
.method public onDrawFrame(I[I[FZ)V
.registers 6
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/mmc/player/MMCPlayerNative;->onDrawFrame(I[I[FZ)V
return-void
.end method
.method public onSurfaceSizeChanged(II)V
.registers 4
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2}, Lcom/mmc/player/MMCPlayerNative;->onSurfaceSizeChanged(II)V
return-void
.end method
.method public onSurfaceTextureAvailable(Landroid/graphics/SurfaceTexture;II)V
.registers 4
return-void
.end method
.method public onSurfaceTextureDestroyed(Landroid/graphics/SurfaceTexture;)Z
.registers 2
const/4 p1, 0x0
return p1
.end method
.method public onSurfaceTextureSizeChanged(Landroid/graphics/SurfaceTexture;II)V
.registers 4
return-void
.end method
.method public onSurfaceTextureUpdated(Landroid/graphics/SurfaceTexture;)V
.registers 12
.line 1
iget p1, p0, Lcom/mmc/player/MMCMediaPlayer;->surfaceTextureUpdatedCount:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lcom/mmc/player/MMCMediaPlayer;->surfaceTextureUpdatedCount:I
.line 2
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
.line 3
iget-wide v2, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
const-wide/16 v4, 0x0
cmp-long p1, v2, v4
if-nez p1, :cond_17
.line 4
invoke-direct {p0, v0, v1}, Lcom/mmc/player/MMCMediaPlayer;->reportTextureFirstFrameUpdated(J)V
.line 5
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
.line 6
:cond_17
iget-wide v2, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
sub-long v6, v0, v2
iget-wide v8, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
sub-long/2addr v6, v8
const-wide/16 v8, 0x3e8
cmp-long p1, v6, v8
if-ltz p1, :cond_3f
.line 7
iget-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->textureUpdateFps:Ljava/util/concurrent/atomic/AtomicReference;
iget v6, p0, Lcom/mmc/player/MMCMediaPlayer;->surfaceTextureUpdatedCount:I
int-to-float v6, v6
sub-long v2, v0, v2
long-to-float v2, v2
div-float/2addr v6, v2
const/high16 v2, 0x447a0000 # 1000.0f
mul-float v6, v6, v2
invoke-static {v6}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v2
invoke-virtual {p1, v2}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
const/4 p1, 0x0
.line 8
iput p1, p0, Lcom/mmc/player/MMCMediaPlayer;->surfaceTextureUpdatedCount:I
.line 9
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
.line 10
iput-wide v4, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
:cond_3f
return-void
.end method
.method public pause()V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->pause()V
.line 3
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
return-void
.end method
.method public play()V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->play()V
.line 3
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->calculatePauseTime()V
return-void
.end method
.method public prepare()V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->prepare()V
return-void
.end method
.method public prepareCache(J)V
.registers 4
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2}, Lcom/mmc/player/MMCPlayerNative;->prepareCache(J)V
return-void
.end method
.method public release()V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->removeCallbacks()V
.line 3
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->stop()V
.line 4
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->release()V
const/4 v0, 0x0
.line 5
iput-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
const-wide/16 v0, 0x0
.line 6
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
.line 7
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
.line 8
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
return-void
.end method
.method public resume()V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->resume()V
.line 3
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->calculatePauseTime()V
return-void
.end method
.method public seek(IZ)V
.registers 4
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2}, Lcom/mmc/player/MMCPlayerNative;->seek(IZ)V
return-void
.end method
.method public setDataSource(Ljava/lang/String;Z)V
.registers 4
const/4 v0, 0x0
.line 4
invoke-virtual {p0, p1, p2, v0}, Lcom/mmc/player/MMCMediaPlayer;->setDataSource(Ljava/lang/String;ZZ)V
return-void
.end method
.method public setDataSource(Ljava/lang/String;ZLcom/mmc/player/MMCPlayConfig;)V
.registers 5
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iput-boolean p2, p0, Lcom/mmc/player/MMCMediaPlayer;->isLive:Z
.line 3
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2, p3}, Lcom/mmc/player/MMCPlayerNative;->setDataSource(Ljava/lang/String;ZLcom/mmc/player/MMCPlayConfig;)V
return-void
.end method
.method public setDataSource(Ljava/lang/String;ZZ)V
.registers 6
.line 5
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 6
:cond_7
iget-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mUseExoCache:Z
if-nez v0, :cond_1b
if-eqz p1, :cond_1b
.line 7
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-lez v0, :cond_1b
const-string v0, "https:"
const-string v1, "http:"
.line 8
invoke-virtual {p1, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p1
.line 9
:cond_1b
iput-boolean p2, p0, Lcom/mmc/player/MMCMediaPlayer;->isLive:Z
.line 10
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2, p3}, Lcom/mmc/player/MMCPlayerNative;->setDataSource(Ljava/lang/String;ZZ)V
return-void
.end method
.method public setDataSource(Ljava/lang/String;ZZLjava/lang/String;)V
.registers 7
.line 11
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 12
:cond_7
iget-boolean v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mUseExoCache:Z
if-nez v0, :cond_1b
if-eqz p1, :cond_1b
.line 13
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-lez v0, :cond_1b
const-string v0, "https:"
const-string v1, "http:"
.line 14
invoke-virtual {p1, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p1
.line 15
:cond_1b
iput-boolean p2, p0, Lcom/mmc/player/MMCMediaPlayer;->isLive:Z
.line 16
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/mmc/player/MMCPlayerNative;->setDataSource(Ljava/lang/String;ZZLjava/lang/String;)V
return-void
.end method
.method public setDataSourceFactory(Lcom/google/android/exoplayer2/upstream/l$a;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-nez v0, :cond_1c
if-nez p1, :cond_9
goto :goto_1c
.line 2
:cond_9
invoke-static {}, Lcom/mmc/player/videocache/exocache/ExoCacheConfig;->getInstance()Lcom/mmc/player/videocache/exocache/ExoCacheConfig;
move-result-object v0
invoke-virtual {v0, p1}, Lcom/mmc/player/videocache/exocache/ExoCacheConfig;->setDataSourceFactory(Lcom/google/android/exoplayer2/upstream/l$a;)V
.line 3
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-interface {p1}, Lcom/google/android/exoplayer2/upstream/l$a;->a()Lcom/google/android/exoplayer2/upstream/l;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setExoDataSource(Lcom/google/android/exoplayer2/upstream/l;)V
const/4 p1, 0x1
.line 4
iput-boolean p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mUseExoCache:Z
:cond_1c
:goto_1c
return-void
.end method
.method public setDefaultPlayEventListener(Lcom/mmc/player/MMCDefaultPlayEventListener;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iput-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mDefaultPlayEventListener:Lcom/mmc/player/MMCDefaultPlayEventListener;
return-void
.end method
.method public setLiveCustomConfig(Ljava/lang/String;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setLiveCustomConfig(Ljava/lang/String;)V
return-void
.end method
.method public setMute(Z)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setMute(Z)V
return-void
.end method
.method public setPlayConfig(Lcom/mmc/player/config/MMCConfig;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setPlayConfig(Lcom/mmc/player/config/MMCConfig;)V
return-void
.end method
.method public setPlayListener(Lcom/mmc/player/MMCMediaPlayer$PlayEventListener;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setPlayListener(Lcom/mmc/player/MMCMediaPlayer$PlayEventListener;)V
return-void
.end method
.method public setPlaybackSpeed(F)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setPlaybackSpeed(F)V
return-void
.end method
.method public setPlayerConfig(Lcom/mmc/player/MMCPlayerConfig;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setPlayerConfig(Lcom/mmc/player/MMCPlayerConfig;)V
return-void
.end method
.method public setRenderMode(I)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setRenderMode(I)V
return-void
.end method
.method public setRenderRotation(I)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setRenderRotation(I)V
return-void
.end method
.method public setRenderSurface(Landroid/view/Surface;)V
.registers 4
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
const/4 v1, 0x0
invoke-virtual {v0, p1, v1}, Lcom/mmc/player/MMCPlayerNative;->setRenderTargetView(Landroid/view/Surface;Z)V
return-void
.end method
.method public setSurface(Landroid/view/Surface;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setRenderSurface(Landroid/view/Surface;)V
return-void
.end method
.method public setSurfaceView(Landroid/view/SurfaceView;)V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->removeCallbacks()V
.line 2
invoke-virtual {p1}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;
move-result-object p1
iput-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mSurfaceHolder:Landroid/view/SurfaceHolder;
.line 3
invoke-interface {p1, p0}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V
return-void
.end method
.method public setTextureView(Lcom/mmc/player/MMCAVPlayerTextureView;)V
.registers 2
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->removeCallbacks()V
return-void
.end method
.method public setVolume(I)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->setVolume(I)V
return-void
.end method
.method public snapshot(Lcom/mmc/player/SnapshotListener;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->snapShot(Lcom/mmc/player/SnapshotListener;)V
return-void
.end method
.method public stop()V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->stop()V
const-wide/16 v0, 0x0
.line 3
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->lastSurfaceTextureUpdateFpsTime:J
.line 4
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->pauseClock:J
.line 5
iput-wide v0, p0, Lcom/mmc/player/MMCMediaPlayer;->elapsedTimeFromPause:J
return-void
.end method
.method public surfaceChanged(Landroid/view/SurfaceHolder;III)V
.registers 7
.line 1
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
move-result v0
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " surfaceChanged"
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
const-string v0, "MMCMediaPlayer"
invoke-static {v0, p2}, Lcom/mmc/player/log/MMCLogDelegate;->i(Ljava/lang/String;Ljava/lang/String;)V
.line 2
iget-object p2, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
if-eqz p2, :cond_2b
.line 3
invoke-interface {p1}, Landroid/view/SurfaceHolder;->getSurface()Landroid/view/Surface;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {p2, v0, v1}, Lcom/mmc/player/MMCPlayerNative;->setRenderTargetView(Landroid/view/Surface;Z)V
.line 4
iget-object p2, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {p2, p3, p4}, Lcom/mmc/player/MMCPlayerNative;->onSurfaceSizeChanged(II)V
.line 5
:cond_2b
invoke-interface {p1, p3, p4}, Landroid/view/SurfaceHolder;->setFixedSize(II)V
return-void
.end method
.method public surfaceCreated(Landroid/view/SurfaceHolder;)V
.registers 3
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " surfaceCreated"
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "MMCMediaPlayer"
invoke-static {v0, p1}, Lcom/mmc/player/log/MMCLogDelegate;->i(Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public surfaceDestroyed(Landroid/view/SurfaceHolder;)V
.registers 4
.line 1
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " surfaceDestroyed"
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "MMCMediaPlayer"
invoke-static {v0, p1}, Lcom/mmc/player/log/MMCLogDelegate;->i(Ljava/lang/String;Ljava/lang/String;)V
.line 2
iget-object p1, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
if-eqz p1, :cond_23
const/4 v0, 0x0
const/4 v1, 0x0
.line 3
invoke-virtual {p1, v0, v1}, Lcom/mmc/player/MMCPlayerNative;->setRenderTargetView(Landroid/view/Surface;Z)V
:cond_23
return-void
.end method
.method public unregisterDefaultPlayEventListener()V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->unregisterDefaultPlayEventListener()V
return-void
.end method
.method public unregisterPlayListener()V
.registers 2
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0}, Lcom/mmc/player/MMCPlayerNative;->unregisterPlayListener()V
return-void
.end method
.method public updateLasUrl(Ljava/lang/String;)V
.registers 3
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1}, Lcom/mmc/player/MMCPlayerNative;->updateLasUrl(Ljava/lang/String;)V
return-void
.end method
.method public updateRenderTime(J)V
.registers 4
.line 1
invoke-direct {p0}, Lcom/mmc/player/MMCMediaPlayer;->checkPlayerIsNull()Z
move-result v0
if-eqz v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/mmc/player/MMCMediaPlayer;->mNativePlayer:Lcom/mmc/player/MMCPlayerNative;
invoke-virtual {v0, p1, p2}, Lcom/mmc/player/MMCPlayerNative;->updateRenderTime(J)V
return-void
.end method