Changeset d3d776685b767f1a4648d66e5ba00c495c69cb19

Show
Ignore:
Timestamp:
05/07/08 20:38:43 (4 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1210185523 +0300
git-parent:

[2b5eb3185ecd05444ce310ec33e0fdc0e5e69c90]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1210185523 +0300
Message:

Remove pl_Get. This endorsed unyielded playlist access.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_playlist.h

    r722ab9f rd3d7766  
    263263#define PL_UNLOCK vlc_object_unlock( p_playlist ) 
    264264 
    265 #define pl_Get( a ) a->p_libvlc->p_playlist 
    266  
    267265VLC_EXPORT( playlist_t *, __pl_Yield, ( vlc_object_t * ) ); 
    268266#define pl_Yield( a ) __pl_Yield( VLC_OBJECT(a) ) 
  • src/input/input.c

    r6b42b42 rd3d7766  
    554554        /* We have finished */ 
    555555        p_input->b_eof = true; 
    556         playlist_Signal( pl_Get( p_input ) ); 
     556        playlist_Signal( p_input->p_libvlc->p_playlist ); 
    557557    } 
    558558 
     
    21112111        access_Control( p_input->p->input.p_access,ACCESS_GET_META, p_meta ); 
    21122112        InputUpdateMeta( p_input, p_meta ); 
    2113         var_SetInteger( pl_Get( p_input ), "item-change", p_input->p->input.p_item->i_id ); 
     2113        var_SetInteger( p_input->p_libvlc->p_playlist, "item-change", p_input->p->input.p_item->i_id ); 
    21142114        p_access->info.i_update &= ~INPUT_UPDATE_META; 
    21152115    } 
     
    21542154    { 
    21552155        pl_Yield( p_input ); 
    2156         var_SetInteger( pl_Get( p_input ), "item-change", 
     2156        var_SetInteger( p_input->p_libvlc->p_playlist, "item-change", 
    21572157                        p_input->p->input.p_item->i_id ); 
    21582158        pl_Release( p_input ); 
  • src/video_output/video_output.c

    r6da90a1 rd3d7766  
    510510    vout_thread_t *p_another_vout; 
    511511 
    512     playlist_t *p_playlist = pl_Get( p_vout ); 
    513     if( p_playlist->b_die ) return; 
    514     vlc_object_yield( p_playlist ); 
    515 /* This is a dirty hack for mostly Linux, where there is no way to get the GUI 
    516    back if you closed it while playing video. This is solved in Mac OS X, 
    517    where we have this novelty called menubar, that will always allow you access 
    518    to the applications main functionality. They should try that on linux sometime */ 
    519         p_another_vout = vlc_object_find( p_this->p_libvlc, 
    520                                           VLC_OBJECT_VOUT, FIND_ANYWHERE ); 
    521         if( p_another_vout == NULL ) 
    522         { 
    523             vlc_value_t val; 
    524             val.b_bool = true
    525             var_Set( p_playlist, "intf-show", val ); 
    526     } 
     512    playlist_t *p_playlist = pl_Yield( p_vout ); 
     513    if( p_playlist->b_die ) 
     514    { 
     515        pl_Release( p_vout ); 
     516        return; 
     517    } 
     518    /* This is a dirty hack mostly for Linux, where there is no way to get the 
     519     * GUI back if you closed it while playing video. This is solved in 
     520     * Mac OS X, where we have this novelty called menubar, that will always 
     521     * allow you access to the applications main functionality. They should try 
     522     * that on linux sometime. */ 
     523    p_another_vout = vlc_object_find( p_this->p_libvlc, 
     524                                      VLC_OBJECT_VOUT, FIND_ANYWHERE )
     525    if( p_another_vout == NULL ) 
     526        var_SetBool( p_playlist, "intf-show", true ); 
    527527    else 
    528     { 
    529528        vlc_object_release( p_another_vout ); 
    530     } 
    531     vlc_object_release( p_playlist ); 
     529    pl_Release( p_vout ); 
    532530#endif 
    533531}