|
typedef struct libvlc_media_list_t | libvlc_media_list_t |
|
A LibVLC media list holds multiple libvlc_media_t media descriptors.
LIBVLC_API int libvlc_media_list_add_media |
( |
libvlc_media_list_t * |
p_ml, |
|
|
libvlc_media_t * |
p_md |
|
) |
| |
Add media instance to media list The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
p_md | a media instance |
- Returns
- 0 on success, -1 if the media list is read-only
LIBVLC_API int libvlc_media_list_count |
( |
libvlc_media_list_t * |
p_ml | ) |
|
Get count on media list items The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
- Returns
- number of items in media list
Get libvlc_event_manager from this media list instance. The p_event_manager is immutable, so you don't have to hold the lock
- Parameters
-
p_ml | a media list instance |
- Returns
- libvlc_event_manager
LIBVLC_API int libvlc_media_list_index_of_item |
( |
libvlc_media_list_t * |
p_ml, |
|
|
libvlc_media_t * |
p_md |
|
) |
| |
Find index position of List media instance in media list. Warning: the function will return the first matched position. The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
p_md | media instance |
- Returns
- position of media instance or -1 if media not found
LIBVLC_API int libvlc_media_list_insert_media |
( |
libvlc_media_list_t * |
p_ml, |
|
|
libvlc_media_t * |
p_md, |
|
|
int |
i_pos |
|
) |
| |
Insert media instance in media list on a position The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
p_md | a media instance |
i_pos | position in array where to insert |
- Returns
- 0 on success, -1 if the media list is read-only
LIBVLC_API int libvlc_media_list_is_readonly |
( |
libvlc_media_list_t * |
p_ml | ) |
|
This indicates if this media list is read-only from a user point of view
- Parameters
-
- Returns
- 1 on readonly, 0 on readwrite
LIBVLC_API libvlc_media_t* libvlc_media_list_item_at_index |
( |
libvlc_media_list_t * |
p_ml, |
|
|
int |
i_pos |
|
) |
| |
List media instance in media list at a position The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
i_pos | position in array where to insert |
- Returns
- media instance at position i_pos, or NULL if not found. In case of success, libvlc_media_retain() is called to increase the refcount on the media.
LIBVLC_API void libvlc_media_list_lock |
( |
libvlc_media_list_t * |
p_ml | ) |
|
Get lock on media list items
- Parameters
-
p_ml | a media list instance |
LIBVLC_API libvlc_media_t* libvlc_media_list_media |
( |
libvlc_media_list_t * |
p_ml | ) |
|
Get media instance from this media list instance. This action will increase the refcount on the media instance. The libvlc_media_list_lock should NOT be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
- Returns
- media instance
LIBVLC_API libvlc_media_list_t* libvlc_media_list_new |
( |
libvlc_instance_t * |
p_instance | ) |
|
Create an empty media list.
- Parameters
-
p_instance | libvlc instance |
- Returns
- empty media list, or NULL on error
LIBVLC_API void libvlc_media_list_release |
( |
libvlc_media_list_t * |
p_ml | ) |
|
LIBVLC_API int libvlc_media_list_remove_index |
( |
libvlc_media_list_t * |
p_ml, |
|
|
int |
i_pos |
|
) |
| |
Remove media instance from media list on a position The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
i_pos | position in array where to insert |
- Returns
- 0 on success, -1 if the list is read-only or the item was not found
LIBVLC_API void libvlc_media_list_retain |
( |
libvlc_media_list_t * |
p_ml | ) |
|
Retain reference to a media list
- Parameters
-
LIBVLC_API void libvlc_media_list_set_media |
( |
libvlc_media_list_t * |
p_ml, |
|
|
libvlc_media_t * |
p_md |
|
) |
| |
Associate media instance with this media list instance. If another media instance was present it will be released. The libvlc_media_list_lock should NOT be held upon entering this function.
- Parameters
-
p_ml | a media list instance |
p_md | media instance to add |
LIBVLC_API void libvlc_media_list_unlock |
( |
libvlc_media_list_t * |
p_ml | ) |
|
Release lock on media list items The libvlc_media_list_lock should be held upon entering this function.
- Parameters
-
p_ml | a media list instance |