* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.20 2002/08/04 20:04:11 sam Exp $
+ * $Id: libvlc.c,v 1.25 2002/08/12 09:34:15 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Pretend we are a builtin module
*****************************************************************************/
#define MODULE_NAME main
+#define MODULE_PATH main
#define __BUILTIN__
/*****************************************************************************
*/
p_vlc->p_memcpy_module = module_Need( p_vlc, "memcpy", "$memcpy" );
- if( p_vlc->p_memcpy_module == NULL )
+ if( p_vlc->pf_memcpy == NULL )
{
- msg_Warn( p_vlc, "no suitable memcpy module, using libc default" );
p_vlc->pf_memcpy = memcpy;
}
+ if( p_vlc->pf_memset == NULL )
+ {
+ p_vlc->pf_memset = memset;
+ }
+
/*
* Initialize shared resources and libraries
*/
err = intf_RunThread( p_intf );
if( err )
{
- vlc_object_detach_all( p_intf );
+ vlc_object_detach( p_intf );
intf_Destroy( p_intf );
return err;
}
intf_thread_t *p_intf;
playlist_t *p_playlist;
vout_thread_t *p_vout;
- aout_thread_t *p_aout;
+ aout_instance_t *p_aout;
/* Check that the handle is valid */
if( !p_vlc || p_vlc->i_status != VLC_STATUS_RUNNING )
while( (p_intf = vlc_object_find( p_vlc, VLC_OBJECT_INTF, FIND_CHILD )) )
{
intf_StopThread( p_intf );
- vlc_object_detach_all( p_intf );
+ vlc_object_detach( p_intf );
vlc_object_release( p_intf );
intf_Destroy( p_intf );
}
while( (p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST,
FIND_CHILD )) )
{
- vlc_object_detach_all( p_playlist );
+ vlc_object_detach( p_playlist );
vlc_object_release( p_playlist );
playlist_Destroy( p_playlist );
}
msg_Dbg( p_vlc, "removing all video outputs" );
while( (p_vout = vlc_object_find( p_vlc, VLC_OBJECT_VOUT, FIND_CHILD )) )
{
- vlc_object_detach_all( p_vout );
+ vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_DestroyThread( p_vout );
}
msg_Dbg( p_vlc, "removing all audio outputs" );
while( (p_aout = vlc_object_find( p_vlc, VLC_OBJECT_AOUT, FIND_CHILD )) )
{
- vlc_object_detach_all( p_aout );
- vlc_object_release( p_aout );
- aout_DestroyThread( p_aout );
+ vlc_object_detach( (vlc_object_t *)p_aout );
+ vlc_object_release( (vlc_object_t *)p_aout );
+ aout_DeleteInstance( p_aout );
}
/* Update the handle status */
if( i_index == i_vlc )
{
fprintf( stderr, "error: trying to unregister %p which is not in "
- "the list\n", p_vlc );
+ "the list\n", (void *)p_vlc );
vlc_mutex_unlock( p_vlc->p_global_lock );
vlc_object_destroy( p_vlc );
return VLC_EGENERIC;