summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-05 23:25:32 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-05 23:25:32 +0200
commit9fda18a9d5ae65ae1f86580cbfa41fa61ec2d747 (patch)
tree628240ec10328609e7cae1903a3aadcf05d9f88d
parent2ef6f5c406603802a259e8522ccaf7da6408de5d (diff)
downloadxine-lib-9fda18a9d5ae65ae1f86580cbfa41fa61ec2d747.tar.gz
xine-lib-9fda18a9d5ae65ae1f86580cbfa41fa61ec2d747.tar.bz2
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.
-rw-r--r--configure.ac1
-rw-r--r--src/xine-engine/xine_private.h35
2 files changed, 22 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 8b80cb252..a841fe6a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -441,6 +441,7 @@ CC_ATTRIBUTE_MALLOC
CC_ATTRIBUTE_VISIBILITY([protected],
[visibility_export="protected"],
[CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])])
+CC_ATTRIBUTE_VISIBILITY([internal])
if test x"$visibility_export" != x""; then
CC_FLAG_VISIBILITY([VISIBILITY_FLAG="-fvisibility=hidden"
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 <config.h>
#include <xine/xine_internal.h>
+#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