}
/**************************************************************************
- * path_deepness (Media List Player Internal)
+ * path_depth (Media List Player Internal)
**************************************************************************/
-static inline int libvlc_media_list_path_deepness( libvlc_media_list_path_t path )
+static inline int libvlc_media_list_path_depth( libvlc_media_list_path_t path )
{
int i;
for( i = 0; path[i] != -1; i++ );
**************************************************************************/
static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_path, int index )
{
- int old_deepness = libvlc_media_list_path_deepness( *p_path );
- *p_path = realloc( *p_path, sizeof(int)*(old_deepness+2));
- *p_path[old_deepness] = index;
- *p_path[old_deepness+1] = -1;
+ int old_depth = libvlc_media_list_path_depth( *p_path );
+ *p_path = realloc( *p_path, sizeof(int)*(old_depth+2));
+ *p_path[old_depth] = index;
+ *p_path[old_depth+1] = -1;
}
/**************************************************************************
static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending( libvlc_media_list_path_t path, int index )
{
libvlc_media_list_path_t ret;
- int old_deepness = libvlc_media_list_path_deepness( path );
- ret = malloc( sizeof(int)*(old_deepness+2) );
- memcpy( ret, path, sizeof(int)*(old_deepness+2) );
- ret[old_deepness] = index;
- ret[old_deepness+1] = -1;
+ int old_depth = libvlc_media_list_path_depth( path );
+ ret = malloc( sizeof(int)*(old_depth+2) );
+ memcpy( ret, path, sizeof(int)*(old_depth+2) );
+ ret[old_depth] = index;
+ ret[old_depth+1] = -1;
return ret;
}
static inline libvlc_media_list_path_t libvlc_media_list_path_copy( libvlc_media_list_path_t path )
{
libvlc_media_list_path_t ret;
- int deepness = libvlc_media_list_path_deepness( path );
- ret = malloc( sizeof(int)*(deepness+1) );
- memcpy( ret, path, sizeof(int)*(deepness+1) );
+ int depth = libvlc_media_list_path_depth( path );
+ ret = malloc( sizeof(int)*(depth+1) );
+ memcpy( ret, path, sizeof(int)*(depth+1) );
return ret;
}
p_mlp->p_mlist,
p_mlp->current_playing_item_path );
- int deepness = libvlc_media_list_path_deepness( p_mlp->current_playing_item_path );
- if( deepness < 1 || !p_parent_of_playing_item )
+ int depth = libvlc_media_list_path_depth( p_mlp->current_playing_item_path );
+ if( depth < 1 || !p_parent_of_playing_item )
return NULL;
ret = libvlc_media_list_path_copy( p_mlp->current_playing_item_path );
- while( ret[deepness-1] >= libvlc_media_list_count( p_parent_of_playing_item, NULL ) )
+ while( ret[depth-1] >= libvlc_media_list_count( p_parent_of_playing_item, NULL ) )
{
- deepness--;
- if( deepness <= 0 )
+ depth--;
+ if( depth <= 0 )
{
free( ret );
libvlc_media_list_release( p_parent_of_playing_item );
return NULL;
}
- ret[deepness] = -1;
- ret[deepness-1]++;
+ ret[depth] = -1;
+ ret[depth-1]++;
p_parent_of_playing_item = libvlc_media_list_parentlist_at_path(
p_mlp->p_mlist,
ret );