Package uk.co.caprica.vlcj.medialist
Class MediaApi
- java.lang.Object
-
- uk.co.caprica.vlcj.medialist.MediaApi
-
public final class MediaApi extends Object
Behaviour pertaining to the media items in the list.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(String mrl, String... options)
Add a new item to the list for a media resource locator.boolean
add(CallbackMedia callbackMedia, String... options)
Add a new item to the list for native callback media.boolean
add(MediaRef mediaRef, String... options)
Add a new item to the list for aMediaRef
.boolean
clear()
Clear the entire list.int
count()
Get the number of items currently in the list.boolean
insert(int index, String mrl, String... options)
Insert an item into the list for a media resource locator.boolean
insert(int index, CallbackMedia callbackMedia, String... options)
Insert an item into the last for native callback media.boolean
insert(int index, MediaRef mediaRef, String... options)
Insert an item into the list for aMediaRef
.boolean
isReadOnly()
Is the list read-only?String
mrl(int index)
Get the media resource locator for a particular item in the list.List<String>
mrls()
Get a list of media resource locators for the items in the list.Media
newMedia(int index)
Get a newMedia
for an item in the list.MediaList
newMediaList()
Create a newMediaList
from this list.MediaListRef
newMediaListRef()
Create a newMediaListRef
from this list.MediaRef
newMediaRef(int index)
Get a newMediaRef
for an item in the list.boolean
remove(int index)
Remove an item from the list.
-
-
-
Method Detail
-
add
public boolean add(String mrl, String... options)
Add a new item to the list for a media resource locator.The list must not be read-only.
- Parameters:
mrl
- media resource locatoroptions
- options to add to the media- Returns:
true
if successful;false
if error
-
add
public boolean add(CallbackMedia callbackMedia, String... options)
Add a new item to the list for native callback media.The list must not be read-only.
- Parameters:
callbackMedia
- callback media componentoptions
- options to add to the media- Returns:
true
if successful;false
if error
-
add
public boolean add(MediaRef mediaRef, String... options)
Add a new item to the list for aMediaRef
.The list must not be read-only.
- Parameters:
mediaRef
- media referenceoptions
- options to add to the media- Returns:
true
if successful;false
if error
-
insert
public boolean insert(int index, String mrl, String... options)
Insert an item into the list for a media resource locator.The list must not be read-only.
- Parameters:
index
- index at which to insert the itemmrl
- media resource locatoroptions
- options to add to the media- Returns:
true
if successful;false
if error
-
insert
public boolean insert(int index, CallbackMedia callbackMedia, String... options)
Insert an item into the last for native callback media.The list must not be read-only.
- Parameters:
index
- index at which to insert the itemcallbackMedia
- callback media componentoptions
- options to add to the media- Returns:
true
if successful;false
if error
-
insert
public boolean insert(int index, MediaRef mediaRef, String... options)
Insert an item into the list for aMediaRef
.The list must not be read-only.
- Parameters:
index
- index at which to insert the itemmediaRef
- media referenceoptions
- options to add to the media- Returns:
true
if successful;false
if error
-
remove
public boolean remove(int index)
Remove an item from the list.- Parameters:
index
- index of the item to remove- Returns:
true
if successful;false
if error
-
clear
public boolean clear()
Clear the entire list.- Returns:
true
if successful;false
if error
-
count
public int count()
Get the number of items currently in the list.- Returns:
- item count
-
mrls
public List<String> mrls()
Get a list of media resource locators for the items in the list.- Returns:
- media resource locators
-
mrl
public String mrl(int index)
Get the media resource locator for a particular item in the list.- Parameters:
index
- item index- Returns:
- media resource locator
-
newMediaRef
public MediaRef newMediaRef(int index)
Get a newMediaRef
for an item in the list.The caller must release the returned
MediaRef
when it no longer has any use for it.- Parameters:
index
- item index- Returns:
- media reference
-
newMedia
public Media newMedia(int index)
Get a newMedia
for an item in the list.The caller must release the returned
Media
when it no longer has any use for it.- Parameters:
index
- item index- Returns:
- media
-
isReadOnly
public boolean isReadOnly()
Is the list read-only?- Returns:
true
if the list is read-only;false
if it is not
-
newMediaList
public MediaList newMediaList()
Create a newMediaList
from this list.The caller must release the returned
MediaList
when it no longer has any use for it.- Returns:
- media list
-
newMediaListRef
public MediaListRef newMediaListRef()
Create a newMediaListRef
from this list.The caller must release the returned
MediaListRef
when it no longer has any use for it.- Returns:
- media list reference
-
-