Commit 6f258887 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Replace VLC_EXPORT macro with a simple prefix, VLC_API

This should help Doxygen parse VLC headers, and generally makes headers
easier to read. LibVLC already uses a similar approach.
parent 9a46b63e
......@@ -151,7 +151,7 @@ static inline void access_InitFields( access_t *p_a )
* This function will return the parent input of this access.
* It is retained. It can return NULL.
*/
VLC_EXPORT( input_thread_t *, access_GetParentInput, ( access_t *p_access ) LIBVLC_USED );
VLC_API input_thread_t * access_GetParentInput( access_t *p_access ) LIBVLC_USED;
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
p_access->pf_read = read; \
......
......@@ -26,15 +26,15 @@
# define VLC_ACL_H
VLC_EXPORT( int, ACL_Check, ( vlc_acl_t *p_acl, const char *psz_ip ) );
VLC_EXPORT( vlc_acl_t *, ACL_Create, ( vlc_object_t *p_this, bool b_allow ) LIBVLC_USED LIBVLC_MALLOC );
VLC_API int ACL_Check( vlc_acl_t *p_acl, const char *psz_ip );
VLC_API vlc_acl_t * ACL_Create( vlc_object_t *p_this, bool b_allow ) LIBVLC_USED LIBVLC_MALLOC;
#define ACL_Create(a, b) ACL_Create(VLC_OBJECT(a), b)
VLC_EXPORT( vlc_acl_t *, ACL_Duplicate, ( vlc_object_t *p_this, const vlc_acl_t *p_acl ) LIBVLC_USED LIBVLC_MALLOC );
VLC_API vlc_acl_t * ACL_Duplicate( vlc_object_t *p_this, const vlc_acl_t *p_acl ) LIBVLC_USED LIBVLC_MALLOC;
#define ACL_Duplicate(a,b) ACL_Duplicate(VLC_OBJECT(a),b)
VLC_EXPORT( void, ACL_Destroy, ( vlc_acl_t *p_acl ) );
VLC_API void ACL_Destroy( vlc_acl_t *p_acl );
#define ACL_AddHost(a,b,c) ACL_AddNet(a,b,-1,c)
VLC_EXPORT( int, ACL_AddNet, ( vlc_acl_t *p_acl, const char *psz_ip, int i_len, bool b_allow ) );
VLC_EXPORT( int, ACL_LoadFile, ( vlc_acl_t *p_acl, const char *path ) );
VLC_API int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len, bool b_allow );
VLC_API int ACL_LoadFile( vlc_acl_t *p_acl, const char *path );
#endif
......@@ -256,7 +256,7 @@ static const uint32_t pi_vlc_chan_order_wg4[] =
* Prototypes
*****************************************************************************/
VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, bool ) LIBVLC_USED );
VLC_API aout_buffer_t * aout_OutputNextBuffer( aout_instance_t *, mtime_t, bool ) LIBVLC_USED;
/**
* This function computes the reordering needed to go from pi_chan_order_in to
......@@ -264,8 +264,8 @@ VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t
* If pi_chan_order_in or pi_chan_order_out is NULL, it will assume that vlc
* internal (WG4) order is requested.
*/
VLC_EXPORT( int, aout_CheckChannelReorder, ( const uint32_t *pi_chan_order_in, const uint32_t *pi_chan_order_out, uint32_t i_channel_mask, int i_channels, int *pi_chan_table ) );
VLC_EXPORT( void, aout_ChannelReorder, ( uint8_t *, int, int, const int *, int ) );
VLC_API int aout_CheckChannelReorder( const uint32_t *pi_chan_order_in, const uint32_t *pi_chan_order_out, uint32_t i_channel_mask, int i_channels, int *pi_chan_table );
VLC_API void aout_ChannelReorder( uint8_t *, int, int, const int *, int );
/**
* This fonction will compute the extraction parameter into pi_selection to go
......@@ -283,7 +283,7 @@ VLC_EXPORT( void, aout_ChannelReorder, ( uint8_t *, int, int, const int *, int )
* by VLC. In this case the channel type pi_order_src[] must be set to 0.
* XXX It must also be used if multiple channels have the same type.
*/
VLC_EXPORT( bool, aout_CheckChannelExtraction, ( int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[AOUT_CHAN_MAX], const uint32_t *pi_order_src, int i_channels ) );
VLC_API bool aout_CheckChannelExtraction( int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[AOUT_CHAN_MAX], const uint32_t *pi_order_src, int i_channels );
/**
* Do the actual channels extraction using the parameters created by
......@@ -292,7 +292,7 @@ VLC_EXPORT( bool, aout_CheckChannelExtraction, ( int *pi_selection, uint32_t *pi
* XXX this function does not work in place (p_dst and p_src must not overlap).
* XXX Only 8, 16, 24, 32, 64 bits per sample are supported.
*/
VLC_EXPORT( void, aout_ChannelExtract, ( void *p_dst, int i_dst_channels, const void *p_src, int i_src_channels, int i_sample_count, const int *pi_selection, int i_bits_per_sample ) );
VLC_API void aout_ChannelExtract( void *p_dst, int i_dst_channels, const void *p_src, int i_src_channels, int i_sample_count, const int *pi_selection, int i_bits_per_sample );
/* */
static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
......@@ -300,37 +300,37 @@ static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
return popcount(fmt->i_physical_channels & AOUT_CHAN_PHYSMASK);
}
VLC_EXPORT( unsigned int, aout_BitsPerSample, ( vlc_fourcc_t i_format ) LIBVLC_USED );
VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) );
VLC_EXPORT( const char *, aout_FormatPrintChannels, ( const audio_sample_format_t * ) LIBVLC_USED );
VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) LIBVLC_USED;
VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format );
VLC_API void aout_FormatPrint( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format );
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) LIBVLC_USED;
VLC_EXPORT( mtime_t, aout_FifoFirstDate, ( aout_instance_t *, aout_fifo_t * ) LIBVLC_USED );
VLC_EXPORT( aout_buffer_t *, aout_FifoPop, ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) LIBVLC_USED );
VLC_API mtime_t aout_FifoFirstDate( aout_instance_t *, aout_fifo_t * ) LIBVLC_USED;
VLC_API aout_buffer_t * aout_FifoPop( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) LIBVLC_USED;
/* From intf.c : */
VLC_EXPORT( void, aout_VolumeSoftInit, ( aout_instance_t * ) );
VLC_EXPORT( void, aout_VolumeNoneInit, ( aout_instance_t * ) );
VLC_EXPORT( audio_volume_t, aout_VolumeGet, ( vlc_object_t * ) );
VLC_API void aout_VolumeSoftInit( aout_instance_t * );
VLC_API void aout_VolumeNoneInit( aout_instance_t * );
VLC_API audio_volume_t aout_VolumeGet( vlc_object_t * );
#define aout_VolumeGet(a) aout_VolumeGet(VLC_OBJECT(a))
VLC_EXPORT( int, aout_VolumeSet, ( vlc_object_t *, audio_volume_t ) );
VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t );
#define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b)
VLC_EXPORT( int, aout_VolumeUp, ( vlc_object_t *, int, audio_volume_t * ) );
VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
#define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c)
VLC_EXPORT( int, aout_VolumeDown, ( vlc_object_t *, int, audio_volume_t * ) );
VLC_API int aout_VolumeDown( vlc_object_t *, int, audio_volume_t * );
#define aout_VolumeDown(a, b, c) aout_VolumeDown(VLC_OBJECT(a), b, c)
VLC_EXPORT( int, aout_ToggleMute, ( vlc_object_t *, audio_volume_t * ) );
VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * );
#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
VLC_EXPORT( int, aout_SetMute, ( vlc_object_t *, audio_volume_t *, bool ) );
VLC_EXPORT( bool, aout_IsMuted, ( vlc_object_t * ) );
VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
VLC_API bool aout_IsMuted( vlc_object_t * );
VLC_API int aout_ChannelsRestart( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * );
VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, bool ));
VLC_API void aout_EnableFilter(vlc_object_t *, const char *, bool );
#define aout_EnableFilter( o, n, b ) \
aout_EnableFilter( VLC_OBJECT(o), n, b )
/* */
VLC_EXPORT( vout_thread_t *, aout_filter_RequestVout, ( filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt ) LIBVLC_USED );
VLC_API vout_thread_t * aout_filter_RequestVout( filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt ) LIBVLC_USED;
# ifdef __cplusplus
}
......
......@@ -28,9 +28,9 @@
/* All functions return the atom value _after_ the operation. */
VLC_EXPORT(uintptr_t, vlc_atomic_get, (const vlc_atomic_t *));
VLC_EXPORT(uintptr_t, vlc_atomic_set, (vlc_atomic_t *, uintptr_t));
VLC_EXPORT(uintptr_t, vlc_atomic_add, (vlc_atomic_t *, uintptr_t));
VLC_API uintptr_t vlc_atomic_get(const vlc_atomic_t *);
VLC_API uintptr_t vlc_atomic_set(vlc_atomic_t *, uintptr_t);
VLC_API uintptr_t vlc_atomic_add(vlc_atomic_t *, uintptr_t);
static inline uintptr_t vlc_atomic_sub (vlc_atomic_t *atom, uintptr_t v)
{
......@@ -47,7 +47,7 @@ static inline uintptr_t vlc_atomic_dec (vlc_atomic_t *atom)
return vlc_atomic_sub (atom, 1);
}
VLC_EXPORT(uintptr_t, vlc_atomic_swap, (vlc_atomic_t *, uintptr_t));
VLC_EXPORT(uintptr_t, vlc_atomic_compare_swap, (vlc_atomic_t *, uintptr_t, uintptr_t));
VLC_API uintptr_t vlc_atomic_swap(vlc_atomic_t *, uintptr_t);
VLC_API uintptr_t vlc_atomic_compare_swap(vlc_atomic_t *, uintptr_t, uintptr_t);
#endif
......@@ -136,9 +136,9 @@ struct block_t
* and decrease are supported). Use it as it is optimised.
* - block_Duplicate : create a copy of a block.
****************************************************************************/
VLC_EXPORT( void, block_Init, ( block_t *, void *, size_t ) );
VLC_EXPORT( block_t *, block_Alloc, ( size_t ) LIBVLC_USED );
VLC_EXPORT( block_t *, block_Realloc, ( block_t *, ssize_t i_pre, size_t i_body ) LIBVLC_USED );
VLC_API void block_Init( block_t *, void *, size_t );
VLC_API block_t * block_Alloc( size_t ) LIBVLC_USED;
VLC_API block_t * block_Realloc( block_t *, ssize_t i_pre, size_t i_body ) LIBVLC_USED;
#define block_New( dummy, size ) block_Alloc(size)
......@@ -165,9 +165,9 @@ static inline void block_Release( block_t *p_block )
p_block->pf_release( p_block );
}
VLC_EXPORT( block_t *, block_heap_Alloc, (void *, void *, size_t) LIBVLC_USED );
VLC_EXPORT( block_t *, block_mmap_Alloc, (void *addr, size_t length) LIBVLC_USED );
VLC_EXPORT( block_t *, block_File, (int fd) LIBVLC_USED );
VLC_API block_t * block_heap_Alloc(void *, void *, size_t) LIBVLC_USED;
VLC_API block_t * block_mmap_Alloc(void *addr, size_t length) LIBVLC_USED;
VLC_API block_t * block_File(int fd) LIBVLC_USED;
static inline void block_Cleanup (void *block)
{
......@@ -306,15 +306,15 @@ static inline block_t *block_ChainGather( block_t *p_list )
* block_FifoGet and block_FifoShow are cancellation points.
****************************************************************************/
VLC_EXPORT( block_fifo_t *, block_FifoNew, ( void ) LIBVLC_USED );
VLC_EXPORT( void, block_FifoRelease, ( block_fifo_t * ) );
VLC_EXPORT( void, block_FifoPace, ( block_fifo_t *fifo, size_t max_depth, size_t max_size ) );
VLC_EXPORT( void, block_FifoEmpty, ( block_fifo_t * ) );
VLC_EXPORT( size_t, block_FifoPut, ( block_fifo_t *, block_t * ) );
VLC_EXPORT( void, block_FifoWake, ( block_fifo_t * ) );
VLC_EXPORT( block_t *, block_FifoGet, ( block_fifo_t * ) LIBVLC_USED );
VLC_EXPORT( block_t *, block_FifoShow, ( block_fifo_t * ) );
VLC_API block_fifo_t * block_FifoNew( void ) LIBVLC_USED;
VLC_API void block_FifoRelease( block_fifo_t * );
VLC_API void block_FifoPace( block_fifo_t *fifo, size_t max_depth, size_t max_size );
VLC_API void block_FifoEmpty( block_fifo_t * );
VLC_API size_t block_FifoPut( block_fifo_t *, block_t * );
VLC_API void block_FifoWake( block_fifo_t * );
VLC_API block_t * block_FifoGet( block_fifo_t * ) LIBVLC_USED;
VLC_API block_t * block_FifoShow( block_fifo_t * );
size_t block_FifoSize( const block_fifo_t *p_fifo ) LIBVLC_USED;
VLC_EXPORT( size_t, block_FifoCount, ( const block_fifo_t *p_fifo ) LIBVLC_USED );
VLC_API size_t block_FifoCount( const block_fifo_t *p_fifo ) LIBVLC_USED;
#endif /* VLC_BLOCK_H */
......@@ -32,24 +32,24 @@
/* iconv wrappers (defined in src/extras/libc.c) */
typedef void *vlc_iconv_t;
VLC_EXPORT( vlc_iconv_t, vlc_iconv_open, ( const char *, const char * ) LIBVLC_USED );
VLC_EXPORT( size_t, vlc_iconv, ( vlc_iconv_t, const char **, size_t *, char **, size_t * ) LIBVLC_USED );
VLC_EXPORT( int, vlc_iconv_close, ( vlc_iconv_t ) );
VLC_API vlc_iconv_t vlc_iconv_open( const char *, const char * ) LIBVLC_USED;
VLC_API size_t vlc_iconv( vlc_iconv_t, const char **, size_t *, char **, size_t * ) LIBVLC_USED;
VLC_API int vlc_iconv_close( vlc_iconv_t );
#include <stdarg.h>
VLC_EXPORT( void, LocaleFree, ( const char * ) );
VLC_EXPORT( char *, FromLocale, ( const char * ) LIBVLC_USED );
VLC_EXPORT( char *, FromLocaleDup, ( const char * ) LIBVLC_USED );
VLC_EXPORT( char *, ToLocale, ( const char * ) LIBVLC_USED );
VLC_EXPORT( char *, ToLocaleDup, ( const char * ) LIBVLC_USED );
VLC_API void LocaleFree( const char * );
VLC_API char * FromLocale( const char * ) LIBVLC_USED;
VLC_API char * FromLocaleDup( const char * ) LIBVLC_USED;
VLC_API char * ToLocale( const char * ) LIBVLC_USED;
VLC_API char * ToLocaleDup( const char * ) LIBVLC_USED;
VLC_EXPORT( int, utf8_vfprintf, ( FILE *stream, const char *fmt, va_list ap ) );
VLC_EXPORT( int, utf8_fprintf, ( FILE *, const char *, ... ) LIBVLC_FORMAT( 2, 3 ) );
VLC_EXPORT( char *, vlc_strcasestr, (const char *, const char *) LIBVLC_USED );
VLC_API int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap );
VLC_API int utf8_fprintf( FILE *, const char *, ... ) LIBVLC_FORMAT( 2, 3 );
VLC_API char * vlc_strcasestr(const char *, const char *) LIBVLC_USED;
VLC_EXPORT( char *, EnsureUTF8, ( char * ) );
VLC_EXPORT( const char *, IsUTF8, ( const char * ) LIBVLC_USED );
VLC_API char * EnsureUTF8( char * );
VLC_API const char * IsUTF8( const char * ) LIBVLC_USED;
#ifdef WIN32
LIBVLC_USED
......@@ -108,13 +108,13 @@ static inline char *FromLatin1 (const char *latin)
return utf8 ? utf8 : str;
}
VLC_EXPORT( char *, FromCharset, ( const char *charset, const void *data, size_t data_size ) LIBVLC_USED );
VLC_EXPORT( void *, ToCharset, ( const char *charset, const char *in, size_t *outsize ) LIBVLC_USED );
VLC_API char * FromCharset( const char *charset, const void *data, size_t data_size ) LIBVLC_USED;
VLC_API void * ToCharset( const char *charset, const char *in, size_t *outsize ) LIBVLC_USED;
VLC_EXPORT( double, us_strtod, ( const char *, char ** ) LIBVLC_USED );
VLC_EXPORT( float, us_strtof, ( const char *, char ** ) LIBVLC_USED );
VLC_EXPORT( double, us_atof, ( const char * ) LIBVLC_USED );
VLC_EXPORT( int, us_vasprintf, ( char **, const char *, va_list ) );
VLC_EXPORT( int, us_asprintf, ( char **, const char *, ... ) LIBVLC_USED );
VLC_API double us_strtod( const char *, char ** ) LIBVLC_USED;
VLC_API float us_strtof( const char *, char ** ) LIBVLC_USED;
VLC_API double us_atof( const char * ) LIBVLC_USED;
VLC_API int us_vasprintf( char **, const char *, va_list );
VLC_API int us_asprintf( char **, const char *, ... ) LIBVLC_USED;
#endif
......@@ -180,67 +180,67 @@ struct encoder_t
* buffer. You have to release it using decoder_DeletePicture or by returning
* it to the caller as a pf_decode_video return value.
*/
VLC_EXPORT( picture_t *, decoder_NewPicture, ( decoder_t * ) LIBVLC_USED );
VLC_API picture_t * decoder_NewPicture( decoder_t * ) LIBVLC_USED;
/**
* This function will release a picture create by decoder_NewPicture.
*/
VLC_EXPORT( void, decoder_DeletePicture, ( decoder_t *, picture_t *p_picture ) );
VLC_API void decoder_DeletePicture( decoder_t *, picture_t *p_picture );
/**
* This function will increase the picture reference count.
* (picture_Hold is not usable.)
*/
VLC_EXPORT( void, decoder_LinkPicture, ( decoder_t *, picture_t * ) );
VLC_API void decoder_LinkPicture( decoder_t *, picture_t * );
/**
* This function will decrease the picture reference count.
* (picture_Release is not usable.)
*/
VLC_EXPORT( void, decoder_UnlinkPicture, ( decoder_t *, picture_t * ) );
VLC_API void decoder_UnlinkPicture( decoder_t *, picture_t * );
/**
* This function will return a new audio buffer usable by a decoder as an
* output buffer. You have to release it using decoder_DeleteAudioBuffer
* or by returning it to the caller as a pf_decode_audio return value.
*/
VLC_EXPORT( aout_buffer_t *, decoder_NewAudioBuffer, ( decoder_t *, int i_size ) LIBVLC_USED );
VLC_API aout_buffer_t * decoder_NewAudioBuffer( decoder_t *, int i_size ) LIBVLC_USED;
/**
* This function will release a audio buffer created by decoder_NewAudioBuffer.
*/
VLC_EXPORT( void, decoder_DeleteAudioBuffer, ( decoder_t *, aout_buffer_t *p_buffer ) );
VLC_API void decoder_DeleteAudioBuffer( decoder_t *, aout_buffer_t *p_buffer );
/**
* This function will return a new subpicture usable by a decoder as an output
* buffer. You have to release it using decoder_DeleteSubpicture or by returning
* it to the caller as a pf_decode_sub return value.
*/
VLC_EXPORT( subpicture_t *, decoder_NewSubpicture, ( decoder_t *, const subpicture_updater_t * ) LIBVLC_USED );
VLC_API subpicture_t * decoder_NewSubpicture( decoder_t *, const subpicture_updater_t * ) LIBVLC_USED;
/**
* This function will release a subpicture created by decoder_NewSubicture.
*/
VLC_EXPORT( void, decoder_DeleteSubpicture, ( decoder_t *, subpicture_t *p_subpicture ) );
VLC_API void decoder_DeleteSubpicture( decoder_t *, subpicture_t *p_subpicture );
/**
* This function gives all input attachments at once.
*
* You MUST release the returned values
*/
VLC_EXPORT( int, decoder_GetInputAttachments, ( decoder_t *, input_attachment_t ***ppp_attachment, int *pi_attachment ) );
VLC_API int decoder_GetInputAttachments( decoder_t *, input_attachment_t ***ppp_attachment, int *pi_attachment );
/**
* This function converts a decoder timestamp into a display date comparable
* to mdate().
* You MUST use it *only* for gathering statistics about speed.
*/
VLC_EXPORT( mtime_t, decoder_GetDisplayDate, ( decoder_t *, mtime_t ) LIBVLC_USED );
VLC_API mtime_t decoder_GetDisplayDate( decoder_t *, mtime_t ) LIBVLC_USED;
/**
* This function returns the current input rate.
* You MUST use it *only* for gathering statistics about speed.
*/
VLC_EXPORT( int, decoder_GetDisplayRate, ( decoder_t * ) LIBVLC_USED );
VLC_API int decoder_GetDisplayRate( decoder_t * ) LIBVLC_USED;
#endif /* _VLC_CODEC_H */
......@@ -37,13 +37,13 @@
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_EXPORT( decoder_synchro_t *, decoder_SynchroInit, ( decoder_t *, int ) LIBVLC_USED );
VLC_EXPORT( void, decoder_SynchroRelease, ( decoder_synchro_t * ) );
VLC_EXPORT( void, decoder_SynchroReset, ( decoder_synchro_t * ) );
VLC_EXPORT( bool, decoder_SynchroChoose, ( decoder_synchro_t *, int, int, bool ) );
VLC_EXPORT( void, decoder_SynchroTrash, ( decoder_synchro_t * ) );
VLC_EXPORT( void, decoder_SynchroDecode, ( decoder_synchro_t * ) );
VLC_EXPORT( void, decoder_SynchroEnd, ( decoder_synchro_t *, int, bool ) );
VLC_EXPORT( mtime_t, decoder_SynchroDate, ( decoder_synchro_t * ) LIBVLC_USED );
VLC_EXPORT( void, decoder_SynchroNewPicture, ( decoder_synchro_t *, int, int, mtime_t, mtime_t, bool ) );
VLC_API decoder_synchro_t * decoder_SynchroInit( decoder_t *, int ) LIBVLC_USED;
VLC_API void decoder_SynchroRelease( decoder_synchro_t * );
VLC_API void decoder_SynchroReset( decoder_synchro_t * );
VLC_API bool decoder_SynchroChoose( decoder_synchro_t *, int, int, bool );
VLC_API void decoder_SynchroTrash( decoder_synchro_t * );
VLC_API void decoder_SynchroDecode( decoder_synchro_t * );
VLC_API void decoder_SynchroEnd( decoder_synchro_t *, int, bool );
VLC_API mtime_t decoder_SynchroDate( decoder_synchro_t * ) LIBVLC_USED;
VLC_API void decoder_SynchroNewPicture( decoder_synchro_t *, int, int, mtime_t, mtime_t, bool );
......@@ -2,12 +2,12 @@
* common.h: common definitions
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998-2005 the VideoLAN team
* $Id$
* Copyright (C) 1998-2011 the VideoLAN team
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org>
* Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -108,6 +108,24 @@
# define LIBVLC_DEPRECATED
#endif
/* Linkage */
#ifdef __cplusplus
# define LIBVLC_EXTERN extern "C"
#else
# define LIBVLC_EXTERN
#endif
#if defined (__GNUC__) && (__GNUC__ >= 4)
# define LIBVLC_EXPORT __attribute__((visibility("default")))
#elif defined (WIN32) && defined (DLL_EXPORT)
# define LIBVLC_EXPORT __declspec(dllexport)
#else
# define LIBVLC_EXPORT
#endif
#define VLC_API LIBVLC_EXTERN LIBVLC_EXPORT
/*****************************************************************************
* Basic types definitions
*****************************************************************************/
......@@ -462,26 +480,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
vlc_value_t, /* new value */
void * ); /* callback data */
/*****************************************************************************
* Plug-in stuff
*****************************************************************************/
#ifdef __cplusplus
# define LIBVLC_EXTERN extern "C"
#else
# define LIBVLC_EXTERN extern
#endif
#if defined (WIN32) && defined (DLL_EXPORT)
#if defined (UNDER_CE)
# include <windef.h>
#endif
# define LIBVLC_EXPORT __declspec(dllexport)
#else
# define LIBVLC_EXPORT
#endif
#define VLC_EXPORT( type, name, args ) \
LIBVLC_EXTERN LIBVLC_EXPORT type name args
/*****************************************************************************
* OS-specific headers and thread types
*****************************************************************************/
......@@ -557,9 +555,9 @@ typedef struct gc_object_t
*/
#define VLC_GC_MEMBERS gc_object_t vlc_gc_data;
VLC_EXPORT(void *, vlc_gc_init, (gc_object_t *, void (*)(gc_object_t *)));
VLC_EXPORT(void *, vlc_hold, (gc_object_t *));
VLC_EXPORT(void, vlc_release, (gc_object_t *));
VLC_API void * vlc_gc_init(gc_object_t *, void (*)(gc_object_t *));
VLC_API void * vlc_hold(gc_object_t *);
VLC_API void vlc_release(gc_object_t *);
#define vlc_gc_init( a,b ) vlc_gc_init( &(a)->vlc_gc_data, (b) )
#define vlc_gc_incref( a ) vlc_hold( &(a)->vlc_gc_data )
......@@ -649,7 +647,7 @@ static inline unsigned popcount (unsigned x)
#define EMPTY_STR(str) (!str || !*str)
VLC_EXPORT( char const *, vlc_error, ( int ) LIBVLC_USED );
VLC_API char const * vlc_error( int ) LIBVLC_USED;
#include <vlc_arrays.h>
......@@ -829,24 +827,24 @@ static inline uint64_t ntoh64 (uint64_t ll)
# include <tchar.h>
#endif
VLC_EXPORT( bool, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );
VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t );
VLC_EXPORT( void *, vlc_memalign, ( void **base, size_t alignment, size_t size ) LIBVLC_USED );
VLC_API void * vlc_memalign( void **base, size_t alignment, size_t size ) LIBVLC_USED;
/* execve wrapper (defined in src/extras/libc.c) */
VLC_EXPORT( int, vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const *pp_argv, char *const *pp_env, const char *psz_cwd, const char *p_in, size_t i_in, char **pp_data, size_t *pi_data ) LIBVLC_USED );
VLC_API int vlc_execve( vlc_object_t *p_object, int i_argc, char *const *pp_argv, char *const *pp_env, const char *psz_cwd, const char *p_in, size_t i_in, char **pp_data, size_t *pi_data ) LIBVLC_USED;
#define vlc_execve(a,b,c,d,e,f,g,h,i) vlc_execve(VLC_OBJECT(a),b,c,d,e,f,g,h,i)
VLC_EXPORT( void, vlc_tdestroy, ( void *, void (*)(void *) ) );
VLC_API void vlc_tdestroy( void *, void (*)(void *) );
/* Fast large memory copy and memory set */
VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) );
VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
VLC_API void * vlc_memcpy( void *, const void *, size_t );
VLC_API void * vlc_memset( void *, int, size_t );
/*****************************************************************************
* I18n stuff
*****************************************************************************/
VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) LIBVLC_FORMAT_ARG(1) );
VLC_API char * vlc_gettext( const char *msgid ) LIBVLC_FORMAT_ARG(1);
#define vlc_pgettext( ctx, id ) \
vlc_pgettext_aux( ctx "\004" id, id )
......@@ -880,9 +878,9 @@ static inline void *xrealloc (void *ptr, size_t len)
/*****************************************************************************
* libvlc features
*****************************************************************************/
VLC_EXPORT( const char *, VLC_CompileBy, ( void ) LIBVLC_USED );
VLC_EXPORT( const char *, VLC_CompileHost, ( void ) LIBVLC_USED );
VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
VLC_API const char * VLC_CompileBy( void ) LIBVLC_USED;
VLC_API const char * VLC_CompileHost( void ) LIBVLC_USED;
VLC_API const char * VLC_Compiler( void ) LIBVLC_USED;
/*****************************************************************************
* Additional vlc stuff
......
......@@ -283,7 +283,7 @@ static const struct config_category_t categories_array[] =
LIBVLC_USED
static inline const char *config_CategoryNameGet( int i_value )
{
int i = 0 ;
int i = 0;
while( categories_array[i].psz_name != NULL )
{
if( categories_array[i].i_id == i_value )
......@@ -298,7 +298,7 @@ static inline const char *config_CategoryNameGet( int i_value )
LIBVLC_USED
static inline const char *config_CategoryHelpGet( int i_value )
{
int i = 0 ;
int i = 0;
while( categories_array[i].psz_help != NULL )
{
if( categories_array[i].i_id == i_value )
......
......@@ -188,25 +188,25 @@ struct module_config_t
* Prototypes - these methods are used to get, set or manipulate configuration
* data.
*****************************************************************************/
VLC_EXPORT( int, config_GetType, (vlc_object_t *, const char *) LIBVLC_USED );
VLC_EXPORT( int64_t, config_GetInt, (vlc_object_t *, const char *) LIBVLC_USED );
VLC_EXPORT( void, config_PutInt, (vlc_object_t *, const char *, int64_t) );
VLC_EXPORT( float, config_GetFloat, (vlc_object_t *, const char *) LIBVLC_USED );
VLC_EXPORT( void, config_PutFloat, (vlc_object_t *, const char *, float) );
VLC_EXPORT( char *, config_GetPsz, (vlc_object_t *, const char *) LIBVLC_USED LIBVLC_MALLOC );
VLC_EXPORT( void, config_PutPsz, (vlc_object_t *, const char *, const char *) );
VLC_EXPORT( int, config_SaveConfigFile, ( vlc_object_t * ) );
VLC_API int config_GetType(vlc_object_t *, const char *) LIBVLC_USED;
VLC_API int64_t config_GetInt(vlc_object_t *, const char *) LIBVLC_USED;
VLC_API void config_PutInt(vlc_object_t *, const char *, int64_t);
VLC_API float config_GetFloat(vlc_object_t *, const char *) LIBVLC_USED;
VLC_API void config_PutFloat(vlc_object_t *, const char *, float);
VLC_API char * config_GetPsz(vlc_object_t *, const char *) LIBVLC_USED LIBVLC_MALLOC;
VLC_API void config_PutPsz(vlc_object_t *, const char *, const char *);
VLC_API int config_SaveConfigFile( vlc_object_t * );
#define config_SaveConfigFile(a) config_SaveConfigFile(VLC_OBJECT(a))
VLC_EXPORT( void, config_ResetAll, ( vlc_object_t * ) );
VLC_API void config_ResetAll( vlc_object_t * );
#define config_ResetAll(a) config_ResetAll(VLC_OBJECT(a))
VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) LIBVLC_USED );
VLC_EXPORT(char *, config_GetDataDir, ( vlc_object_t * ) LIBVLC_USED LIBVLC_MALLOC );
VLC_API module_config_t * config_FindConfig( vlc_object_t *, const char * ) LIBVLC_USED;
VLC_API char * config_GetDataDir( vlc_object_t * ) LIBVLC_USED LIBVLC_MALLOC;
#define config_GetDataDir(a) config_GetDataDir(VLC_OBJECT(a))
VLC_EXPORT(const char *, config_GetLibDir, ( void ) LIBVLC_USED);
VLC_EXPORT(const char *, config_GetConfDir, ( void ) LIBVLC_USED);
VLC_API const char * config_GetLibDir( void ) LIBVLC_USED;
VLC_API const char * config_GetConfDir( void ) LIBVLC_USED;
typedef enum vlc_userdir
{
......@@ -225,11 +225,11 @@ typedef enum vlc_userdir
VLC_VIDEOS_DIR,
} vlc_userdir_t;
VLC_EXPORT(char *, config_GetUserDir, ( vlc_userdir_t ) LIBVLC_USED LIBVLC_MALLOC );
VLC_API char * config_GetUserDir( vlc_userdir_t ) LIBVLC_USED LIBVLC_MALLOC;
VLC_EXPORT( void, config_AddIntf, ( vlc_object_t *, const char * ) );
VLC_EXPORT( void, config_RemoveIntf, ( vlc_object_t *, const char * ) );
VLC_EXPORT( bool, config_ExistIntf, ( vlc_object_t *, const char * ) LIBVLC_USED);
VLC_API void config_AddIntf( vlc_object_t *, const char * );
VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) LIBVLC_USED;
#define config_GetType(a,b) config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a,b) config_GetInt(VLC_OBJECT(a),b)
......@@ -261,7 +261,7 @@ struct config_chain_t
*
* The option names will be created by adding the psz_prefix prefix.
*/
VLC_EXPORT( void, config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char *const *ppsz_options, config_chain_t * ) );
VLC_API void config_ChainParse( vlc_object_t *, const char *psz_prefix, const char *const *ppsz_options, config_chain_t * );
#define config_ChainParse( a, b, c, d ) config_ChainParse( VLC_OBJECT(a), b, c, d )
/**
......@@ -275,18 +275,18 @@ VLC_EXPORT( void, config_ChainParse, ( vlc_object_t *, const char *psz_prefix, c
*
* The options values are unescaped using config_StringUnescape.
*/
VLC_EXPORT( char *, config_ChainCreate, ( char **