Commit cd5ed364 authored by Damien Fouilleul's avatar Damien Fouilleul

- added controlled symbol export support for win32. Now, all visible symbols...

- added controlled symbol export support for win32. Now, all visible symbols in libvlc.dll must be declared using either VLC_EXPORT or VLC_PUBLIC_API. Otherwise, they will not be exported. this has the advantage of reducing the number of symbols in the DLL, saving on file size an binding time at runtime. All exported symbols will be listed in the libvlc.def file.
This also pave the way for using the visibility feature in GCC 4, adding controlled symbols export for UNIX/MacOS X as well.
parent d20a2464
...@@ -5602,6 +5602,7 @@ AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [ ...@@ -5602,6 +5602,7 @@ AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
VLC_ADD_PLUGINS([${BUILTINS}]) VLC_ADD_PLUGINS([${BUILTINS}])
VLC_ADD_CPPFLAGS([libvlc],[-DDLL_EXPORT])
BUILTINS="" BUILTINS=""
], [ ], [
LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}" LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
......
...@@ -61,28 +61,28 @@ typedef struct libvlc_exception_t libvlc_exception_t; ...@@ -61,28 +61,28 @@ typedef struct libvlc_exception_t libvlc_exception_t;
* an exception structure. * an exception structure.
* \param p_exception the exception to initialize * \param p_exception the exception to initialize
*/ */
void libvlc_exception_init( libvlc_exception_t *p_exception ); VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
/** /**
* Has an exception been raised ? * Has an exception been raised ?
* \param p_exception the exception to query * \param p_exception the exception to query
* \return 0 if no exception raised, 1 else * \return 0 if no exception raised, 1 else
*/ */
int libvlc_exception_raised( libvlc_exception_t *p_exception ); VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception );
/** /**
* Raise an exception * Raise an exception
* \param p_exception the exception to raise * \param p_exception the exception to raise
* \param psz_message the exception message * \param psz_message the exception message
*/ */
void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... ); VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
/** /**
* Clear an exception object so it can be reused. * Clear an exception object so it can be reused.
* The exception object must be initialized * The exception object must be initialized
* \param p_exception the exception to clear * \param p_exception the exception to clear
*/ */
void libvlc_exception_clear( libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
/** /**
* Get exception message * Get exception message
...@@ -90,7 +90,7 @@ void libvlc_exception_clear( libvlc_exception_t * ); ...@@ -90,7 +90,7 @@ void libvlc_exception_clear( libvlc_exception_t * );
* \return the exception message or NULL if not applicable (exception not raised * \return the exception message or NULL if not applicable (exception not raised
* for example) * for example)
*/ */
char* libvlc_exception_get_message( libvlc_exception_t *p_exception ); VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
/**@} */ /**@} */
...@@ -113,7 +113,7 @@ typedef struct libvlc_instance_t libvlc_instance_t; ...@@ -113,7 +113,7 @@ typedef struct libvlc_instance_t libvlc_instance_t;
* \param argv command-line-type arguments * \param argv command-line-type arguments
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *); VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
/** /**
* Returns a libvlc instance identifier for legacy APIs. Use of this * Returns a libvlc instance identifier for legacy APIs. Use of this
...@@ -121,13 +121,13 @@ libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *); ...@@ -121,13 +121,13 @@ libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
* new API. * new API.
* \param p_instance the instance * \param p_instance the instance
*/ */
int libvlc_get_vlc_id( libvlc_instance_t *p_instance ); VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
/** /**
* Destroy a libvlc instance. * Destroy a libvlc instance.
* \param p_instance the instance to destroy * \param p_instance the instance to destroy
*/ */
void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
/** @}*/ /** @}*/
...@@ -143,7 +143,7 @@ void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -143,7 +143,7 @@ void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Set loop variable * Set loop variable
*/ */
void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
libvlc_exception_t * ); libvlc_exception_t * );
/** /**
...@@ -156,7 +156,7 @@ void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, ...@@ -156,7 +156,7 @@ void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
* \param ppsz_options the options to add to the item * \param ppsz_options the options to add to the item
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_play( libvlc_instance_t*, int, int, char **, VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
libvlc_exception_t * ); libvlc_exception_t * );
/** /**
...@@ -164,7 +164,7 @@ void libvlc_playlist_play( libvlc_instance_t*, int, int, char **, ...@@ -164,7 +164,7 @@ void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
* \param p_instance the instance to pause * \param p_instance the instance to pause
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Checks if the playlist is running * Checks if the playlist is running
...@@ -172,7 +172,7 @@ void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -172,7 +172,7 @@ void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return 0 if the playlist is stopped or paused, 1 if it is running * \return 0 if the playlist is stopped or paused, 1 if it is running
*/ */
int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Get the number of items in the playlist * Get the number of items in the playlist
...@@ -180,35 +180,35 @@ int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -180,35 +180,35 @@ int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the number of items * \return the number of items
*/ */
int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Stop playing * Stop playing
* \param p_instance the instance to stop * \param p_instance the instance to stop
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Go to next playlist item (starts playback if it was stopped) * Go to next playlist item (starts playback if it was stopped)
* \param p_instance the instance to use * \param p_instance the instance to use
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Go to previous playlist item (starts playback if it was stopped) * Go to previous playlist item (starts playback if it was stopped)
* \param p_instance the instance to use * \param p_instance the instance to use
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Remove all playlist items * Remove all playlist items
* \param p_instance the instance * \param p_instance the instance
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Add an item at the end of the playlist * Add an item at the end of the playlist
...@@ -218,7 +218,7 @@ void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -218,7 +218,7 @@ void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
* \param psz_name a name that you might want to give or NULL * \param psz_name a name that you might want to give or NULL
* \return the identifier of the new item * \return the identifier of the new item
*/ */
int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *, VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
libvlc_exception_t * ); libvlc_exception_t * );
/** /**
...@@ -231,7 +231,7 @@ int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *, ...@@ -231,7 +231,7 @@ int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the identifier of the new item * \return the identifier of the new item
*/ */
int libvlc_playlist_add_extended( libvlc_instance_t *, const char *, VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
const char *, int, const char **, const char *, int, const char **,
libvlc_exception_t * ); libvlc_exception_t * );
...@@ -242,7 +242,7 @@ int libvlc_playlist_add_extended( libvlc_instance_t *, const char *, ...@@ -242,7 +242,7 @@ int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return * \return
*/ */
int libvlc_playlist_delete_item( libvlc_instance_t *, int, VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
libvlc_exception_t * ); libvlc_exception_t * );
typedef struct libvlc_input_t libvlc_input_t; typedef struct libvlc_input_t libvlc_input_t;
...@@ -252,7 +252,7 @@ typedef struct libvlc_input_t libvlc_input_t; ...@@ -252,7 +252,7 @@ typedef struct libvlc_input_t libvlc_input_t;
* \param p_exception an initialized excecption * \param p_exception an initialized excecption
* \return an input object * \return an input object
*/ */
libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *, VLC_PUBLIC_API libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
libvlc_exception_t * ); libvlc_exception_t * );
/** @}*/ /** @}*/
...@@ -269,18 +269,18 @@ libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *, ...@@ -269,18 +269,18 @@ libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
/** Free an input object /** Free an input object
* \param p_input the input to free * \param p_input the input to free
*/ */
void libvlc_input_free( libvlc_input_t * ); VLC_PUBLIC_API void libvlc_input_free( libvlc_input_t * );
/// \bug This might go away ... to be replaced by a broader system /// \bug This might go away ... to be replaced by a broader system
vlc_int64_t libvlc_input_get_length ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API vlc_int64_t libvlc_input_get_length ( libvlc_input_t *, libvlc_exception_t *);
vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *);
void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *);
float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *);
void libvlc_input_set_position ( libvlc_input_t *, float, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_input_set_position ( libvlc_input_t *, float, libvlc_exception_t *);
vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *);
float libvlc_input_get_rate ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API float libvlc_input_get_rate ( libvlc_input_t *, libvlc_exception_t *);
void libvlc_input_set_rate ( libvlc_input_t *, float, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_input_set_rate ( libvlc_input_t *, float, libvlc_exception_t *);
int libvlc_input_get_state ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_input_get_state ( libvlc_input_t *, libvlc_exception_t *);
/** @} */ /** @} */
...@@ -313,15 +313,15 @@ libvlc_rectangle_t; ...@@ -313,15 +313,15 @@ libvlc_rectangle_t;
* \param p_input the input * \param p_input the input
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
vlc_bool_t libvlc_input_has_vout ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API vlc_bool_t libvlc_input_has_vout( libvlc_input_t *, libvlc_exception_t *);
float libvlc_input_get_fps ( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API float libvlc_input_get_fps( libvlc_input_t *, libvlc_exception_t *);
/** /**
* Toggle fullscreen status on video output * Toggle fullscreen status on video output
* \param p_input the input * \param p_input the input
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Enable or disable fullscreen on a video output * Enable or disable fullscreen on a video output
...@@ -329,7 +329,7 @@ void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); ...@@ -329,7 +329,7 @@ void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * );
* \param b_fullscreen boolean for fullscreen status * \param b_fullscreen boolean for fullscreen status
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
/** /**
* Get current fullscreen status * Get current fullscreen status
...@@ -337,7 +337,7 @@ void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); ...@@ -337,7 +337,7 @@ void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the fullscreen status (boolean) * \return the fullscreen status (boolean)
*/ */
int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Get current video height * Get current video height
...@@ -345,7 +345,7 @@ int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); ...@@ -345,7 +345,7 @@ int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the video height * \return the video height
*/ */
int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Get current video width * Get current video width
...@@ -353,7 +353,7 @@ int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * ); ...@@ -353,7 +353,7 @@ int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the video width * \return the video width
*/ */
int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Get current video aspect ratio * Get current video aspect ratio
...@@ -361,7 +361,7 @@ int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * ); ...@@ -361,7 +361,7 @@ int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the video aspect ratio * \return the video aspect ratio
*/ */
char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Set new video aspect ratio * Set new video aspect ratio
...@@ -369,7 +369,7 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * ); ...@@ -369,7 +369,7 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
* \param psz_aspect new video aspect-ratio * \param psz_aspect new video aspect-ratio
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
/** /**
* Get current crop filter geometry * Get current crop filter geometry
...@@ -377,7 +377,7 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t ...@@ -377,7 +377,7 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the crop filter geometry * \return the crop filter geometry
*/ */
char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Set new crop filter geometry * Set new crop filter geometry
...@@ -385,7 +385,7 @@ char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * ); ...@@ -385,7 +385,7 @@ char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * );
* \param psz_geometry new crop filter geometry * \param psz_geometry new crop filter geometry
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * );
/** /**
* Take a snapshot of the current video window * Take a snapshot of the current video window
...@@ -393,9 +393,9 @@ void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_ ...@@ -393,9 +393,9 @@ void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_
* \param psz_filepath the path where to save the screenshot to * \param psz_filepath the path where to save the screenshot to
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *); VLC_PUBLIC_API int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
/** /**
* Resize the current video output window * Resize the current video output window
...@@ -405,7 +405,7 @@ int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *); ...@@ -405,7 +405,7 @@ int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the success status (boolean) * \return the success status (boolean)
*/ */
void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
/** /**
* change the parent for the current the video output * change the parent for the current the video output
...@@ -414,7 +414,7 @@ void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *); ...@@ -414,7 +414,7 @@ void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the success status (boolean) * \return the success status (boolean)
*/ */
int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
/** /**
* Set the default video output parent * Set the default video output parent
...@@ -423,7 +423,7 @@ int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception ...@@ -423,7 +423,7 @@ int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception
* \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32) * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
/** /**
* Set the default video output size * Set the default video output size
...@@ -433,7 +433,7 @@ void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exc ...@@ -433,7 +433,7 @@ void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exc
* \param height new height for video drawable * \param height new height for video drawable
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
/** /**
* Set the default video output viewport for a windowless video output (MacOS X only) * Set the default video output viewport for a windowless video output (MacOS X only)
...@@ -443,7 +443,7 @@ void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * ...@@ -443,7 +443,7 @@ void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t *
* \param clip coordinates within video drawable * \param clip coordinates within video drawable
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
/** @} */ /** @} */
...@@ -467,7 +467,7 @@ void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, ...@@ -467,7 +467,7 @@ void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *,
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return void * \return void
*/ */
void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Get current mute status * Get current mute status
...@@ -475,7 +475,7 @@ void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -475,7 +475,7 @@ void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the mute status (boolean) * \return the mute status (boolean)
*/ */
vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Set mute status * Set mute status
...@@ -484,7 +484,7 @@ vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -484,7 +484,7 @@ vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return void * \return void
*/ */
void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
/** /**
* Get current audio level * Get current audio level
...@@ -492,7 +492,7 @@ void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t ...@@ -492,7 +492,7 @@ void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the audio level (int) * \return the audio level (int)
*/ */
int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Set current audio level * Set current audio level
...@@ -500,7 +500,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -500,7 +500,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
* \param i_volume the volume (int) * \param i_volume the volume (int)
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
/** /**
+ * Get current audio track + * Get current audio track
...@@ -508,7 +508,7 @@ void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *); ...@@ -508,7 +508,7 @@ void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
+ * \param p_exception an initialized exception + * \param p_exception an initialized exception
+ * \return the audio track (int) + * \return the audio track (int)
+ */ + */
int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * );
/** /**
* Set current audio track * Set current audio track
...@@ -516,7 +516,7 @@ int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * ); ...@@ -516,7 +516,7 @@ int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * );
* \param i_track the track (int) * \param i_track the track (int)
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * );
/** /**
* Get current audio channel * Get current audio channel
...@@ -524,7 +524,7 @@ void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * ); ...@@ -524,7 +524,7 @@ void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * );
* \param p_exception an initialized exception * \param p_exception an initialized exception
* \return the audio channel (int) * \return the audio channel (int)
*/ */
int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * ); VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
/** /**
* Set current audio channel * Set current audio channel
...@@ -532,7 +532,7 @@ int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * ); ...@@ -532,7 +532,7 @@ int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
* \param i_channel the audio channel (int) * \param i_channel the audio channel (int)
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
/** @} */ /** @} */
...@@ -549,7 +549,7 @@ void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * ); ...@@ -549,7 +549,7 @@ void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
* \param b_loop Should this broadcast be played in loop ? * \param b_loop Should this broadcast be played in loop ?
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* , VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
int, char **, int, int, libvlc_exception_t * ); int, char **, int, int, libvlc_exception_t * );
/** /**
...@@ -558,7 +558,7 @@ void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* , ...@@ -558,7 +558,7 @@ void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
* \param psz_name the media to delete * \param psz_name the media to delete
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
/** /**
* Enable or disable a media (vod or broadcast) * Enable or disable a media (vod or broadcast)
...@@ -567,7 +567,7 @@ void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * ); ...@@ -567,7 +567,7 @@ void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
* \param b_enabled the new status * \param b_enabled the new status
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int, VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
libvlc_exception_t *); libvlc_exception_t *);
/** /**
...@@ -577,7 +577,7 @@ void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int, ...@@ -577,7 +577,7 @@ void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
* \param psz_output the output MRL (the parameter to the "sout" variable) * \param psz_output the output MRL (the parameter to the "sout" variable)
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*, VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
libvlc_exception_t *); libvlc_exception_t *);
/** /**
...@@ -588,7 +588,7 @@ void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*, ...@@ -588,7 +588,7 @@ void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
* \param psz_input the input MRL * \param psz_input the input MRL
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*, VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
libvlc_exception_t *); libvlc_exception_t *);
/** /**
...@@ -598,7 +598,7 @@ void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*, ...@@ -598,7 +598,7 @@ void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
* \param b_loop the new status * \param b_loop the new status
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int, VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
libvlc_exception_t *); libvlc_exception_t *);
/** /**
...@@ -614,7 +614,7 @@ void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int, ...@@ -614,7 +614,7 @@ void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
* \param b_loop Should this broadcast be played in loop ? * \param b_loop Should this broadcast be played in loop ?
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* , VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
int, char **, int, int, libvlc_exception_t * ); int, char **, int, int, libvlc_exception_t * );
/** /**
...@@ -623,7 +623,7 @@ void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* , ...@@ -623,7 +623,7 @@ void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
* \param psz_name the name of the broadcast * \param psz_name the name of the broadcast
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
/** /**
* Stops the named broadcast. * Stops the named broadcast.
...@@ -631,7 +631,7 @@ void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * ) ...@@ -631,7 +631,7 @@ void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * )
* \param psz_name the name of the broadcast * \param psz_name the name of the broadcast
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
/** /**
* Pauses the named broadcast. * Pauses the named broadcast.
...@@ -639,7 +639,7 @@ void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * ) ...@@ -639,7 +639,7 @@ void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * )
* \param psz_name the name of the broadcast * \param psz_name the name of the broadcast
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
/** /**
* Seeks in the named broadcast. * Seeks in the named broadcast.
...@@ -648,7 +648,7 @@ void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * ) ...@@ -648,7 +648,7 @@ void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * )
* \param f_percentage the percentage to seek to * \param f_percentage the percentage to seek to
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
void libvlc_vlm_seek_media( libvlc_instance_t *, char *, VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
float, libvlc_exception_t * ); float, libvlc_exception_t * );
/** /**
...@@ -657,19 +657,19 @@ void libvlc_vlm_seek_media( libvlc_instance_t *, char *, ...@@ -657,19 +657,19 @@ void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
* \param psz_name the name of the broadcast * \param psz_name the name of the broadcast
* \param p_exception an initialized exception * \param p_exception an initialized exception
*/ */
char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * ); VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\ #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \ returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
char *, int , libvlc_exception_t * ); char *, int , libvlc_exception_t * );
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0); VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
...@@ -707,35 +707,37 @@ typedef struct libvlc_log_message_t ...@@ -707,35 +707,37 @@ typedef struct libvlc_log_message_t
* \param p_instance libvlc instance * \param p_instance libvlc instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance, libvlc_exception_t *p_e ); VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
libvlc_exception_t *p_e );
/** /**
* Set the VLC messaging verbosity level * Set the VLC messaging verbosity level
* \param p_log libvlc log instance * \param p_log libvlc log instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level, libvlc_exception_t *p_e ); VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
libvlc_exception_t *p_e );
/** /**
* Open an instance to VLC message log * Open an instance to VLC message log
* \param p_instance libvlc instance * \param p_instance libvlc instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *); VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
/** /**
* Close an instance of VLC message log * Close an instance of VLC message log
* \param p_log libvlc log instance * \param p_log libvlc log instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
/** /**
* Returns the number of messages in log * Returns the number of messages in log
* \param p_log libvlc log instance * \param p_log libvlc log instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *); VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
/** /**
* Clear all messages in log * Clear all messages in log
...@@ -743,28 +745,28 @@ unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *); ...@@ -743,28 +745,28 @@ unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
* \param p_log libvlc log instance * \param p_log libvlc log instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *); VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
/** /**
* Allocate and returns a new iterator to messages in log * Allocate and returns a new iterator to messages in log
* \param p_log libvlc log instance * \param p_log libvlc log instance
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *); VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
/** /**
* Releases a previoulsy allocated iterator * Releases a previoulsy allocated iterator
* \param p_log libvlc log iterator * \param p_log libvlc log iterator
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
/** /**
* Returns whether log iterator has more messages * Returns whether log iterator has more messages
* \param p_log libvlc log iterator * \param p_log libvlc log iterator
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
/** /**
* Returns next log message * Returns next log message
...@@ -772,7 +774,7 @@ int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_ex ...@@ -772,7 +774,7 @@ int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_ex
* \param p_log libvlc log iterator * \param p_log libvlc log iterator
* \param exception an initialized exception pointer * \param exception an initialized exception pointer
*/ */
libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter, VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
struct libvlc_log_message_t *buffer, struct libvlc_log_message_t *buffer,
libvlc_exception_t *p_e ); libvlc_exception_t *p_e );
......
...@@ -155,6 +155,15 @@ struct vlc_list_t ...@@ -155,6 +155,15 @@ struct vlc_list_t
# include "vlc_common.h" # include "vlc_common.h"
#endif #endif
/*****************************************************************************
* Shared library Export macros
*****************************************************************************/
#if defined(WIN32) && defined(DLL_EXPORT)
# define VLC_PUBLIC_API extern __declspec(dllexport)
#else
# define VLC_PUBLIC_API extern
#endif
/***************************************************************************** /*****************************************************************************
* Exported libvlc API * Exported libvlc API
*****************************************************************************/ *****************************************************************************/
...@@ -165,49 +174,49 @@ struct vlc_list_t ...@@ -165,49 +174,49 @@ struct vlc_list_t
* *
* \return a string containing the libvlc version * \return a string containing the libvlc version
*/ */
char const * VLC_Version ( void ); VLC_PUBLIC_API char const * VLC_Version ( void );
/** /**
* Retrieve libvlc compile time * Retrieve libvlc compile time
* *
* \return a string containing the libvlc compile time * \return a string containing the libvlc compile time
*/ */
char const * VLC_CompileTime ( void ); VLC_PUBLIC_API char const * VLC_CompileTime ( void );
/** /**
* Retrieve the username of the libvlc builder * Retrieve the username of the libvlc builder
* *
* \return a string containing the username of the libvlc builder * \return a string containing the username of the libvlc builder
*/ */
char const * VLC_CompileBy ( void ); VLC_PUBLIC_API char const * VLC_CompileBy ( void );
/** /**
* Retrieve the host of the libvlc builder * Retrieve the host of the libvlc builder
* *
* \return a string containing the host of the libvlc builder * \return a string containing the host of the libvlc builder
*/ */
char const * VLC_CompileHost ( void ); VLC_PUBLIC_API char const * VLC_CompileHost ( void );
/** /**
* Retrieve the domain name of the host of the libvlc builder * Retrieve the domain name of the host of the libvlc builder
* *
* \return a string containing the domain name of the host of the libvlc builder * \return a string containing the domain name of the host of the libvlc builder
*/ */
char const * VLC_CompileDomain ( void ); VLC_PUBLIC_API char const * VLC_CompileDomain ( void );
/** /**
* Retrieve libvlc compiler version * Retrieve libvlc compiler version
* *
* \return a string containing the libvlc compiler version * \return a string containing the libvlc compiler version
*/ */
char const * VLC_Compiler ( void ); VLC_PUBLIC_API char const * VLC_Compiler ( void );
/** /**
* Retrieve libvlc changeset * Retrieve libvlc changeset
* *
* \return a string containing the libvlc subversion changeset * \return a string containing the libvlc subversion changeset
*/ */
char const * VLC_Changeset ( void ); VLC_PUBLIC_API char const * VLC_Changeset ( void );
/** /**
* Return an error string * Return an error string
...@@ -215,7 +224,7 @@ char const * VLC_Changeset ( void ); ...@@ -215,7 +224,7 @@ char const * VLC_Changeset ( void );
* \param i_err an error code * \param i_err an error code
* \return an error string * \return an error string
*/ */
char const * VLC_Error ( int i_err ); VLC_PUBLIC_API char const * VLC_Error ( int i_err );
#endif /* __LIBVLC__ */ #endif /* __LIBVLC__ */
...@@ -227,7 +236,7 @@ char const * VLC_Error ( int i_err ); ...@@ -227,7 +236,7 @@ char const * VLC_Error ( int i_err );
* *
* \return vlc object id or an error code * \return vlc object id or an error code
*/ */
int VLC_Create( void ); VLC_PUBLIC_API int VLC_Create( void );
/** /**
* Initialize a vlc_t structure * Initialize a vlc_t structure
...@@ -243,7 +252,7 @@ int VLC_Create( void ); ...@@ -243,7 +252,7 @@ int VLC_Create( void );
* \param ppsz_argv an array of arguments * \param ppsz_argv an array of arguments
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Init( int, int, char *[] ); VLC_PUBLIC_API int VLC_Init( int, int, char *[] );
/** /**
* Add an interface * Add an interface
...@@ -259,7 +268,7 @@ int VLC_Init( int, int, char *[] ); ...@@ -259,7 +268,7 @@ int VLC_Init( int, int, char *[] );
* \param b_play start playing when the interface is done loading * \param b_play start playing when the interface is done loading
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t ); VLC_PUBLIC_API int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
/** /**
* Ask vlc to die * Ask vlc to die
...@@ -270,7 +279,7 @@ int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t ); ...@@ -270,7 +279,7 @@ int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Die( int ); VLC_PUBLIC_API int VLC_Die( int );
/** /**
* Clean up all the intf, playlist, vout and aout * Clean up all the intf, playlist, vout and aout
...@@ -283,7 +292,7 @@ int VLC_Die( int ); ...@@ -283,7 +292,7 @@ int VLC_Die( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_CleanUp( int ); VLC_PUBLIC_API int VLC_CleanUp( int );
/** /**
* Destroy all threads and the VLC object * Destroy all threads and the VLC object
...@@ -295,7 +304,7 @@ int VLC_CleanUp( int ); ...@@ -295,7 +304,7 @@ int VLC_CleanUp( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Destroy( int ); VLC_PUBLIC_API int VLC_Destroy( int );
/** /**
* Set a VLC variable * Set a VLC variable
...@@ -309,7 +318,7 @@ int VLC_Destroy( int ); ...@@ -309,7 +318,7 @@ int VLC_Destroy( int );
* \param value a vlc_value_t structure * \param value a vlc_value_t structure
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_VariableSet( int, char const *, vlc_value_t ); VLC_PUBLIC_API int VLC_VariableSet( int, char const *, vlc_value_t );
/** /**
* Get a VLC variable * Get a VLC variable
...@@ -324,7 +333,7 @@ int VLC_VariableSet( int, char const *, vlc_value_t ); ...@@ -324,7 +333,7 @@ int VLC_VariableSet( int, char const *, vlc_value_t );
* \param p_value a pointer to a vlc_value_t structure * \param p_value a pointer to a vlc_value_t structure
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_VariableGet( int, char const *, vlc_value_t * ); VLC_PUBLIC_API int VLC_VariableGet( int, char const *, vlc_value_t * );
/** /**
* Get a VLC variable type * Get a VLC variable type
...@@ -337,7 +346,7 @@ int VLC_VariableGet( int, char const *, vlc_value_t * ); ...@@ -337,7 +346,7 @@ int VLC_VariableGet( int, char const *, vlc_value_t * );
* \param pi_type a pointer to an integer * \param pi_type a pointer to an integer
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_VariableType( int, char const *, int * ); VLC_PUBLIC_API int VLC_VariableType( int, char const *, int * );
/** /**
* Add a target to the current playlist * Add a target to the current playlist
...@@ -353,7 +362,7 @@ int VLC_VariableType( int, char const *, int * ); ...@@ -353,7 +362,7 @@ int VLC_VariableType( int, char const *, int * );
* \param i_pos the position at which to add the new target (PLAYLIST_END for end) * \param i_pos the position at which to add the new target (PLAYLIST_END for end)
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_AddTarget( int, char const *, const char **, int, int, int ); VLC_PUBLIC_API int VLC_AddTarget( int, char const *, const char **, int, int, int );
/** /**
* Start the playlist and play the currently selected playlist item * Start the playlist and play the currently selected playlist item
...@@ -365,7 +374,7 @@ int VLC_AddTarget( int, char const *, const char **, int, int, int ); ...@@ -365,7 +374,7 @@ int VLC_AddTarget( int, char const *, const char **, int, int, int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Play( int ); VLC_PUBLIC_API int VLC_Play( int );
/** /**
* Pause the currently playing item. Resume it if already paused * Pause the currently playing item. Resume it if already paused
...@@ -376,7 +385,7 @@ int VLC_Play( int ); ...@@ -376,7 +385,7 @@ int VLC_Play( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Pause( int ); VLC_PUBLIC_API int VLC_Pause( int );
/** /**
* Stop the playlist * Stop the playlist
...@@ -389,7 +398,7 @@ int VLC_Pause( int ); ...@@ -389,7 +398,7 @@ int VLC_Pause( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_Stop( int ); VLC_PUBLIC_API int VLC_Stop( int );
/** /**
* Tell if VLC is playing * Tell if VLC is playing
...@@ -400,7 +409,7 @@ int VLC_Stop( int ); ...@@ -400,7 +409,7 @@ int VLC_Stop( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_TRUE or VLC_FALSE * \return VLC_TRUE or VLC_FALSE
*/ */
vlc_bool_t VLC_IsPlaying( int ); VLC_PUBLIC_API vlc_bool_t VLC_IsPlaying( int );
/** /**
* Get the current position in a input * Get the current position in a input
...@@ -412,7 +421,7 @@ vlc_bool_t VLC_IsPlaying( int ); ...@@ -412,7 +421,7 @@ vlc_bool_t VLC_IsPlaying( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return a float in the range of 0.0 - 1.0 * \return a float in the range of 0.0 - 1.0
*/ */
float VLC_PositionGet( int ); VLC_PUBLIC_API float VLC_PositionGet( int );
/** /**
* Set the current position in a input * Set the current position in a input
...@@ -425,7 +434,7 @@ float VLC_PositionGet( int ); ...@@ -425,7 +434,7 @@ float VLC_PositionGet( int );
* \param i_position a float in the range of 0.0 - 1.0 * \param i_position a float in the range of 0.0 - 1.0
* \return a float in the range of 0.0 - 1.0 * \return a float in the range of 0.0 - 1.0
*/ */
float VLC_PositionSet( int, float ); VLC_PUBLIC_API float VLC_PositionSet( int, float );
/** /**
* Get the current position in a input * Get the current position in a input
...@@ -436,7 +445,7 @@ float VLC_PositionSet( int, float ); ...@@ -436,7 +445,7 @@ float VLC_PositionSet( int, float );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the offset from 0:00 in seconds * \return the offset from 0:00 in seconds
*/ */
int VLC_TimeGet( int ); VLC_PUBLIC_API int VLC_TimeGet( int );
/** /**
* Seek to a position in the current input * Seek to a position in the current input
...@@ -451,7 +460,7 @@ int VLC_TimeGet( int ); ...@@ -451,7 +460,7 @@ int VLC_TimeGet( int );
* \param b_relative seek relative from current position * \param b_relative seek relative from current position
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_TimeSet( int, int, vlc_bool_t ); VLC_PUBLIC_API int VLC_TimeSet( int, int, vlc_bool_t );
/** /**
* Get the total length of a input * Get the total length of a input
...@@ -462,7 +471,7 @@ int VLC_TimeSet( int, int, vlc_bool_t ); ...@@ -462,7 +471,7 @@ int VLC_TimeSet( int, int, vlc_bool_t );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the length in seconds * \return the length in seconds
*/ */
int VLC_LengthGet( int ); VLC_PUBLIC_API int VLC_LengthGet( int );
/** /**
* Play the input faster than realtime * Play the input faster than realtime
...@@ -473,7 +482,7 @@ int VLC_LengthGet( int ); ...@@ -473,7 +482,7 @@ int VLC_LengthGet( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the current speedrate * \return the current speedrate
*/ */
float VLC_SpeedFaster( int ); VLC_PUBLIC_API float VLC_SpeedFaster( int );
/** /**
* Play the input slower than realtime * Play the input slower than realtime
...@@ -484,7 +493,7 @@ float VLC_SpeedFaster( int ); ...@@ -484,7 +493,7 @@ float VLC_SpeedFaster( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the current speedrate * \return the current speedrate
*/ */
float VLC_SpeedSlower( int ); VLC_PUBLIC_API float VLC_SpeedSlower( int );
/** /**
* Return the current playlist item * Return the current playlist item
...@@ -492,7 +501,7 @@ float VLC_SpeedSlower( int ); ...@@ -492,7 +501,7 @@ float VLC_SpeedSlower( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the index of the playlistitem that is currently selected for play * \return the index of the playlistitem that is currently selected for play
*/ */
int VLC_PlaylistIndex( int ); VLC_PUBLIC_API int VLC_PlaylistIndex( int );
/** /**
* Total amount of items in the playlist * Total amount of items in the playlist
...@@ -500,7 +509,7 @@ int VLC_PlaylistIndex( int ); ...@@ -500,7 +509,7 @@ int VLC_PlaylistIndex( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return amount of playlist items * \return amount of playlist items
*/ */
int VLC_PlaylistNumberOfItems( int ); VLC_PUBLIC_API int VLC_PlaylistNumberOfItems( int );
/** /**
* Next playlist item * Next playlist item
...@@ -510,7 +519,7 @@ int VLC_PlaylistNumberOfItems( int ); ...@@ -510,7 +519,7 @@ int VLC_PlaylistNumberOfItems( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_PlaylistNext( int ); VLC_PUBLIC_API int VLC_PlaylistNext( int );
/** /**
* Previous playlist item * Previous playlist item
...@@ -520,7 +529,7 @@ int VLC_PlaylistNext( int ); ...@@ -520,7 +529,7 @@ int VLC_PlaylistNext( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_PlaylistPrev( int ); VLC_PUBLIC_API int VLC_PlaylistPrev( int );
/** /**
* Clear the contents of the playlist * Clear the contents of the playlist
...@@ -532,7 +541,7 @@ int VLC_PlaylistPrev( int ); ...@@ -532,7 +541,7 @@ int VLC_PlaylistPrev( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_PlaylistClear( int ); VLC_PUBLIC_API int VLC_PlaylistClear( int );
/** /**
* Change the volume * Change the volume
...@@ -541,7 +550,7 @@ int VLC_PlaylistClear( int ); ...@@ -541,7 +550,7 @@ int VLC_PlaylistClear( int );
* \param i_volume something in a range from 0-200 * \param i_volume something in a range from 0-200
* \return the new volume (range 0-200 %) * \return the new volume (range 0-200 %)
*/ */
int VLC_VolumeSet( int, int ); VLC_PUBLIC_API int VLC_VolumeSet( int, int );
/** /**
* Get the current volume * Get the current volume
...@@ -551,7 +560,7 @@ int VLC_VolumeSet( int, int ); ...@@ -551,7 +560,7 @@ int VLC_VolumeSet( int, int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return the current volume (range 0-200 %) * \return the current volume (range 0-200 %)
*/ */
int VLC_VolumeGet( int ); VLC_PUBLIC_API int VLC_VolumeGet( int );
/** /**
* Mute/Unmute the volume * Mute/Unmute the volume
...@@ -559,7 +568,7 @@ int VLC_VolumeGet( int ); ...@@ -559,7 +568,7 @@ int VLC_VolumeGet( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_VolumeMute( int ); VLC_PUBLIC_API int VLC_VolumeMute( int );
/** /**
* Toggle Fullscreen mode * Toggle Fullscreen mode
...@@ -569,7 +578,7 @@ int VLC_VolumeMute( int ); ...@@ -569,7 +578,7 @@ int VLC_VolumeMute( int );
* \param i_object a vlc object id * \param i_object a vlc object id
* \return VLC_SUCCESS on success * \return VLC_SUCCESS on success
*/ */
int VLC_FullScreen( int ); VLC_PUBLIC_API int VLC_FullScreen( int );
# ifdef __cplusplus # ifdef __cplusplus
......
...@@ -472,17 +472,27 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -472,17 +472,27 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#include "vlc_modules_macros.h" #include "vlc_modules_macros.h"
#if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC) #if defined (WIN32) && defined (DLL_EXPORT)
# ifdef __cplusplus
# define VLC_EXPORT( type, name, args ) extern "C" __declspec(dllexport) type name args
# define VLC_INTERNAL( type, name, args ) extern "C" type name args
# else
# define VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args
# define VLC_INTERNAL( type, name, args ) type name args
# endif
#else
# if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC)
# ifdef __cplusplus # ifdef __cplusplus
# define VLC_EXPORT( type, name, args ) extern "C" type name args # define VLC_EXPORT( type, name, args ) extern "C" type name args
# else # else
# define VLC_EXPORT( type, name, args ) type name args # define VLC_EXPORT( type, name, args ) type name args
# endif # endif
#else # else
# define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_ # define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_
extern module_symbols_t* p_symbols; extern module_symbols_t* p_symbols;
# endif
# define VLC_INTERNAL( type, name, args ) VLC_EXPORT (type, name, args)
#endif #endif
#define VLC_INTERNAL( type, name, args ) VLC_EXPORT (type, name, args)
/***************************************************************************** /*****************************************************************************
* OS-specific headers and thread types * OS-specific headers and thread types
...@@ -987,7 +997,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) ...@@ -987,7 +997,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
# include <dirent.h> # include <dirent.h>
VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) ); VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) );
VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) ); VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) );
VLC_INTERNAL( int, vlc_wclosedir, ( void * ) ); VLC_EXPORT( int, vlc_wclosedir, ( void * ) );
VLC_INTERNAL( void, vlc_rewinddir, ( void * ) ); VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) ); VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
VLC_INTERNAL( long, vlc_telldir, ( void * ) ); VLC_INTERNAL( long, vlc_telldir, ( void * ) );
......
###############################################################################
# Automake targets and declarations # Automake targets and declarations
############################################################################### ###############################################################################
...@@ -156,8 +156,8 @@ endif ...@@ -156,8 +156,8 @@ endif
if HAVE_WIN32 if HAVE_WIN32
DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a
libvlc.dll.a: libvlc$(LIBEXT) libvlc.dll.a libvlc.def: libvlc$(LIBEXT)
$(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS) $(DLLTOOL) -z libvlc.def -l libvlc.dll.a -D $< $(libvlc_a_OBJECTS)
libvlc$(LIBEXT): $(libvlc_a_OBJECTS) libvlc$(LIBEXT): $(libvlc_a_OBJECTS)
@ldfl="`$(VLC_CONFIG) --libs plugin libvlc pic` $(INCLUDED_LIBINTL)" ; \ @ldfl="`$(VLC_CONFIG) --libs plugin libvlc pic` $(INCLUDED_LIBINTL)" ; \
......
...@@ -75,7 +75,9 @@ int main( int i_argc, char *ppsz_argv[] ) ...@@ -75,7 +75,9 @@ int main( int i_argc, char *ppsz_argv[] )
} }
#endif #endif
#if defined (HAVE_GETEUID) && !defined (SYS_BEOS)
rootwrap (); rootwrap ();
#endif
/* Create a libvlc structure */ /* Create a libvlc structure */
i_ret = VLC_Create(); i_ret = VLC_Create();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment