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.
0.5.0
Not released yet
+ * ./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.
* ./include/vlc_objects.h: pointers are set to NULL after a call to
vlc_object_destroy.
* ./po/pl.po: updated polish translation, thanks to Arkadiusz Lipiec
* input_dummy.c: dummy input plugin, to manage "vlc:***" special options
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_dummy.c,v 1.18 2002/06/01 12:31:58 sam Exp $
+ * $Id: input_dummy.c,v 1.19 2002/06/07 16:06:09 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* Force dummy demux plug-in */
p_input->psz_demux = "vlc";
- return( 0 );
+ return 0;
}
/*****************************************************************************
if( p_method == NULL )
{
msg_Err( p_input, "out of memory" );
- return( -1 );
+ return -1;
}
p_input->p_demux_data = p_method;
{
msg_Info( p_input, "command `nop'" );
p_method->i_command = COMMAND_NOP;
- return( 0 );
+ return 0;
}
/* Check for a "vlc:quit" command */
{
msg_Info( p_input, "command `quit'" );
p_method->i_command = COMMAND_QUIT;
- return( 0 );
+ return 0;
}
/* Check for a "vlc:loop" command */
{
msg_Info( p_input, "command `loop'" );
p_method->i_command = COMMAND_LOOP;
- return( 0 );
+ return 0;
}
/* Check for a "vlc:pause:***" command */
msg_Info( p_input, "command `pause %i'", i_arg );
p_method->i_command = COMMAND_PAUSE;
p_method->expiration = mdate() + (mtime_t)i_arg * (mtime_t)1000000;
- return( 0 );
+ return 0;
}
msg_Err( p_input, "unknown command `%s'", psz_name );
free( p_input->p_demux_data );
p_input->b_error = 1;
- return( -1 );
+ return -1;
}
/*****************************************************************************
static int DummyDemux( input_thread_t *p_input )
{
struct demux_sys_s * p_method = p_input->p_demux_data;
+ playlist_t *p_playlist;
+
+ p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
+
+ if( p_playlist == NULL )
+ {
+ msg_Err( p_input, "we are not attached to a playlist" );
+ p_input->b_error = 1;
+ return 1;
+ }
switch( p_method->i_command )
{
case COMMAND_QUIT:
p_input->p_vlc->b_die = 1;
- p_input->b_die = 1;
break;
case COMMAND_LOOP:
- //playlist_Jumpto( p_input->p_vlc->p_playlist, -1 );
- p_input->b_eof = 1;
+ playlist_Goto( p_playlist, 0 );
break;
case COMMAND_PAUSE:
break;
}
+ vlc_object_release( p_playlist );
+
return 1;
}
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.33 2002/06/07 14:30:41 sam Exp $
+ * $Id: gtk_playlist.c,v 1.34 2002/06/07 16:06:09 sam Exp $
*
* Authors: Pierre Baillet <oct@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
gboolean GtkPlaylistShow( GtkWidget *widget,
gpointer user_data )
{
- intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
- playlist_t *p_playlist;
-
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
if( p_playlist == NULL )
{
return FALSE;
gboolean GtkPlaylistPrev( GtkWidget *widget,
gpointer user_data )
{
- intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
- playlist_t *p_playlist;
-
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-
- if( p_playlist )
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
{
- playlist_Prev( p_playlist );
- vlc_object_release( p_playlist );
+ return FALSE;
}
+ playlist_Prev( p_playlist );
+ vlc_object_release( p_playlist );
+
return TRUE;
}
gboolean GtkPlaylistNext( GtkWidget *widget,
gpointer user_data)
{
- intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
- playlist_t *p_playlist;
-
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-
- if( p_playlist )
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
{
- playlist_Next( p_playlist );
- vlc_object_release( p_playlist );
+ return FALSE;
}
+ playlist_Next( p_playlist );
+ vlc_object_release( p_playlist );
+
return TRUE;
}
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.8 2002/06/07 14:30:41 sam Exp $
+ * $Id: objects.c,v 1.9 2002/06/07 16:06:09 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
while( p_this->i_refcount )
{
- if( i_delay == 0 )
+ i_delay++;
+
+ /* Don't warn immediately ... 100ms seems OK */
+ if( i_delay == 2 )
{
msg_Warn( p_this, "refcount is %i, delaying before deletion",
p_this->i_refcount );
return;
}
- i_delay++;
msleep( 100000 );
}
* playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: playlist.c,v 1.6 2002/06/07 14:30:41 sam Exp $
+ * $Id: playlist.c,v 1.7 2002/06/07 16:06:09 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
}
p_playlist->pp_items[i_pos] = p_item;
- p_playlist->i_status = PLAYLIST_RUNNING;
+
+ if( i_mode & PLAYLIST_GO )
+ {
+ p_playlist->i_index = i_pos;
+ if( p_playlist->p_input )
+ {
+ input_StopThread( p_playlist->p_input );
+ }
+ p_playlist->i_status = PLAYLIST_RUNNING;
+ }
vlc_mutex_unlock( &p_playlist->object_lock );