Changeset acb1a3ac0c092b5d8d58ef23e629de8ebf26b95a

Show
Ignore:
Timestamp:
06/14/08 13:21:10 (3 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1213442470 +0200
git-parent:

[a779588f7212b9d6f34b61dfcb457b31d0153f3a]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1213442470 +0200
Message:

input: Add an event manager to the input.

Currently libvlc uses "state" callback to notice input state changes, and the playlist notice input state change via direct call from the input.
playlist can't use the "state" variable as it is also used by the playlist to ask the input to do a certain action.

The event approach is much more clear here.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/input.c

    re3c6b24 racb1a3a  
    166166    p_input->b_preparsing = b_quick; 
    167167    p_input->psz_header = psz_header ? strdup( psz_header ) : NULL; 
     168 
     169    /* Init events */ 
     170    vlc_event_manager_init_with_vlc_object( 
     171        &p_input->p->event_manager, p_input ); 
    168172 
    169173    /* Init Common fields */ 
     
    310314    input_thread_private_t *priv = p_input->p; 
    311315 
     316    vlc_event_manager_fini( &p_input->p->event_manager ); 
     317 
    312318    stats_TimerDump( p_input, STATS_TIMER_INPUT_LAUNCHING ); 
    313319    stats_TimerClean( p_input, STATS_TIMER_INPUT_LAUNCHING ); 
  • src/input/input_internal.h

    rea89b9c racb1a3a  
    7777struct input_thread_private_t 
    7878{ 
     79    /* Object's event manager */ 
     80    vlc_event_manager_t event_manager; 
     81 
    7982    /* Global properties */ 
    8083    bool  b_can_pause;