public class MediaList extends java.lang.Object implements IMediaList
IMediaList.Event, IMediaList.EventListener
Modifier | Constructor and Description |
---|---|
|
MediaList(ILibVLC ILibVLC)
Create a MediaList from libVLC
|
protected |
MediaList(IMedia m) |
protected |
MediaList(MediaDiscoverer md) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
int |
getCount()
Get the number of Media.
|
ILibVLC |
getLibVLC() |
IMedia |
getMediaAt(int index)
Get a Media at specified index.
|
boolean |
isLocked() |
boolean |
isReleased()
Returns true if native object is released
|
protected IMediaList.Event |
onEventNative(int eventType,
long arg1,
long arg2,
float argf1,
java.lang.String args1)
Called when libvlc send events.
|
void |
onReleaseNative()
Called when native object is released (refcount is 0).
|
void |
release()
Release the native object if ref count is 1.
|
boolean |
retain()
Increment internal ref count of the native object.
|
protected void |
setEventListener(AbstractVLCEvent.Listener<T> listener)
Set an event listener.
|
protected void |
setEventListener(AbstractVLCEvent.Listener<T> listener,
android.os.Handler handler)
Set an event listener and an executor Handler
|
void |
setEventListener(IMediaList.EventListener listener,
android.os.Handler handler) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLibVLC, isReleased, release, retain
public MediaList(ILibVLC ILibVLC)
ILibVLC
- a valid libVLCprotected MediaList(MediaDiscoverer md)
md
- Should not be releasedprotected MediaList(IMedia m)
m
- Should not be releasedpublic void setEventListener(IMediaList.EventListener listener, android.os.Handler handler)
setEventListener
in interface IMediaList
protected IMediaList.Event onEventNative(int eventType, long arg1, long arg2, float argf1, java.lang.String args1)
eventType
- event typearg1
- first argumentarg2
- second argumentargf1
- first float argumentpublic int getCount()
getCount
in interface IMediaList
public IMedia getMediaAt(int index)
getMediaAt
in interface IMediaList
index
- index of the mediarelease()
.public void onReleaseNative()
public boolean isLocked()
isLocked
in interface IMediaList
public boolean isReleased()
isReleased
in interface IVLCObject<T extends AbstractVLCEvent>
public final boolean retain()
retain
in interface IVLCObject<T extends AbstractVLCEvent>
public final void release()
release
in interface IVLCObject<T extends AbstractVLCEvent>
protected void finalize()
finalize
in class java.lang.Object
public ILibVLC getLibVLC()
getLibVLC
in interface IVLCObject<T extends AbstractVLCEvent>
protected void setEventListener(AbstractVLCEvent.Listener<T> listener)
listener
- see AbstractVLCEvent.Listener
protected void setEventListener(AbstractVLCEvent.Listener<T> listener, android.os.Handler handler)
listener
- see AbstractVLCEvent.Listener
handler
- Handler in which events are sent. If null, a handler will be created running on the main thread