Changeset cd5ed364efe9cdf752c48e0fa158ff680964ceeb

Show
Ignore:
Timestamp:
03/02/07 23:01:20 (2 years ago)
Author:
Damien Fouilleul <damienf@videolan.org>
git-committer:
Damien Fouilleul <damienf@videolan.org> 1170540080 +0000
git-parent:

[d20a2464f3ffdbbbda0f66bae7bfbf358964deb9]

git-author:
Damien Fouilleul <damienf@videolan.org> 1170540080 +0000
Message:

- 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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    rebf11a9 rcd5ed36  
    56035603  FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" 
    56045604  VLC_ADD_PLUGINS([${BUILTINS}]) 
     5605  VLC_ADD_CPPFLAGS([libvlc],[-DDLL_EXPORT]) 
    56055606  BUILTINS="" 
    56065607], [ 
  • include/vlc/libvlc.h

    ra2d6f90 rcd5ed36  
    6262 * \param p_exception the exception to initialize 
    6363 */ 
    64 void libvlc_exception_init( libvlc_exception_t *p_exception ); 
     64VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception ); 
    6565 
    6666/** 
     
    6969 * \return 0 if no exception raised, 1 else 
    7070 */ 
    71 int libvlc_exception_raised( libvlc_exception_t *p_exception ); 
     71VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception ); 
    7272 
    7373/** 
     
    7676 * \param psz_message the exception message 
    7777 */ 
    78 void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... ); 
     78VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... ); 
    7979 
    8080/** 
     
    8383 * \param p_exception the exception to clear 
    8484 */ 
    85 void libvlc_exception_clear( libvlc_exception_t * ); 
     85VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * ); 
    8686 
    8787/** 
     
    9191 * for example) 
    9292 */ 
    93 char* libvlc_exception_get_message( libvlc_exception_t *p_exception ); 
     93VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception ); 
    9494 
    9595/**@} */ 
     
    114114 * \param exception an initialized exception pointer 
    115115 */ 
    116 libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *); 
     116VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *); 
    117117 
    118118/** 
     
    122122 * \param p_instance the instance 
    123123 */ 
    124 int libvlc_get_vlc_id( libvlc_instance_t *p_instance ); 
     124VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance ); 
    125125 
    126126/** 
     
    128128 * \param p_instance the instance to destroy 
    129129 */ 
    130 void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * ); 
     130VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * ); 
    131131 
    132132/** @}*/ 
     
    144144 * Set loop variable 
    145145 */ 
    146 void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, 
    147                            libvlc_exception_t * ); 
     146VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, 
     147                                          libvlc_exception_t * ); 
    148148 
    149149/** 
     
    157157 * \param p_exception an initialized exception 
    158158 */ 
    159 void libvlc_playlist_play( libvlc_instance_t*, int, int, char **, 
    160                            libvlc_exception_t * ); 
     159VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **, 
     160                                          libvlc_exception_t * ); 
    161161 
    162162/** 
     
    165165 * \param p_exception an initialized exception 
    166166 */ 
    167 void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * ); 
     167VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * ); 
    168168 
    169169/** 
     
    173173 * \return 0 if the playlist is stopped or paused, 1 if it is running 
    174174 */ 
    175 int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * ); 
     175VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * ); 
    176176 
    177177/** 
     
    181181 * \return the number of items 
    182182 */ 
    183 int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * ); 
     183VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * ); 
    184184 
    185185/** 
     
    188188 * \param p_exception an initialized exception 
    189189 */ 
    190 void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * ); 
     190VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * ); 
    191191 
    192192/** 
     
    195195 * \param p_exception an initialized exception 
    196196 */ 
    197 void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * ); 
     197VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * ); 
    198198 
    199199/** 
     
    202202 * \param p_exception an initialized exception 
    203203 */ 
    204 void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * ); 
     204VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * ); 
    205205 
    206206/** 
     
    209209 * \param p_exception an initialized exception 
    210210 */ 
    211 void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * ); 
     211VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * ); 
    212212 
    213213/** 
     
    219219 * \return the identifier of the new item 
    220220 */ 
    221 int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *, 
    222                          libvlc_exception_t * ); 
     221VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *, 
     222                                        libvlc_exception_t * ); 
    223223 
    224224/** 
     
    232232 * \return the identifier of the new item 
    233233 */ 
    234 int libvlc_playlist_add_extended( libvlc_instance_t *, const char *, 
    235                                   const char *, int, const char **, 
    236                                   libvlc_exception_t * ); 
     234VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *, 
     235                                                 const char *, int, const char **, 
     236                                                 libvlc_exception_t * ); 
    237237 
    238238/** 
     
    243243 * \return 
    244244 */ 
    245 int libvlc_playlist_delete_item( libvlc_instance_t *, int, 
    246                                  libvlc_exception_t * ); 
     245VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int, 
     246                                                libvlc_exception_t * ); 
    247247 
    248248typedef struct libvlc_input_t libvlc_input_t; 
     
    253253 * \return an input object 
    254254 */ 
    255 libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *, 
    256                                            libvlc_exception_t * ); 
     255VLC_PUBLIC_API libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *, 
     256                                                          libvlc_exception_t * ); 
    257257 
    258258/** @}*/ 
     
    270270 * \param p_input the input to free 
    271271 */ 
    272 void libvlc_input_free( libvlc_input_t * ); 
     272VLC_PUBLIC_API void libvlc_input_free( libvlc_input_t * ); 
    273273 
    274274/// \bug This might go away ... to be replaced by a broader system 
    275 vlc_int64_t libvlc_input_get_length     ( libvlc_input_t *, libvlc_exception_t *); 
    276 vlc_int64_t libvlc_input_get_time       ( libvlc_input_t *, libvlc_exception_t *); 
    277 void        libvlc_input_set_time       ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *); 
    278 float       libvlc_input_get_position   ( libvlc_input_t *, libvlc_exception_t *); 
    279 void        libvlc_input_set_position   ( libvlc_input_t *, float, libvlc_exception_t *); 
    280 vlc_bool_t  libvlc_input_will_play      ( libvlc_input_t *, libvlc_exception_t *); 
    281 float       libvlc_input_get_rate       ( libvlc_input_t *, libvlc_exception_t *); 
    282 void        libvlc_input_set_rate       ( libvlc_input_t *, float, libvlc_exception_t *); 
    283 int         libvlc_input_get_state      ( libvlc_input_t *, libvlc_exception_t *); 
     275VLC_PUBLIC_API vlc_int64_t libvlc_input_get_length     ( libvlc_input_t *, libvlc_exception_t *); 
     276VLC_PUBLIC_API vlc_int64_t libvlc_input_get_time       ( libvlc_input_t *, libvlc_exception_t *); 
     277VLC_PUBLIC_API void        libvlc_input_set_time       ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *); 
     278VLC_PUBLIC_API float       libvlc_input_get_position   ( libvlc_input_t *, libvlc_exception_t *); 
     279VLC_PUBLIC_API void        libvlc_input_set_position   ( libvlc_input_t *, float, libvlc_exception_t *); 
     280VLC_PUBLIC_API vlc_bool_t  libvlc_input_will_play      ( libvlc_input_t *, libvlc_exception_t *); 
     281VLC_PUBLIC_API float       libvlc_input_get_rate       ( libvlc_input_t *, libvlc_exception_t *); 
     282VLC_PUBLIC_API void        libvlc_input_set_rate       ( libvlc_input_t *, float, libvlc_exception_t *); 
     283VLC_PUBLIC_API int         libvlc_input_get_state      ( libvlc_input_t *, libvlc_exception_t *); 
    284284 
    285285/** @} */ 
     
    314314 * \param p_exception an initialized exception 
    315315 */ 
    316 vlc_bool_t  libvlc_input_has_vout       ( libvlc_input_t *, libvlc_exception_t *); 
    317 float       libvlc_input_get_fps        ( libvlc_input_t *, libvlc_exception_t *); 
     316VLC_PUBLIC_API vlc_bool_t  libvlc_input_has_vout( libvlc_input_t *, libvlc_exception_t *); 
     317VLC_PUBLIC_API float       libvlc_input_get_fps( libvlc_input_t *, libvlc_exception_t *); 
    318318 
    319319/** 
     
    322322 * \param p_exception an initialized exception 
    323323 */ 
    324 void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
     324VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
    325325 
    326326/** 
     
    330330 * \param p_exception an initialized exception 
    331331 */ 
    332 void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); 
     332VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * ); 
    333333 
    334334/** 
     
    338338 * \return the fullscreen status (boolean) 
    339339 */ 
    340 int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
     340VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * ); 
    341341 
    342342/** 
     
    346346 * \return the video height 
    347347 */ 
    348 int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * ); 
     348VLC_PUBLIC_API int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * ); 
    349349 
    350350/** 
     
    354354 * \return the video width 
    355355 */ 
    356 int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * ); 
     356VLC_PUBLIC_API int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * ); 
    357357 
    358358/** 
     
    362362 * \return the video aspect ratio 
    363363 */ 
    364 char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * ); 
     364VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * ); 
    365365 
    366366/** 
     
    370370 * \param p_exception an initialized exception 
    371371 */ 
    372 void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * ); 
     372VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * ); 
    373373 
    374374/** 
     
    378378 * \return the crop filter geometry 
    379379 */ 
    380 char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * ); 
     380VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * ); 
    381381 
    382382/** 
     
    386386 * \param p_exception an initialized exception 
    387387 */ 
    388 void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * ); 
     388VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * ); 
    389389 
    390390/** 
     
    394394 * \param p_exception an initialized exception 
    395395 */ 
    396 void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * ); 
    397  
    398 int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *); 
     396VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * ); 
     397 
     398VLC_PUBLIC_API int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *); 
    399399 
    400400/** 
     
    406406 * \return the success status (boolean) 
    407407 */ 
    408 void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *); 
     408VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *); 
    409409 
    410410/** 
     
    415415 * \return the success status (boolean) 
    416416 */ 
    417 int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * ); 
     417VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * ); 
    418418 
    419419/** 
     
    424424 * \param p_exception an initialized exception 
    425425 */ 
    426 void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * ); 
     426VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * ); 
    427427 
    428428/** 
     
    434434 * \param p_exception an initialized exception 
    435435 */ 
    436 void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * ); 
     436VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * ); 
    437437 
    438438/** 
     
    444444 * \param p_exception an initialized exception 
    445445 */ 
    446 void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * ); 
     446VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * ); 
    447447 
    448448 
     
    468468 * \return void 
    469469 */ 
    470 void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * ); 
     470VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * ); 
    471471 
    472472/** 
     
    476476 * \return the mute status (boolean) 
    477477 */ 
    478 vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * ); 
     478VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * ); 
    479479 
    480480/** 
     
    485485 * \return void 
    486486 */ 
    487 void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * ); 
     487VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * ); 
    488488 
    489489/** 
     
    493493 * \return the audio level (int) 
    494494 */ 
    495 int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * ); 
     495VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * ); 
    496496 
    497497/** 
     
    501501 * \param p_exception an initialized exception 
    502502 */ 
    503 void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *); 
     503VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *); 
    504504 
    505505/** 
     
    509509+  * \return the audio track (int) 
    510510+  */ 
    511 int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * ); 
     511VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * ); 
    512512 
    513513/** 
     
    517517 * \param p_exception an initialized exception 
    518518 */ 
    519 void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * ); 
     519VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * ); 
    520520 
    521521/** 
     
    525525 * \return the audio channel (int) 
    526526 */ 
    527 int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * ); 
     527VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * ); 
    528528 
    529529/** 
     
    533533 * \param p_exception an initialized exception 
    534534 */ 
    535 void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * ); 
     535VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * ); 
    536536 
    537537/** @} */ 
     
    550550 * \param p_exception an initialized exception 
    551551 */ 
    552 void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* , 
    553                                int, char **, int, int, libvlc_exception_t * ); 
     552VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* , 
     553                                              int, char **, int, int, libvlc_exception_t * ); 
    554554 
    555555/** 
     
    559559 * \param p_exception an initialized exception 
    560560 */ 
    561 void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
     561VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
    562562 
    563563/** 
     
    568568 * \param p_exception an initialized exception 
    569569 */ 
    570 void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int, 
    571                              libvlc_exception_t *); 
     570VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int, 
     571                                            libvlc_exception_t *); 
    572572 
    573573/** 
     
    578578 * \param p_exception an initialized exception 
    579579 */ 
    580 void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*, 
    581                             libvlc_exception_t *); 
     580VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*, 
     581                                           libvlc_exception_t *); 
    582582 
    583583/** 
     
    589589 * \param p_exception an initialized exception 
    590590 */ 
    591 void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*, 
    592                            libvlc_exception_t *); 
     591VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*, 
     592                                          libvlc_exception_t *); 
    593593 
    594594/** 
     
    599599 * \param p_exception an initialized exception 
    600600 */ 
    601 void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int, 
    602                           libvlc_exception_t *); 
     601VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int, 
     602                                         libvlc_exception_t *); 
    603603 
    604604/** 
     
    615615 * \param p_exception an initialized exception 
    616616 */ 
    617 void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* , 
    618                               int, char **, int, int, libvlc_exception_t * ); 
     617VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* , 
     618                                             int, char **, int, int, libvlc_exception_t * ); 
    619619 
    620620/** 
     
    624624 * \param p_exception an initialized exception 
    625625 */ 
    626 void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); 
     626VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); 
    627627 
    628628/** 
     
    632632 * \param p_exception an initialized exception 
    633633 */  
    634 void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); 
     634VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * ); 
    635635 
    636636/** 
     
    640640 * \param p_exception an initialized exception 
    641641 */  
    642 void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
     642VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
    643643     
    644644/** 
     
    649649 * \param p_exception an initialized exception 
    650650 */  
    651 void libvlc_vlm_seek_media( libvlc_instance_t *, char *, 
    652                             float, libvlc_exception_t * ); 
     651VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *, 
     652                                           float, libvlc_exception_t * ); 
    653653    
    654654/** 
     
    658658 * \param p_exception an initialized exception 
    659659 */  
    660 char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
     660VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * ); 
    661661 
    662662#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\ 
     
    664664                        char *, int , libvlc_exception_t * ); 
    665665 
    666 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1); 
    667 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1); 
    668 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1); 
    669 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1); 
    670 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0); 
    671 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0); 
    672 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0); 
     666VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1); 
     667VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1); 
     668VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1); 
     669VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1); 
     670VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0); 
     671VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0); 
     672VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0); 
    673673 
    674674#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE 
     
    708708 * \param exception an initialized exception pointer 
    709709 */ 
    710 unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance, libvlc_exception_t *p_e ); 
     710VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance, 
     711                                                  libvlc_exception_t *p_e ); 
    711712 
    712713/** 
     
    715716 * \param exception an initialized exception pointer 
    716717 */ 
    717 void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level, libvlc_exception_t *p_e ); 
     718VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level, 
     719                                              libvlc_exception_t *p_e ); 
    718720 
    719721/** 
     
    722724 * \param exception an initialized exception pointer 
    723725 */ 
    724 libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *); 
     726VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *); 
    725727 
    726728/** 
     
    729731 * \param exception an initialized exception pointer 
    730732 */ 
    731 void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *); 
     733VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *); 
    732734 
    733735/** 
     
    736738 * \param exception an initialized exception pointer 
    737739 */ 
    738 unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *); 
     740VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *); 
    739741 
    740742/** 
     
    744746 * \param exception an initialized exception pointer 
    745747 */ 
    746 void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *); 
     748VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *); 
    747749 
    748750/** 
     
    751753 * \param exception an initialized exception pointer 
    752754 */ 
    753 libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *); 
     755VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *); 
    754756 
    755757/** 
     
    758760 * \param exception an initialized exception pointer 
    759761 */ 
    760 void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); 
     762VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); 
    761763 
    762764/** 
     
    765767 * \param exception an initialized exception pointer 
    766768 */ 
    767 int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); 
     769VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e ); 
    768770 
    769771/** 
     
    773775 * \param exception an initialized exception pointer 
    774776 */ 
    775 libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter, 
    776                                                 struct libvlc_log_message_t *buffer, 
    777                                                 libvlc_exception_t *p_e ); 
     777VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter, 
     778                                                               struct libvlc_log_message_t *buffer, 
     779                                                               libvlc_exception_t *p_e ); 
    778780 
    779781/** @} */ 
  • include/vlc/vlc.h

    rb28e412 rcd5ed36  
    157157 
    158158/***************************************************************************** 
     159 * Shared library Export macros 
     160 *****************************************************************************/ 
     161#if defined(WIN32) && defined(DLL_EXPORT) 
     162#  define VLC_PUBLIC_API extern __declspec(dllexport) 
     163#else 
     164#  define VLC_PUBLIC_API extern 
     165#endif 
     166 
     167/***************************************************************************** 
    159168 * Exported libvlc API 
    160169 *****************************************************************************/ 
     
    166175 * \return a string containing the libvlc version 
    167176 */ 
    168 char const * VLC_Version ( void ); 
     177VLC_PUBLIC_API char const * VLC_Version ( void ); 
    169178 
    170179/** 
     
    173182 * \return a string containing the libvlc compile time 
    174183 */ 
    175 char const * VLC_CompileTime ( void ); 
     184VLC_PUBLIC_API char const * VLC_CompileTime ( void ); 
    176185 
    177186/** 
     
    180189 * \return a string containing the username of the libvlc builder 
    181190 */ 
    182 char const * VLC_CompileBy ( void ); 
     191VLC_PUBLIC_API char const * VLC_CompileBy ( void ); 
    183192 
    184193/** 
     
    187196 * \return a string containing the host of the libvlc builder 
    188197 */ 
    189 char const * VLC_CompileHost ( void ); 
     198VLC_PUBLIC_API char const * VLC_CompileHost ( void ); 
    190199 
    191200/** 
     
    194203 * \return a string containing the domain name of the host of the libvlc builder 
    195204 */ 
    196 char const * VLC_CompileDomain ( void ); 
     205VLC_PUBLIC_API char const * VLC_CompileDomain ( void ); 
    197206 
    198207/** 
     
    201210 * \return a string containing the libvlc compiler version 
    202211 */ 
    203 char const * VLC_Compiler ( void ); 
     212VLC_PUBLIC_API char const * VLC_Compiler ( void ); 
    204213 
    205214/** 
     
    208217 * \return a string containing the libvlc subversion changeset 
    209218 */ 
    210 char const * VLC_Changeset ( void ); 
     219VLC_PUBLIC_API char const * VLC_Changeset ( void ); 
    211220 
    212221/** 
     
    216225 * \return an error string 
    217226 */ 
    218 char const * VLC_Error ( int i_err ); 
     227VLC_PUBLIC_API char const * VLC_Error ( int i_err ); 
    219228 
    220229#endif /* __LIBVLC__ */ 
     
    228237 * \return vlc object id or an error code 
    229238 */ 
    230 int     VLC_Create( void ); 
     239VLC_PUBLIC_API int     VLC_Create( void ); 
    231240 
    232241/** 
     
    244253 *  \return VLC_SUCCESS on success 
    245254 */ 
    246 int     VLC_Init( int, int, char *[] ); 
     255VLC_PUBLIC_API int     VLC_Init( int, int, char *[] ); 
    247256 
    248257/** 
     
    260269 * \return VLC_SUCCESS on success 
    261270 */ 
    262 int     VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t ); 
     271VLC_PUBLIC_API int     VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t ); 
    263272 
    264273/** 
     
    271280 * \return VLC_SUCCESS on success 
    272281 */ 
    273 int     VLC_Die( int ); 
     282VLC_PUBLIC_API int     VLC_Die( int ); 
    274283 
    275284/** 
     
    284293 * \return VLC_SUCCESS on success 
    285294 */ 
    286 int     VLC_CleanUp( int ); 
     295VLC_PUBLIC_API int     VLC_CleanUp( int ); 
    287296 
    288297/** 
     
    296305 * \return VLC_SUCCESS on success 
    297306 */ 
    298 int     VLC_Destroy( int ); 
     307VLC_PUBLIC_API int     VLC_Destroy( int ); 
    299308 
    300309/** 
     
    310319 * \return VLC_SUCCESS on success 
    311320 */ 
    312 int     VLC_VariableSet( int, char const *, vlc_value_t ); 
     321VLC_PUBLIC_API int     VLC_VariableSet( int, char const *, vlc_value_t ); 
    313322 
    314323/** 
     
    325334 * \return VLC_SUCCESS on success 
    326335 */ 
    327 int     VLC_VariableGet( int, char const *, vlc_value_t * ); 
     336VLC_PUBLIC_API int     VLC_VariableGet( int, char const *, vlc_value_t * ); 
    328337 
    329338/** 
     
    338347 * \return VLC_SUCCESS on success 
    339348 */ 
    340 int     VLC_VariableType( int, char const *, int * ); 
     349VLC_PUBLIC_API int     VLC_VariableType( int, char const *, int * ); 
    341350 
    342351/** 
     
    354363 * \return VLC_SUCCESS on success 
    355364 */ 
    356 int     VLC_AddTarget( int, char const *, const char **, int, int, int ); 
     365VLC_PUBLIC_API int     VLC_AddTarget( int, char const *, const char **, int, int, int ); 
    357366 
    358367/** 
     
    366375 * \return VLC_SUCCESS on success 
    367376 */ 
    368 int     VLC_Play( int ); 
     377VLC_PUBLIC_API int     VLC_Play( int ); 
    369378 
    370379/** 
     
    377386 * \return VLC_SUCCESS on success 
    378387 */ 
    379 int     VLC_Pause( int ); 
     388VLC_PUBLIC_API int     VLC_Pause( int ); 
    380389 
    381390/** 
     
    390399 * \return VLC_SUCCESS on success 
    391400 */ 
    392 int             VLC_Stop( int ); 
     401VLC_PUBLIC_API int             VLC_Stop( int ); 
    393402 
    394403/** 
     
    401410 * \return VLC_TRUE or VLC_FALSE 
    402411 */ 
    403 vlc_bool_t      VLC_IsPlaying( int ); 
     412VLC_PUBLIC_API vlc_bool_t      VLC_IsPlaying( int ); 
    404413 
    405414/** 
     
    413422 * \return a float in the range of 0.0 - 1.0 
    414423 */ 
    415 float           VLC_PositionGet( int ); 
     424VLC_PUBLIC_API float           VLC_PositionGet( int ); 
    416425 
    417426/** 
     
    426435 * \return a float in the range of 0.0 - 1.0 
    427436 */ 
    428 float           VLC_PositionSet( int, float ); 
     437VLC_PUBLIC_API float           VLC_PositionSet( int, float ); 
    429438 
    430439/** 
     
    437446 * \return the offset from 0:00 in seconds 
    438447 */ 
    439 int             VLC_TimeGet( int ); 
     448VLC_PUBLIC_API int             VLC_TimeGet( int ); 
    440449 
    441450/** 
     
    452461 * \return VLC_SUCCESS on success 
    453462 */ 
    454 int             VLC_TimeSet( int, int, vlc_bool_t ); 
     463VLC_PUBLIC_API int             VLC_TimeSet( int, int, vlc_bool_t ); 
    455464 
    456465/** 
     
    463472 * \return the length in seconds 
    464473 */ 
    465 int             VLC_LengthGet( int ); 
     474VLC_PUBLIC_API int             VLC_LengthGet( int ); 
    466475 
    467476/** 
     
    474483 * \return the current speedrate 
    475484 */ 
    476 float           VLC_SpeedFaster( int ); 
     485VLC_PUBLIC_API float           VLC_SpeedFaster( int ); 
    477486 
    478487/** 
     
    485494 * \return the current speedrate 
    486495 */ 
    487 float           VLC_SpeedSlower( int ); 
     496VLC_PUBLIC_API float           VLC_SpeedSlower( int ); 
    488497 
    489498/** 
     
    493502 * \return the index of the playlistitem that is currently selected for play 
    494503 */ 
    495 int             VLC_PlaylistIndex( int ); 
     504VLC_PUBLIC_API int             VLC_PlaylistIndex( int ); 
    496505 
    497506/** 
     
    501510 * \return amount of playlist items 
    502511 */ 
    503 int             VLC_PlaylistNumberOfItems( int ); 
     512VLC_PUBLIC_API int             VLC_PlaylistNumberOfItems( int ); 
    504513 
    505514/** 
     
    511520 * \return VLC_SUCCESS on success 
    512521 */ 
    513 int             VLC_PlaylistNext( int ); 
     522VLC_PUBLIC_API int             VLC_PlaylistNext( int ); 
    514523 
    515524/** 
     
    521530 * \return VLC_SUCCESS on success 
    522531 */ 
    523 int             VLC_PlaylistPrev( int ); 
     532VLC_PUBLIC_API int             VLC_PlaylistPrev( int ); 
    524533 
    525534/** 
     
    533542 * \return VLC_SUCCESS on success 
    534543 */ 
    535 int             VLC_PlaylistClear( int ); 
     544VLC_PUBLIC_API int             VLC_PlaylistClear( int ); 
    536545 
    537546/** 
     
    542551 * \return the new volume (range 0-200 %) 
    543552 */ 
    544 int             VLC_VolumeSet( int, int ); 
     553VLC_PUBLIC_API int             VLC_VolumeSet( int, int ); 
    545554 
    546555/** 
     
    552561 * \return the current volume (range 0-200 %) 
    553562 */ 
    554 int             VLC_VolumeGet( int ); 
     563VLC_PUBLIC_API int             VLC_VolumeGet( int ); 
    555564 
    556565/** 
     
    560569 * \return VLC_SUCCESS on success 
    561570 */ 
    562 int            VLC_VolumeMute( int ); 
     571VLC_PUBLIC_API int            VLC_VolumeMute( int ); 
    563572 
    564573/** 
     
    570579 * \return VLC_SUCCESS on success 
    571580 */ 
    572 int             VLC_FullScreen( int ); 
     581VLC_PUBLIC_API int             VLC_FullScreen( int ); 
    573582 
    574583 
  • include/vlc_common.h

    r1360a81 rcd5ed36  
    473473#include "vlc_modules_macros.h" 
    474474 
    475 #if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC) 
     475#if defined (WIN32) && defined (DLL_EXPORT) 
     476#  ifdef __cplusplus 
     477#    define VLC_EXPORT( type, name, args ) extern "C" __declspec(dllexport) type name args 
     478#    define VLC_INTERNAL( type, name, args ) extern "C" type name args 
     479#  else 
     480#    define VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args 
     481#    define VLC_INTERNAL( type, name, args ) type name args 
     482#  endif 
     483#else 
     484#  if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC) 
    476485#   ifdef __cplusplus 
    477486#      define VLC_EXPORT( type, name, args ) extern "C" type name args 
     
    479488#      define VLC_EXPORT( type, name, args ) type name args 
    480489#   endif 
    481 #else 
     490#  else 
    482491#   define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_ 
    483492    extern module_symbols_t* p_symbols; 
    484 #endif 
    485 #define VLC_INTERNAL( type, name, args ) VLC_EXPORT (type, name, args) 
     493#  endif 
     494#  define VLC_INTERNAL( type, name, args ) VLC_EXPORT (type, name, args) 
     495#endif 
    486496 
    487497/***************************************************************************** 
     
    988998VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) ); 
    989999VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) ); 
    990 VLC_INTERNAL( int, vlc_wclosedir, ( void * ) ); 
     1000VLC_EXPORT( int, vlc_wclosedir, ( void * ) ); 
    9911001VLC_INTERNAL( void, vlc_rewinddir, ( void * ) ); 
    9921002VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) ); 
  • src/Makefile.am

    r9d52c6b rcd5ed36  
    1 ############################################################################### 
     1 
    22# Automake targets and declarations 
    33############################################################################### 
     
    157157DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a 
    158158 
    159 libvlc.dll.a: libvlc$(LIBEXT) 
    160     $(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS) 
     159libvlc.dll.a libvlc.def: libvlc$(LIBEXT) 
     160    $(DLLTOOL) -z libvlc.def -l libvlc.dll.a -D $< $(libvlc_a_OBJECTS) 
    161161 
    162162libvlc$(LIBEXT): $(libvlc_a_OBJECTS) 
  • src/vlc.c

    rd5a9c50 rcd5ed36  
    7676#endif 
    7777 
    78     rootwrap (); 
    79      
     78#if defined (HAVE_GETEUID) && !defined (SYS_BEOS) 
     79     rootwrap (); 
     80#endif 
     81 
    8082    /* Create a libvlc structure */ 
    8183    i_ret = VLC_Create();