summaryrefslogtreecommitdiff
path: root/src/libffmpeg
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-07-10 22:08:12 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-07-10 22:08:12 +0000
commite70c5600f5653c6915931717bdd52f9a6a2f2d9d (patch)
treea0d5282f9deb660def1026701c8e68a273099ede /src/libffmpeg
parent32ad3ca6265c8cbac584dd3510109b920415a8e1 (diff)
downloadxine-lib-e70c5600f5653c6915931717bdd52f9a6a2f2d9d.tar.gz
xine-lib-e70c5600f5653c6915931717bdd52f9a6a2f2d9d.tar.bz2
Implement visibility support, available on GCC 4.0 and later and on some 3.4 (through backports), to avoid exporting unneeded internal symbols, making plugins' loading faster and use of internal copies of libraries more solid. It should automatically fall back to the old way in GCCs that does not support -fvisibility=hidden, but has to be tested carefully. No issues were found in the months of testing in Gentoo, but this requires special attention anyway.
CVS patchset: 8101 CVS date: 2006/07/10 22:08:12
Diffstat (limited to 'src/libffmpeg')
-rw-r--r--src/libffmpeg/Makefile.am11
-rw-r--r--src/libffmpeg/dvaudio_decoder.c4
-rw-r--r--src/libffmpeg/xine_decoder.c4
-rw-r--r--src/libffmpeg/xine_encoder.c6
4 files changed, 11 insertions, 14 deletions
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index 50c9b183a..b6e1c2893 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -26,22 +26,19 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \
$(ZLIB_CPPFLAGS)
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
xine_encoder.c mpeg_parser.c
-# The dxr3 uses ffmpegs MPEG encoder by dlopen()ing the ffmpeg plugin and
-# dlsym()ing the necessary function. Therefore we must allow more exported
-# symbols and cannot use @XINE_PLUGIN_MIN_SYMS@
-xineplug_decode_ff_la_LDFLAGS = -avoid-version -module
else
AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS)
xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \
mpeg_parser.c
-xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ \
- @IMPURE_TEXT_LDFLAGS@
endif
+xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG)
+xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @IMPURE_TEXT_LDFLAGS@
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
$(link_ffmpeg) $(THREAD_LIBS)
-xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
+xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG)
+xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module
xineplug_decode_dvaudio_la_SOURCES = dvaudio_decoder.c
xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB)
diff --git a/src/libffmpeg/dvaudio_decoder.c b/src/libffmpeg/dvaudio_decoder.c
index 17a5638a8..663335aaa 100644
--- a/src/libffmpeg/dvaudio_decoder.c
+++ b/src/libffmpeg/dvaudio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dvaudio_decoder.c,v 1.10 2006/06/02 22:13:45 dsalt Exp $
+ * $Id: dvaudio_decoder.c,v 1.11 2006/07/10 22:08:29 dgp85 Exp $
*
* dv audio decoder based on patch by Dan Dennedy <dan@dennedy.org>
*
@@ -442,7 +442,7 @@ static const decoder_info_t dec_info_dvaudio = {
* exported plugin catalog entry
*/
-const plugin_info_t xine_plugin_info[] = {
+const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
{ PLUGIN_AUDIO_DECODER, 15, "dvaudio", XINE_VERSION_CODE, &dec_info_dvaudio, init_dvaudio_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 952e874d0..cbd0870d3 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.168 2006/05/03 19:46:07 dsalt Exp $
+ * $Id: xine_decoder.c,v 1.169 2006/07/10 22:08:29 dgp85 Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -143,7 +143,7 @@ void init_once_routine(void) {
* exported plugin catalog entry
*/
-const plugin_info_t xine_plugin_info[] = {
+const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
{ PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "ffmpegvideo", XINE_VERSION_CODE, &dec_info_ffmpeg_video, init_video_plugin },
{ PLUGIN_VIDEO_DECODER, 18, "ffmpeg-wmv8", XINE_VERSION_CODE, &dec_info_ffmpeg_wmv8, init_video_plugin },
diff --git a/src/libffmpeg/xine_encoder.c b/src/libffmpeg/xine_encoder.c
index d67b598a1..e234b4ddc 100644
--- a/src/libffmpeg/xine_encoder.c
+++ b/src/libffmpeg/xine_encoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_encoder.c,v 1.24 2006/06/30 00:21:30 dgp85 Exp $
+ * $Id: xine_encoder.c,v 1.25 2006/07/10 22:08:29 dgp85 Exp $
*/
/* mpeg encoders for the dxr3 video out plugin. */
@@ -51,8 +51,8 @@
#define DEFAULT_BUFFER_SIZE 512*1024
-/*initialisation function*/
-int dxr3_encoder_init(dxr3_driver_t *drv);
+/*initialisation function, used by the dxr3 plugin */
+int dxr3_encoder_init(dxr3_driver_t *drv) EXPORTED;
/* functions required by encoder api */
static int lavc_on_update_format(dxr3_driver_t *drv, dxr3_frame_t *frame);