X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Flibvlc.c;h=a8c72bfe7037dd9f8a7037684ec53f6f6fd3a788;hb=346a3ebe345dff7d6e6ab000ab4b150a4a125ea9;hp=1c0ce4e56c4106896d64108f71537ecc5f66cf1c;hpb=e9947bec0ae6a8f81dcc10e2595dd6cebd72641f;p=vlc diff --git a/src/libvlc.c b/src/libvlc.c index 1c0ce4e56c..a8c72bfe70 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1,5 +1,5 @@ /***************************************************************************** - * libvlc.c: main libvlc source + * libvlc.c: Implementation of the old libvlc API ***************************************************************************** * Copyright (C) 1998-2006 the VideoLAN team * $Id$ @@ -36,15 +36,13 @@ * Preamble *****************************************************************************/ #include -#include -#include +#include "control/libvlc_internal.h" -#include +#include -#include "audio_output.h" -#include "vlc_video.h" -#include "video_output.h" +#include +#include /***************************************************************************** * VLC_Version: return the libvlc version. @@ -90,9 +88,9 @@ char const * VLC_Error( int i_err ) } /***************************************************************************** - * VLC_Create: allocate a vlc_t structure, and initialize libvlc if needed. + * VLC_Create: allocate a libvlc instance and intialize global libvlc stuff if needed ***************************************************************************** - * This function allocates a vlc_t structure and returns a negative value + * This function allocates a libvlc instance and returns a negative value * in case of failure. Also, the thread system is initialized. *****************************************************************************/ int VLC_Create( void ) @@ -110,9 +108,9 @@ int VLC_Create( void ) /***************************************************************************** - * VLC_Init: initialize a vlc_t structure. + * VLC_Init: initialize a libvlc instance ***************************************************************************** - * This function initializes a previously allocated vlc_t structure: + * This function initializes a previously allocated libvlc instance: * - CPU detection * - gettext initialization * - message queue, module bank and playlist initialization @@ -183,7 +181,7 @@ int VLC_CleanUp( int i_object ) int VLC_Destroy( int i_object ) { LIBVLC_FUNC; - return libvlc_InternalDestroy( p_libvlc, VLC_TRUE ); + return libvlc_InternalDestroy( p_libvlc, i_object ? VLC_TRUE : VLC_FALSE ); } /***************************************************************************** @@ -314,9 +312,9 @@ int VLC_AddTarget( int i_object, char const *psz_target, { int i_err; LIBVLC_PLAYLIST_FUNC; - i_err = playlist_PlaylistAddExt( p_libvlc->p_playlist, psz_target, - psz_target, i_mode, i_pos, -1, - ppsz_options, i_options ); + i_err = playlist_AddExt( p_libvlc->p_playlist, psz_target, + NULL, i_mode, i_pos, -1, + ppsz_options, i_options, VLC_TRUE, VLC_FALSE ); LIBVLC_PLAYLIST_FUNC_END; return i_err; } @@ -670,7 +668,7 @@ int VLC_PlaylistNumberOfItems( int i_object ) { int i_size; LIBVLC_PLAYLIST_FUNC; - i_size = p_libvlc->p_playlist->i_size; + i_size = p_libvlc->p_playlist->items.i_size; LIBVLC_PLAYLIST_FUNC_END; return i_size; } @@ -707,7 +705,7 @@ int VLC_PlaylistPrev( int i_object ) int VLC_PlaylistClear( int i_object ) { LIBVLC_PLAYLIST_FUNC; - playlist_Clear( p_libvlc->p_playlist ); + playlist_Clear( p_libvlc->p_playlist, VLC_TRUE ); LIBVLC_PLAYLIST_FUNC_END; return VLC_SUCCESS; }