QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LibVLC media list

Typedefs

typedef struct libvlc_media_list_t libvlc_media_list_t
 

Functions

LIBVLC_API libvlc_media_list_t * libvlc_media_list_new (libvlc_instance_t *p_instance)
 
LIBVLC_API void libvlc_media_list_release (libvlc_media_list_t *p_ml)
 
LIBVLC_API void libvlc_media_list_retain (libvlc_media_list_t *p_ml)
 
LIBVLC_DEPRECATED int libvlc_media_list_add_file_content (libvlc_media_list_t *p_ml, const char *psz_uri)
 
LIBVLC_API void libvlc_media_list_set_media (libvlc_media_list_t *p_ml, libvlc_media_t *p_md)
 
LIBVLC_API libvlc_media_t * libvlc_media_list_media (libvlc_media_list_t *p_ml)
 
LIBVLC_API int libvlc_media_list_add_media (libvlc_media_list_t *p_ml, libvlc_media_t *p_md)
 
LIBVLC_API int libvlc_media_list_insert_media (libvlc_media_list_t *p_ml, libvlc_media_t *p_md, int i_pos)
 
LIBVLC_API int libvlc_media_list_remove_index (libvlc_media_list_t *p_ml, int i_pos)
 
LIBVLC_API int libvlc_media_list_count (libvlc_media_list_t *p_ml)
 
LIBVLC_API libvlc_media_t * libvlc_media_list_item_at_index (libvlc_media_list_t *p_ml, int i_pos)
 
LIBVLC_API int libvlc_media_list_index_of_item (libvlc_media_list_t *p_ml, libvlc_media_t *p_md)
 
LIBVLC_API int libvlc_media_list_is_readonly (libvlc_media_list_t *p_ml)
 
LIBVLC_API void libvlc_media_list_lock (libvlc_media_list_t *p_ml)
 
LIBVLC_API void libvlc_media_list_unlock (libvlc_media_list_t *p_ml)
 
LIBVLC_API libvlc_event_manager_tlibvlc_media_list_event_manager (libvlc_media_list_t *p_ml)
 

Detailed Description

A LibVLC media list holds multiple libvlc_media_t media descriptors.

Function Documentation

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_mla media list instance
p_mda 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_mla media list instance
Returns
number of items in media list
LIBVLC_API libvlc_event_manager_t* libvlc_media_list_event_manager ( libvlc_media_list_t *  p_ml)

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_mla 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_mla media list instance
p_mdmedia 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_mla media list instance
p_mda media instance
i_posposition 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
p_mlmedia list instance
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_mla media list instance
i_posposition 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_mla 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_mla 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_instancelibvlc instance
Returns
empty media list, or NULL on error
LIBVLC_API void libvlc_media_list_release ( libvlc_media_list_t *  p_ml)

Release media list created with libvlc_media_list_new().

Parameters
p_mla media list created with libvlc_media_list_new()
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_mla media list instance
i_posposition 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
p_mla media list created with libvlc_media_list_new()
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_mla media list instance
p_mdmedia 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_mla media list instance