* Internal creation and destruction functions
***************************************************************************/
VLC_EXPORT (libvlc_int_t *, libvlc_InternalCreate, ( void ) );
-VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, char *ppsz_argv[] ) );
+VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, const char *ppsz_argv[] ) );
VLC_EXPORT (int, libvlc_InternalCleanup, ( libvlc_int_t * ) );
VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t *, vlc_bool_t ) );
libvlc_int_t *p_libvlc_int;
vlm_t *p_vlm;
int b_playlist_locked;
+ unsigned ref_count;
vlc_mutex_t instance_lock;
vlc_mutex_t event_callback_lock;
struct libvlc_callback_entry_list_t *p_callback_list;
vlc_dictionary_t tags; /* To be merged with core's meta soon */
struct libvlc_media_list_t *p_subitems; /* A media descriptor can have
* Sub item */
+ void *p_user_data; /* Allows for VLC.framework to hook into media descriptor without creating a new VLCMedia object. */
};
struct libvlc_tag_query_t
struct libvlc_media_list_t
{
- libvlc_event_manager_t * p_event_manager;
- libvlc_instance_t * p_libvlc_instance;
- int i_refcount;
- vlc_mutex_t object_lock;
- char * psz_name; /* Usually NULL */
- DECL_ARRAY(void *) items;
-
+ libvlc_event_manager_t * p_event_manager;
+ libvlc_instance_t * p_libvlc_instance;
+ int i_refcount;
+ vlc_mutex_t object_lock;
+ libvlc_media_descriptor_t * p_md; /* The media_descriptor from which the
+ * mlist comes, if any. */
+ vlc_array_t items;
+
/* Other way to see that media list */
/* Used in flat_media_list.c */
- libvlc_media_list_t * p_flat_mlist;
+ libvlc_media_list_t * p_flat_mlist;
+};
+
+typedef int (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ;
+
+typedef int (*libvlc_media_list_view_count_func_t)( struct libvlc_media_list_view_t * p_mlv,
+ libvlc_exception_t * ) ;
+
+typedef libvlc_media_descriptor_t *
+ (*libvlc_media_list_view_item_at_index_func_t)(
+ struct libvlc_media_list_view_t * p_mlv,
+ int index,
+ libvlc_exception_t * ) ;
+
+/* A way to see a media list */
+struct libvlc_media_list_view_t
+{
+ libvlc_event_manager_t * p_event_manager;
+ libvlc_instance_t * p_libvlc_instance;
+ int i_refcount;
+ vlc_mutex_t object_lock;
+
+ libvlc_media_list_t * p_mlist;
+
+ struct libvlc_media_list_view_private_t * p_this_view_data;
+
+ /* Accessors */
+ libvlc_media_list_view_count_func_t pf_count;
+ libvlc_media_list_view_item_at_index_func_t pf_item_at_index;
+
+ libvlc_media_list_view_release_func_t pf_release;
+
+ /* Notification callback */
+ void (*pf_ml_item_added)(const libvlc_event_t *, void *);
+ void (*pf_ml_item_removed)(const libvlc_event_t *, void *);
};
struct libvlc_dynamic_media_list_t
libvlc_media_descriptor_t * p_md; /* current media descriptor */
libvlc_event_manager_t * p_event_manager;
libvlc_drawable_t drawable;
+
+ vlc_bool_t b_own_its_input_thread;
};
struct libvlc_media_list_player_t
{
- libvlc_event_manager_t * p_event_manager;
- libvlc_instance_t * p_libvlc_instance;
- int i_refcount;
- vlc_mutex_t object_lock;
- int i_current_playing_index;
+ libvlc_event_manager_t * p_event_manager;
+ libvlc_instance_t * p_libvlc_instance;
+ int i_refcount;
+ vlc_mutex_t object_lock;
+ libvlc_media_list_path_t current_playing_item_path;
libvlc_media_descriptor_t * p_current_playing_item;
- libvlc_media_list_t * p_mlist;
- libvlc_media_instance_t * p_mi;
+ libvlc_media_list_t * p_mlist;
+ libvlc_media_instance_t * p_mi;
};
struct libvlc_media_library_t
libvlc_media_list_t * p_mlist;
};
-/*
+/*
* Event Handling
*/
/* Example usage
VLC_EXPORT (libvlc_media_descriptor_t *, libvlc_media_descriptor_duplicate,
( libvlc_media_descriptor_t * ) );
-/* Media List */
-VLC_EXPORT ( void, libvlc_media_list_flat_media_list_release, ( libvlc_media_list_t * ) );
+/* Media List View */
+VLC_EXPORT ( libvlc_media_list_view_t *, libvlc_media_list_view_new,
+ ( libvlc_media_list_t * p_mlist,
+ libvlc_media_list_view_count_func_t pf_count,
+ libvlc_media_list_view_item_at_index_func_t pf_item_at_index,
+ libvlc_media_list_view_release_func_t pf_release,
+ void * this_view_data,
+ libvlc_exception_t * p_e ) );
+
+VLC_EXPORT ( void, libvlc_media_list_view_set_ml_notification_callback, (
+ libvlc_media_list_view_t * p_mlv,
+ void (*item_added)(const libvlc_event_t *, void *),
+ void (*item_removed)(const libvlc_event_t *, void *) ));
/* Events */
VLC_EXPORT (void, libvlc_event_init, ( libvlc_instance_t *p_instance, libvlc_exception_t *p_e ) );