-/* Must be entered WITH playlist lock! */
-void PLModel::recursiveAppendCopy( playlist_t *p_playlist, playlist_item_t *source,
- playlist_item_t *target, bool b_flat )
-{
- input_item_t *srcInput = source->p_input;
-
- if( !(source->i_children != -1 && b_flat) )
- {
- vlc_mutex_lock( &srcInput->lock );
- input_item_t *newInput =
- input_item_NewWithType( VLC_OBJECT(p_playlist),
- srcInput->psz_uri, srcInput->psz_name,
- srcInput->i_options, srcInput->ppsz_options,
- srcInput->optflagc, srcInput->i_duration,
- srcInput->i_type );
- vlc_mutex_unlock( &srcInput->lock );
-
- if( source->i_children != -1 )
- target = playlist_NodeCreate( p_playlist, newInput->psz_name, target, 0, newInput );
- else
- playlist_NodeAddInput( p_playlist, newInput, target,
- PLAYLIST_APPEND | PLAYLIST_SPREPARSE,
- PLAYLIST_END, pl_Locked );
- }
- for( int i = 0; i < source->i_children; i++ )
- recursiveAppendCopy( p_playlist, source->pp_children[i], target, b_flat );
-}
-