.class abstract Lorg/videolan/libvlc/VLCObject; .super Ljava/lang/Object; .source "VLCObject.java" # annotations .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/lang/Object;" } .end annotation # instance fields .field private mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; .annotation system Ldalvik/annotation/Signature; value = { "Lorg/videolan/libvlc/VLCEvent$Listener<", "TT;>;" } .end annotation .end field .field private mHandler:Landroid/os/Handler; .field private mInstance:J .field final mLibVLC:Lorg/videolan/libvlc/LibVLC; .field private mNativeRefCount:I # direct methods .method protected constructor ()V .locals 3 .line 43 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, 0x0 .line 30 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; .line 31 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; const/4 v1, 0x1 .line 33 iput v1, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I const-wide/16 v1, 0x0 .line 144 iput-wide v1, p0, Lorg/videolan/libvlc/VLCObject;->mInstance:J .line 44 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mLibVLC:Lorg/videolan/libvlc/LibVLC; return-void .end method .method protected constructor (Lorg/videolan/libvlc/LibVLC;)V .locals 2 .line 35 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, 0x0 .line 30 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; .line 31 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; const/4 v0, 0x1 .line 33 iput v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I const-wide/16 v0, 0x0 .line 144 iput-wide v0, p0, Lorg/videolan/libvlc/VLCObject;->mInstance:J .line 36 iput-object p1, p0, Lorg/videolan/libvlc/VLCObject;->mLibVLC:Lorg/videolan/libvlc/LibVLC; return-void .end method .method protected constructor (Lorg/videolan/libvlc/VLCObject;)V .locals 2 .line 39 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, 0x0 .line 30 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; .line 31 iput-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; const/4 v0, 0x1 .line 33 iput v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I const-wide/16 v0, 0x0 .line 144 iput-wide v0, p0, Lorg/videolan/libvlc/VLCObject;->mInstance:J .line 40 iget-object p1, p1, Lorg/videolan/libvlc/VLCObject;->mLibVLC:Lorg/videolan/libvlc/LibVLC; iput-object p1, p0, Lorg/videolan/libvlc/VLCObject;->mLibVLC:Lorg/videolan/libvlc/LibVLC; return-void .end method .method private declared-synchronized dispatchEventFromNative(IJJF)V .locals 1 monitor-enter p0 .line 147 :try_start_0 invoke-virtual {p0}, Lorg/videolan/libvlc/VLCObject;->isReleased()Z move-result v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v0, :cond_0 .line 148 monitor-exit p0 return-void .line 149 :cond_0 :try_start_1 invoke-virtual/range {p0 .. p6}, Lorg/videolan/libvlc/VLCObject;->onEventNative(IJJF)Lorg/videolan/libvlc/VLCEvent; move-result-object p1 if-eqz p1, :cond_1 .line 166 iget-object p2, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; if-eqz p2, :cond_1 iget-object p2, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; if-eqz p2, :cond_1 .line 167 new-instance p3, Lorg/videolan/libvlc/VLCObject$1EventRunnable; iget-object p4, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; invoke-direct {p3, p0, p4, p1}, Lorg/videolan/libvlc/VLCObject$1EventRunnable;->(Lorg/videolan/libvlc/VLCObject;Lorg/videolan/libvlc/VLCEvent$Listener;Lorg/videolan/libvlc/VLCEvent;)V invoke-virtual {p2, p3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 168 :cond_1 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method private static dispatchEventFromWeakNative(Ljava/lang/Object;IJJF)V .locals 7 .line 179 check-cast p0, Ljava/lang/ref/WeakReference; invoke-virtual {p0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object p0 move-object v0, p0 check-cast v0, Lorg/videolan/libvlc/VLCObject; if-eqz v0, :cond_0 move v1, p1 move-wide v2, p2 move-wide v4, p4 move v6, p6 .line 181 invoke-direct/range {v0 .. v6}, Lorg/videolan/libvlc/VLCObject;->dispatchEventFromNative(IJJF)V :cond_0 return-void .end method .method private getWeakReference()Ljava/lang/Object; .locals 1 .line 174 new-instance v0, Ljava/lang/ref/WeakReference; invoke-direct {v0, p0}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V return-object v0 .end method .method private native nativeDetachEvents()V .end method # virtual methods .method protected declared-synchronized finalize()V .locals 3 monitor-enter p0 .line 96 :try_start_0 invoke-virtual {p0}, Lorg/videolan/libvlc/VLCObject;->isReleased()Z move-result v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v0, :cond_0 .line 98 monitor-exit p0 return-void .line 97 :cond_0 :try_start_1 new-instance v0, Ljava/lang/AssertionError; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "VLCObject (" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v2 invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ") finalized but not natively released (" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 iget v2, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " refs)" 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 invoke-direct {v0, v1}, Ljava/lang/AssertionError;->(Ljava/lang/Object;)V throw v0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public declared-synchronized isReleased()Z .locals 1 monitor-enter p0 .line 51 :try_start_0 iget v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-nez v0, :cond_0 const/4 v0, 0x1 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method protected abstract onEventNative(IJJF)Lorg/videolan/libvlc/VLCEvent; .annotation system Ldalvik/annotation/Signature; value = { "(IJJF)TT;" } .end annotation .end method .method protected abstract onReleaseNative()V .end method .method public final release()V .locals 2 .line 75 monitor-enter p0 .line 76 :try_start_0 iget v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I if-nez v0, :cond_0 .line 77 monitor-exit p0 return-void :cond_0 if-lez v0, :cond_1 add-int/lit8 v0, v0, -0x1 .line 79 iput v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I goto :goto_0 :cond_1 const/4 v0, -0x1 :goto_0 if-nez v0, :cond_2 const/4 v1, 0x0 .line 83 invoke-virtual {p0, v1}, Lorg/videolan/libvlc/VLCObject;->setEventListener(Lorg/videolan/libvlc/VLCEvent$Listener;)V .line 84 :cond_2 monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 if-nez v0, :cond_3 .line 87 invoke-direct {p0}, Lorg/videolan/libvlc/VLCObject;->nativeDetachEvents()V .line 88 monitor-enter p0 .line 89 :try_start_1 invoke-virtual {p0}, Lorg/videolan/libvlc/VLCObject;->onReleaseNative()V .line 90 monitor-exit p0 goto :goto_1 :catchall_0 move-exception v0 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 :cond_3 :goto_1 return-void :catchall_1 move-exception v0 .line 84 :try_start_2 monitor-exit p0 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 throw v0 .end method .method public final declared-synchronized retain()Z .locals 2 monitor-enter p0 .line 59 :try_start_0 iget v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I if-lez v0, :cond_0 const/4 v1, 0x1 add-int/2addr v0, v1 .line 60 iput v0, p0, Lorg/videolan/libvlc/VLCObject;->mNativeRefCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 61 monitor-exit p0 return v1 :cond_0 const/4 v0, 0x0 .line 63 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method protected declared-synchronized setEventListener(Lorg/videolan/libvlc/VLCEvent$Listener;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lorg/videolan/libvlc/VLCEvent$Listener<", "TT;>;)V" } .end annotation monitor-enter p0 const/4 v0, 0x0 .line 107 :try_start_0 invoke-virtual {p0, p1, v0}, Lorg/videolan/libvlc/VLCObject;->setEventListener(Lorg/videolan/libvlc/VLCEvent$Listener;Landroid/os/Handler;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 108 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method protected declared-synchronized setEventListener(Lorg/videolan/libvlc/VLCEvent$Listener;Landroid/os/Handler;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lorg/videolan/libvlc/VLCEvent$Listener<", "TT;>;", "Landroid/os/Handler;", ")V" } .end annotation monitor-enter p0 .line 116 :try_start_0 iget-object v0, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; const/4 v1, 0x0 if-eqz v0, :cond_0 .line 117 invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V .line 118 :cond_0 iput-object p1, p0, Lorg/videolan/libvlc/VLCObject;->mEventListener:Lorg/videolan/libvlc/VLCEvent$Listener; if-nez p1, :cond_1 .line 120 iput-object v1, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; goto :goto_1 .line 121 :cond_1 iget-object p1, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; if-nez p1, :cond_3 if-eqz p2, :cond_2 goto :goto_0 .line 122 :cond_2 new-instance p2, Landroid/os/Handler; invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper; move-result-object p1 invoke-direct {p2, p1}, Landroid/os/Handler;->(Landroid/os/Looper;)V :goto_0 iput-object p2, p0, Lorg/videolan/libvlc/VLCObject;->mHandler:Landroid/os/Handler; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 123 :cond_3 :goto_1 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method