-static inline void input_ControlPush( input_thread_t *p_input,
- int i_type, vlc_value_t *p_val )
-{
- vlc_mutex_lock( &p_input->p->lock_control );
- if( i_type == INPUT_CONTROL_SET_DIE )
- {
- /* Special case, empty the control */
- p_input->p->i_control = 1;
- p_input->p->control[0].i_type = i_type;
- memset( &p_input->p->control[0].val, 0, sizeof( vlc_value_t ) );
- }
- else if( p_input->p->i_control >= INPUT_CONTROL_FIFO_SIZE )
- {
- msg_Err( p_input, "input control fifo overflow, trashing type=%d",
- i_type );
- }
- else
- {
- p_input->p->control[p_input->p->i_control].i_type = i_type;
- if( p_val )
- p_input->p->control[p_input->p->i_control].val = *p_val;
- else
- memset( &p_input->p->control[p_input->p->i_control].val, 0,
- sizeof( vlc_value_t ) );
-
- p_input->p->i_control++;
- }
- vlc_cond_signal( &p_input->p->wait_control );
- vlc_mutex_unlock( &p_input->p->lock_control );
-}
-
-/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
- * anyway. */
-
-static inline void input_item_SetPreparsed( input_item_t *p_i, bool preparsed )
-{
- bool send_event = false;
-
- if( !p_i->p_meta )
- p_i->p_meta = vlc_meta_New();
-
- vlc_mutex_lock( &p_i->lock );
- int new_status;
- if( preparsed )
- new_status = p_i->p_meta->i_status | ITEM_PREPARSED;
- else
- new_status = p_i->p_meta->i_status & ~ITEM_PREPARSED;
- if( p_i->p_meta->i_status != new_status )
- {
- p_i->p_meta->i_status = new_status;
- send_event = true;
- }
-
- vlc_mutex_unlock( &p_i->lock );
-
- if( send_event )
- {
- vlc_event_t event;
- event.type = vlc_InputItemPreparsedChanged;
- event.u.input_item_preparsed_changed.new_status = new_status;
- vlc_event_send( &p_i->event_manager, &event );
- }
-}
-
-static inline void input_item_SetArtNotFound( input_item_t *p_i, bool notfound )
-{
- if( !p_i->p_meta )
- p_i->p_meta = vlc_meta_New();