2
2
* engine.c : Run the playlist and handle its control
3
3
*****************************************************************************
4
4
* Copyright (C) 1999-2004 the VideoLAN team
5
* $Id: engine.c 16822 2006-09-24 12:48:23Z zorglub $
5
* $Id: engine.c 16834 2006-09-24 16:44:52Z zorglub $
7
7
* Authors: Samuel Hocevar <sam@zoy.org>
8
8
* Clément Stenac <zorglub@videolan.org>
482
482
p_current->p_meta->i_status |= ITEM_PREPARSED;
483
483
var_SetInteger( p_playlist, "item-change", p_current->i_id );
485
vlc_gc_decref( p_current );
486
/* Add to secondary preparse queue */
488
vlc_mutex_lock( &p_playlist->p_secondary_preparse->object_lock );
489
INSERT_ELEM( p_playlist->p_secondary_preparse->pp_waiting,
490
p_playlist->p_secondary_preparse->i_waiting,
491
p_playlist->p_secondary_preparse->i_waiting,
493
vlc_gc_incref( p_current );
494
vlc_mutex_unlock( &p_playlist->p_secondary_preparse->object_lock );
486
/* We haven't retrieved enough meta, add to secondary queue
487
* which will run the "meta fetchers"
488
* TODO: - use i_mandatory stuff here instead of hardcoded T/A
489
* - don't do this for things we won't get meta for, like
492
if( !(p_current->p_meta->psz_title && *p_current->p_meta->psz_title
493
&& p_current->p_meta->psz_artist &&
494
*p_current->p_meta->psz_artist) )
496
vlc_mutex_lock( &p_playlist->p_secondary_preparse->object_lock);
497
INSERT_ELEM( p_playlist->p_secondary_preparse->pp_waiting,
498
p_playlist->p_secondary_preparse->i_waiting,
499
p_playlist->p_secondary_preparse->i_waiting,
502
&p_playlist->p_secondary_preparse->object_lock);
505
vlc_gc_decref( p_current );
499
vlc_mutex_unlock( &p_playlist->object_lock );
501
511
vlc_mutex_lock( &p_obj->object_lock );
502
512
i_activity = var_GetInteger( p_playlist, "activity" );
503
513
if( i_activity < 0 ) i_activity = 0;