Changeset 74ea8fa58e39eb8dffb0c5827484517acae3c0bc

Show
Ignore:
Timestamp:
06/07/02 18:06:09 (6 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 1023465969 +0000
git-parent:

[3712520f8b2a1d83426f50a6cf4a63347da57ebb]

git-author:
Sam Hocevar <sam@videolan.org> 1023465969 +0000
Message:
  • ./plugins/dummy/input_dummy.c: dummy targets such as vlc:nop, vlc:loop
    and vlc:quit work again.
  • ./src/playlist/playlist.c: when a new target is added, for instance through the "File" menu, it is automatically played.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ChangeLog

    r3712520 r74ea8fa  
    66Not released yet 
    77 
     8  * ./plugins/dummy/input_dummy.c: dummy targets such as vlc:nop, vlc:loop 
     9    and vlc:quit work again. 
     10  * ./src/playlist/playlist.c: when a new target is added, for instance through 
     11    the "File" menu, it is automatically played. 
    812  * ./include/vlc_objects.h: pointers are set to NULL after a call to 
    913    vlc_object_destroy. 
  • plugins/dummy/input_dummy.c

    r9e3ab28 r74ea8fa  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: input_dummy.c,v 1.18 2002/06/01 12:31:58 sam Exp $ 
     5 * $Id: input_dummy.c,v 1.19 2002/06/07 16:06:09 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    9595    /* Force dummy demux plug-in */ 
    9696    p_input->psz_demux = "vlc"; 
    97     return( 0 )
     97    return 0
    9898} 
    9999 
     
    121121    { 
    122122        msg_Err( p_input, "out of memory" ); 
    123         return( -1 )
     123        return -1
    124124    } 
    125125 
     
    132132        msg_Info( p_input, "command `nop'" ); 
    133133        p_method->i_command = COMMAND_NOP; 
    134         return( 0 )
     134        return 0
    135135    } 
    136136 
     
    140140        msg_Info( p_input, "command `quit'" ); 
    141141        p_method->i_command = COMMAND_QUIT; 
    142         return( 0 )
     142        return 0
    143143    } 
    144144 
     
    148148        msg_Info( p_input, "command `loop'" ); 
    149149        p_method->i_command = COMMAND_LOOP; 
    150         return( 0 )
     150        return 0
    151151    } 
    152152 
     
    158158        p_method->i_command = COMMAND_PAUSE; 
    159159        p_method->expiration = mdate() + (mtime_t)i_arg * (mtime_t)1000000; 
    160         return( 0 )
     160        return 0
    161161    } 
    162162 
     
    165165    p_input->b_error = 1; 
    166166 
    167     return( -1 )
     167    return -1
    168168} 
    169169 
     
    182182{ 
    183183    struct demux_sys_s * p_method = p_input->p_demux_data; 
     184    playlist_t *p_playlist; 
     185 
     186    p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT ); 
     187 
     188    if( p_playlist == NULL ) 
     189    { 
     190        msg_Err( p_input, "we are not attached to a playlist" ); 
     191        p_input->b_error = 1; 
     192        return 1; 
     193    } 
    184194 
    185195    switch( p_method->i_command ) 
     
    187197        case COMMAND_QUIT: 
    188198            p_input->p_vlc->b_die = 1; 
    189             p_input->b_die = 1; 
    190199            break; 
    191200 
    192201        case COMMAND_LOOP: 
    193             //playlist_Jumpto( p_input->p_vlc->p_playlist, -1 ); 
    194             p_input->b_eof = 1; 
     202            playlist_Goto( p_playlist, 0 ); 
    195203            break; 
    196204 
     
    212220    } 
    213221 
     222    vlc_object_release( p_playlist ); 
     223 
    214224    return 1; 
    215225} 
  • plugins/gtk/gtk_playlist.c

    rb9e9cb4 r74ea8fa  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: gtk_playlist.c,v 1.33 2002/06/07 14:30:41 sam Exp $ 
     5 * $Id: gtk_playlist.c,v 1.34 2002/06/07 16:06:09 sam Exp $ 
    66 * 
    77 * Authors: Pierre Baillet <oct@zoy.org> 
     
    6565                          gpointer         user_data ) 
    6666{ 
    67     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
    68     playlist_t *p_playlist; 
    69  
    70     p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); 
     67    intf_thread_t *  p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
     68    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 
     69                                                       FIND_ANYWHERE ); 
    7170    if( p_playlist == NULL ) 
    7271    { 
     
    111110                          gpointer         user_data ) 
    112111{ 
    113     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
    114     playlist_t *p_playlist; 
    115  
    116     p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); 
    117  
    118     if( p_playlist ) 
    119     { 
    120         playlist_Prev( p_playlist ); 
    121         vlc_object_release( p_playlist ); 
    122     } 
     112    intf_thread_t *  p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
     113    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 
     114                                                       FIND_ANYWHERE ); 
     115    if( p_playlist == NULL ) 
     116    { 
     117        return FALSE; 
     118    } 
     119 
     120    playlist_Prev( p_playlist ); 
     121    vlc_object_release( p_playlist ); 
    123122 
    124123    return TRUE; 
     
    129128                          gpointer         user_data) 
    130129{ 
    131     intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
    132     playlist_t *p_playlist; 
    133  
    134     p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); 
    135  
    136     if( p_playlist ) 
    137     { 
    138         playlist_Next( p_playlist ); 
    139         vlc_object_release( p_playlist ); 
    140     } 
     130    intf_thread_t *  p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data ); 
     131    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 
     132                                                       FIND_ANYWHERE ); 
     133    if( p_playlist == NULL ) 
     134    { 
     135        return FALSE; 
     136    } 
     137 
     138    playlist_Next( p_playlist ); 
     139    vlc_object_release( p_playlist ); 
    141140 
    142141    return TRUE; 
  • src/misc/objects.c

    rb9e9cb4 r74ea8fa  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: objects.c,v 1.8 2002/06/07 14:30:41 sam Exp $ 
     5 * $Id: objects.c,v 1.9 2002/06/07 16:06:09 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    182182    while( p_this->i_refcount ) 
    183183    { 
    184         if( i_delay == 0 ) 
     184        i_delay++; 
     185 
     186        /* Don't warn immediately ... 100ms seems OK */ 
     187        if( i_delay == 2 ) 
    185188        { 
    186189            msg_Warn( p_this, "refcount is %i, delaying before deletion", 
     
    198201        } 
    199202 
    200         i_delay++; 
    201203        msleep( 100000 ); 
    202204    } 
  • src/playlist/playlist.c

    rb9e9cb4 r74ea8fa  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: playlist.c,v 1.6 2002/06/07 14:30:41 sam Exp $ 
     5 * $Id: playlist.c,v 1.7 2002/06/07 16:06:09 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    180180 
    181181    p_playlist->pp_items[i_pos] = p_item; 
    182     p_playlist->i_status = PLAYLIST_RUNNING; 
     182 
     183    if( i_mode & PLAYLIST_GO ) 
     184    { 
     185        p_playlist->i_index = i_pos; 
     186        if( p_playlist->p_input ) 
     187        { 
     188            input_StopThread( p_playlist->p_input ); 
     189        } 
     190        p_playlist->i_status = PLAYLIST_RUNNING; 
     191    } 
    183192 
    184193    vlc_mutex_unlock( &p_playlist->object_lock );