From 9fda18a9d5ae65ae1f86580cbfa41fa61ec2d747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 5 May 2008 23:25:32 +0200 Subject: Check for and use internal visibility. Internal visibility can improve optimisation on some architectures, but functions need not to be taken the pointer of when using internal visibility. For this reason only a subset of xine-lib's functions should be marked as such. --- src/xine-engine/xine_private.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/xine-engine/xine_private.h b/src/xine-engine/xine_private.h index 41a23d7da..569c19045 100644 --- a/src/xine-engine/xine_private.h +++ b/src/xine-engine/xine_private.h @@ -29,8 +29,15 @@ #ifndef XINE_PRIVATE_H__ #define XINE_PRIVATE_H__ +#include #include +#if SUPPORT_ATTRIBUTE_VISIBILITY_INTERNAL +# define INTERNAL __attribute__((visibility("internal"))) +#else +# define INTERNAL +#endif + /** * @defgroup load_plugins Plugins loading * @brief Functions related with plugins loading. @@ -45,28 +52,28 @@ * Decoder plugins are loaded on demand. Video/audio output plugins * have special load/probe functions */ -void _x_scan_plugins (xine_t *this); +void _x_scan_plugins (xine_t *this) INTERNAL; /** * @ingroup load_plugins * @brief Dispose (shutdown) all currently loaded plugins * @param this xine instance */ -void _x_dispose_plugins (xine_t *this); +void _x_dispose_plugins (xine_t *this) INTERNAL; ///@{ /** * @defgroup * @brief find and instantiate input and demux plugins */ -input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl); -demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t *input); -demux_plugin_t *_x_find_demux_plugin_by_name (xine_stream_t *stream, const char *name, input_plugin_t *input); -demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const char *last_demux_name, input_plugin_t *input); -input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename); -input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream); -void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input); -void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux); +input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl) INTERNAL; +demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t *input) INTERNAL; +demux_plugin_t *_x_find_demux_plugin_by_name (xine_stream_t *stream, const char *name, input_plugin_t *input) INTERNAL; +demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const char *last_demux_name, input_plugin_t *input) INTERNAL; +input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename) INTERNAL; +input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream) INTERNAL; +void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) INTERNAL; +void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) INTERNAL; ///@} ///@{ @@ -75,11 +82,11 @@ void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux); * @brief create decoder fifos and threads */ -int _x_video_decoder_init (xine_stream_t *stream); -void _x_video_decoder_shutdown (xine_stream_t *stream); +int _x_video_decoder_init (xine_stream_t *stream) INTERNAL; +void _x_video_decoder_shutdown (xine_stream_t *stream) INTERNAL; -int _x_audio_decoder_init (xine_stream_t *stream); -void _x_audio_decoder_shutdown (xine_stream_t *stream); +int _x_audio_decoder_init (xine_stream_t *stream) INTERNAL; +void _x_audio_decoder_shutdown (xine_stream_t *stream) INTERNAL; ///@} #endif -- cgit v1.2.3