public class MediaDiscoverer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MediaDiscoverer.Description |
static class |
MediaDiscoverer.Event |
static interface |
MediaDiscoverer.EventListener |
| Constructor and Description |
|---|
MediaDiscoverer(LibVLC libVLC,
java.lang.String name)
Create a MediaDiscover.
|
| Modifier and Type | Method and Description |
|---|---|
MediaList |
getMediaList()
Get the MediaList associated with the MediaDiscoverer.
|
boolean |
isReleased()
Returns true if native object is released
|
static MediaDiscoverer.Description[] |
list(LibVLC libVLC,
int category)
Get media discoverers by category
|
protected MediaDiscoverer.Event |
onEventNative(int eventType,
long arg1,
float arg2)
Called when libvlc send events.
|
protected 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.
|
void |
setEventListener(MediaDiscoverer.EventListener listener) |
protected void |
setEventListener(org.videolan.libvlc.VLCEvent.Listener<T> listener)
Set an event listener.
|
boolean |
start()
Starts the discovery.
|
void |
stop()
Stops the discovery.
|
public MediaDiscoverer(LibVLC libVLC, java.lang.String name)
libVLC - a valid LibVLCname - Name of the vlc service discovery ("dsm", "upnp", "bonjour"...).public boolean start()
public void stop()
to stop the discovery directly.public void setEventListener(MediaDiscoverer.EventListener listener)
protected MediaDiscoverer.Event onEventNative(int eventType, long arg1, float arg2)
eventType - event typearg1 - first argumentarg2 - second argumentpublic MediaList getMediaList()
release().protected void onReleaseNative()
public static MediaDiscoverer.Description[] list(LibVLC libVLC, int category)
category - see MediaDiscoverer.Description.Categorypublic boolean isReleased()
public final boolean retain()
public final void release()
protected void setEventListener(org.videolan.libvlc.VLCEvent.Listener<T> listener)
listener - see VLCEvent.Listener