VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
+VLC_EXPORT( vlc_list_t *, __vlc_list_children, ( vlc_object_t * ) );
VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
/* __vlc_object_dump */
#define vlc_list_find(a,b,c) \
__vlc_list_find( VLC_OBJECT(a),b,c)
+#define vlc_list_children(a) \
+ __vlc_list_children( VLC_OBJECT(a) )
+
#define vlc_object_dump(a) \
__vlc_object_dump( VLC_OBJECT(a))
return p_list;
}
+/**
+ * Gets the list of children of an objects, and increment their reference
+ * count.
+ * @return a list (possibly empty) or NULL in case of error.
+ */
+vlc_list_t *__vlc_list_children( vlc_object_t *obj )
+{
+ vlc_list_t *l;
+
+ vlc_mutex_lock( &structure_lock );
+ l = NewList( obj->i_children );
+ for (int i = 0; i < l->i_count; i++)
+ {
+ vlc_object_yield( obj->pp_children[i] );
+ l->p_values[i].p_object = obj->pp_children[i];
+ }
+ vlc_mutex_unlock( &structure_lock );
+ return l;
+}
+
/*****************************************************************************
* DumpCommand: print the current vlc structure
*****************************************************************************