diff options
Diffstat (limited to 'src/post')
44 files changed, 167 insertions, 543 deletions
diff --git a/src/post/Makefile.am b/src/post/Makefile.am index 8408c3f3a..6c28b41f7 100644 --- a/src/post/Makefile.am +++ b/src/post/Makefile.am @@ -1,4 +1,3 @@ include $(top_srcdir)/misc/Makefile.common -SUBDIRS = \ - planar goom visualizations mosaico deinterlace audio +SUBDIRS = planar goom visualizations mosaico deinterlace audio diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am index 41a364d0d..c2df5c21d 100644 --- a/src/post/audio/Makefile.am +++ b/src/post/audio/Makefile.am @@ -1,12 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + noinst_HEADERS = dsp.h filter.h window.h audio_filters.h xinepost_LTLIBRARIES = xineplug_post_audio_filters.la xineplug_post_audio_filters_la_SOURCES = \ upmix.c upmix_mono.c filter.c window.c stretch.c volnorm.c audio_filters.c -xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) -lm -xineplug_post_audio_filters_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module - +xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index 5aa7a0617..f02b1b899 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -659,21 +659,6 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *stretch_get_identifier(post_class_t *class_gen) -{ - return "stretch"; -} - -static char *stretch_get_description(post_class_t *class_gen) -{ - return "Time stretch by a given factor, optionally preserving pitch"; -} - -static void stretch_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *stretch_init_plugin(xine_t *xine, void *data) { @@ -683,9 +668,9 @@ void *stretch_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = stretch_open_plugin; - class->post_class.get_identifier = stretch_get_identifier; - class->post_class.get_description = stretch_get_description; - class->post_class.dispose = stretch_class_dispose; + class->post_class.identifier = "stretch"; + class->post_class.description = N_("Time stretch by a given factor, optionally preserving pitch"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index e1b2afbe3..4d0e2c2a2 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -414,21 +414,6 @@ static post_plugin_t *upmix_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *upmix_get_identifier(post_class_t *class_gen) -{ - return "upmix"; -} - -static char *upmix_get_description(post_class_t *class_gen) -{ - return "upmix"; -} - -static void upmix_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_init_plugin(xine_t *xine, void *data) { @@ -438,9 +423,9 @@ void *upmix_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_open_plugin; - class->post_class.get_identifier = upmix_get_identifier; - class->post_class.get_description = upmix_get_description; - class->post_class.dispose = upmix_class_dispose; + class->post_class.identifier = "upmix"; + class->post_class.description = N_("upmix"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index 195831123..b28b1f3f5 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -329,21 +329,6 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs return &this->post; } -static char *upmix_mono_get_identifier(post_class_t *class_gen) -{ - return "upmix_mono"; -} - -static char *upmix_mono_get_description(post_class_t *class_gen) -{ - return "converts Mono into Stereo"; -} - -static void upmix_mono_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *upmix_mono_init_plugin(xine_t *xine, void *data) { @@ -353,9 +338,9 @@ void *upmix_mono_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = upmix_mono_open_plugin; - class->post_class.get_identifier = upmix_mono_get_identifier; - class->post_class.get_description = upmix_mono_get_description; - class->post_class.dispose = upmix_mono_class_dispose; + class->post_class.identifier = "upmix_mono"; + class->post_class.description = N_("converts Mono into Stereo"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c index 783c1e26d..7533ba94a 100644 --- a/src/post/audio/volnorm.c +++ b/src/post/audio/volnorm.c @@ -447,21 +447,6 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *volnorm_get_identifier(post_class_t *class_gen) -{ - return "volnorm"; -} - -static char *volnorm_get_description(post_class_t *class_gen) -{ - return "Normalize volume"; -} - -static void volnorm_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *volnorm_init_plugin(xine_t *xine, void *data) { @@ -471,9 +456,9 @@ void *volnorm_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = volnorm_open_plugin; - class->post_class.get_identifier = volnorm_get_identifier; - class->post_class.get_description = volnorm_get_description; - class->post_class.dispose = volnorm_class_dispose; + class->post_class.identifier = "volnorm"; + class->post_class.description = N_("Normalize volume"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am index d382a2e98..1a90b72bf 100644 --- a/src/post/deinterlace/Makefile.am +++ b/src/post/deinterlace/Makefile.am @@ -1,8 +1,9 @@ include $(top_srcdir)/misc/Makefile.common -SUBDIRS = plugins +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) -EXTRA_DIST = +SUBDIRS = plugins xinepost_LTLIBRARIES = xineplug_post_tvtime.la @@ -11,8 +12,4 @@ xineplug_post_tvtime_la_SOURCES = xine_plugin.c \ xineplug_post_tvtime_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) \ $(top_builddir)/src/post/deinterlace/plugins/libdeinterlaceplugins.la -xineplug_post_tvtime_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_tvtime_la_LDFLAGS = -avoid-version -module \ - @IMPURE_TEXT_LDFLAGS@ - noinst_HEADERS = deinterlace.h pulldown.h speedtools.h speedy.h tvtime.h diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index 17d170127..4185b5706 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -17,6 +17,11 @@ include $(top_srcdir)/misc/Makefile.common # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# libpostproc is here so we can use their nice mangle.h +AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \ + -I$(top_srcdir)/contrib/ffmpeg/libpostproc + EXTRA_DIST = greedy2frame_template.c greedyh.asm \ tomsmocomp/SearchLoop0A.inc tomsmocomp/SearchLoopBottom.inc \ tomsmocomp/SearchLoopEdgeA.inc tomsmocomp/SearchLoopEdgeA8.inc \ @@ -28,25 +33,26 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ tomsmocomp/TomsMoCompAll2.inc tomsmocomp/WierdBob.inc \ tomsmocomp/tomsmocompmacros.h x86-64_macros.inc -# libpostproc is here so we can use their nice mangle.h -AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \ - -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc - -noinst_LTLIBRARIES = libdeinterlaceplugins.la - -libdeinterlaceplugins_la_SOURCES = \ - double.c \ - greedy.c \ - linear.c \ - linearblend.c \ - vfir.c \ - weave.c \ - greedy2frame.c \ - scalerbob.c \ - kdetv_greedyh.c \ - kdetv_tomsmocomp.c -libdeinterlaceplugins_la_LIBADD = $(XINE_LIB) -libdeinterlaceplugins_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -libdeinterlaceplugins_la_LDFLAGS = -avoid-version -module - noinst_HEADERS = plugins.h greedyhmacros.h + +if DEBUG_BUILD +debug_sources = greedy2frame.c +nodebug_sources = +else +debug_sources = +nodebug_sources = greedy2frame.c +endif + +# per-object CFLAGS -- drop optimization on kdetv_greedyh.c so that gcc +# doesn't run out of general registers trying to compile it. + +noinst_LTLIBRARIES = libdeinterlacepluginsO1.la libdeinterlaceplugins.la +libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c $(debug_sources) +libdeinterlacepluginsO1_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS) + +libdeinterlaceplugins_la_SOURCES = double.c greedy.c linear.c linearblend.c \ + vfir.c weave.c scalerbob.c kdetv_tomsmocomp.c \ + $(nodebug_sources) +libdeinterlaceplugins_la_LIBADD = $(XINE_LIB) libdeinterlacepluginsO1.la +libdeinterlaceplugins_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) +libdeinterlaceplugins_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) diff --git a/src/post/deinterlace/plugins/greedy2frame_template.c b/src/post/deinterlace/plugins/greedy2frame_template.c index 1067e2cb8..0d9ab6769 100644 --- a/src/post/deinterlace/plugins/greedy2frame_template.c +++ b/src/post/deinterlace/plugins/greedy2frame_template.c @@ -100,8 +100,6 @@ static int64_t qwGreedyTwoFrameThreshold; #endif -#include <mangle.h> - #if defined(IS_SSE) static void DeinterlaceGreedy2Frame_SSE(uint8_t *output, int outstride, deinterlace_frame_data_t *data, diff --git a/src/post/deinterlace/plugins/greedyh.asm b/src/post/deinterlace/plugins/greedyh.asm index 11b28ca76..c96bfbf2c 100644 --- a/src/post/deinterlace/plugins/greedyh.asm +++ b/src/post/deinterlace/plugins/greedyh.asm @@ -17,7 +17,6 @@ ///////////////////////////////////////////////////////////////////////////// #include "x86-64_macros.inc" -#include <mangle.h> #if !defined(MASKS_DEFINED) #define MASKS_DEFINED diff --git a/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc b/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc index 5870d77be..3af46d8fa 100644 --- a/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc +++ b/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc @@ -21,8 +21,6 @@ // See www.eff.org for details ///////////////////////////////////////////////////////////////////////////// -#include <mangle.h> - #if !defined(MASKS_DEFINED) #define MASKS_DEFINED static const int64_t __attribute__((__used__)) Max_Mov = 0x0404040404040404ull; diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h index a3b92a51c..5b81575d8 100644 --- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h +++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h @@ -2,6 +2,8 @@ #include <math.h> #include <stdlib.h> +#include <mangle.h> + #define USE_FOR_DSCALER #define MyMemCopy xine_fast_memcpy diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index 99bd597f6..68eabba67 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -56,8 +56,8 @@ typedef struct post_plugin_deinterlace_s post_plugin_deinterlace_t; #define MAX_NUM_METHODS 30 static const char *enum_methods[MAX_NUM_METHODS]; -static char *enum_pulldown[] = { "none", "vektor", NULL }; -static char *enum_framerate[] = { "full", "half_top", "half_bottom", NULL }; +static const char *enum_pulldown[] = { "none", "vektor", NULL }; +static const char *enum_framerate[] = { "full", "half_top", "half_bottom", NULL }; static void *help_string; @@ -268,8 +268,6 @@ static xine_post_api_t post_api = { static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *deinterlace_get_identifier(post_class_t *class_gen); -static char *deinterlace_get_description(post_class_t *class_gen); static void deinterlace_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -299,8 +297,8 @@ static void *deinterlace_init_plugin(xine_t *xine, void *data) return NULL; class->class.open_plugin = deinterlace_open_plugin; - class->class.get_identifier = deinterlace_get_identifier; - class->class.get_description = deinterlace_get_description; + class->class.identifier = "tvtime"; + class->class.description = N_("advanced deinterlacer plugin with pulldown detection"); class->class.dispose = deinterlace_class_dispose; @@ -412,16 +410,6 @@ static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int input return &this->post; } -static char *deinterlace_get_identifier(post_class_t *class_gen) -{ - return "tvtime"; -} - -static char *deinterlace_get_description(post_class_t *class_gen) -{ - return "advanced deinterlacer plugin with pulldown detection"; -} - static void deinterlace_class_dispose(post_class_t *class_gen) { xine_buffer_free(help_string); diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index c01482917..22b4af79f 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -1,36 +1,15 @@ include $(top_srcdir)/misc/Makefile.common -EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \ - gfontrle.c mathtools.c - -## -fomit-frame-pointer segfaults here -## Use -O2 if -Os is stripped or x86 does not build -#CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-Os/-O2/g'` -CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'` - -# Avoid errors with -O0 -xineplug_post_goom_la-xmmx.o xineplug_post_goom_la-xmmx.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` - -xinepost_LTLIBRARIES = xineplug_post_goom.la +AM_CFLAGS = $(VISIBILITY_FLAG) ## doesn't work -#if PPC_ARCH +#if ARCH_PPC #extra_files = ppc_drawings.s ppc_zoom_ultimate.s #AM_CPPFLAGS = -DCPU_POWERPC #endif -if HAVE_MMX -extra_files = mmx.c xmmx.c -endif - -xineplug_post_goom_la_SOURCES = $(extra_files) xine_goom.c \ - config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \ - gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \ - goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \ - plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c -xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -lm -xineplug_post_goom_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_goom_la_LDFLAGS = -avoid-version -module +EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \ + gfontrle.c mathtools.c noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \ goom_config.h goom_config_param.h goom_filters.h goom_fx.h goom_graphic.h \ @@ -38,3 +17,21 @@ noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \ goomsl_heap.h goomsl_private.h goomsl_yacc.h ifs.h lines.h mathtools.h mmx.h \ ppc_drawings.h ppc_zoom_ultimate.h sound_tester.h surf3d.h tentacle3d.h v3d.h \ motif_goom1.h motif_goom2.h + +noinst_LTLIBRARIES = libpost_goom_asm.la +libpost_goom_asm_la_SOURCES = xmmx.c +if DEBUG_BUILD +libpost_goom_asm_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS) +else +libpost_goom_asm_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) +endif + +xinepost_LTLIBRARIES = xineplug_post_goom.la +xineplug_post_goom_la_SOURCES = mmx.c xine_goom.c \ + config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \ + gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \ + goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \ + plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c +xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -lm $(noinst_LTLIBRARIES) +xineplug_post_goom_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) +xineplug_post_goom_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) diff --git a/src/post/goom/gfontlib.c b/src/post/goom/gfontlib.c index 2bc366305..2bc366305 100644..100755 --- a/src/post/goom/gfontlib.c +++ b/src/post/goom/gfontlib.c diff --git a/src/post/goom/gfontlib.h b/src/post/goom/gfontlib.h index 0520b7da9..0520b7da9 100644..100755 --- a/src/post/goom/gfontlib.h +++ b/src/post/goom/gfontlib.h diff --git a/src/post/goom/gfontrle.c b/src/post/goom/gfontrle.c index a22545a1e..a22545a1e 100644..100755 --- a/src/post/goom/gfontrle.c +++ b/src/post/goom/gfontrle.c diff --git a/src/post/goom/mathtools.h b/src/post/goom/mathtools.h index 165fc66b0..165fc66b0 100644..100755 --- a/src/post/goom/mathtools.h +++ b/src/post/goom/mathtools.h diff --git a/src/post/goom/mmx.h b/src/post/goom/mmx.h index b650d8b12..88789e86f 100644 --- a/src/post/goom/mmx.h +++ b/src/post/goom/mmx.h @@ -31,6 +31,8 @@ # include "config.h" #endif +#include "attributes.h" + #include "goom_graphic.h" /* Warning: at this writing, the version of GAS packaged @@ -58,7 +60,7 @@ typedef union { char b[8]; /* 8 Byte (8-bit) values */ unsigned char ub[8]; /* 8 Unsigned Byte */ float s[2]; /* Single-precision (32-bit) value */ -} __attribute__ ((aligned (8))) mmx_t; /* On an 8-byte (64-bit) boundary */ +} ATTR_ALIGN(8) mmx_t; /* On an 8-byte (64-bit) boundary */ diff --git a/src/post/goom/surf3d.c b/src/post/goom/surf3d.c index ba8c69094..ba8c69094 100644..100755 --- a/src/post/goom/surf3d.c +++ b/src/post/goom/surf3d.c diff --git a/src/post/goom/surf3d.h b/src/post/goom/surf3d.h index 482b6a090..482b6a090 100644..100755 --- a/src/post/goom/surf3d.h +++ b/src/post/goom/surf3d.h diff --git a/src/post/goom/tentacle3d.c b/src/post/goom/tentacle3d.c index e1e2157e7..e1e2157e7 100644..100755 --- a/src/post/goom/tentacle3d.c +++ b/src/post/goom/tentacle3d.c diff --git a/src/post/goom/tentacle3d.h b/src/post/goom/tentacle3d.h index ad0858fad..ad0858fad 100644..100755 --- a/src/post/goom/tentacle3d.h +++ b/src/post/goom/tentacle3d.h diff --git a/src/post/goom/v3d.h b/src/post/goom/v3d.h index 7690847f2..7690847f2 100644..100755 --- a/src/post/goom/v3d.h +++ b/src/post/goom/v3d.h diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index 351c997ba..0b540694d 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -125,8 +125,6 @@ const plugin_info_t xine_plugin_info[] EXPORTED = { static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *goom_get_identifier(post_class_t *class_gen); -static char *goom_get_description(post_class_t *class_gen); static void goom_class_dispose(post_class_t *class_gen); /* plugin instance functions */ @@ -194,8 +192,8 @@ static void *goom_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = goom_open_plugin; - this->class.get_identifier = goom_get_identifier; - this->class.get_description = goom_get_description; + this->class.identifier = "goom"; + this->class.description = N_("What a GOOM"); this->class.dispose = goom_class_dispose; this->ip = NULL; this->xine = xine; @@ -307,16 +305,6 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *goom_get_identifier(post_class_t *class_gen) -{ - return "goom"; -} - -static char *goom_get_description(post_class_t *class_gen) -{ - return "What a GOOM"; -} - static void goom_class_dispose(post_class_t *class_gen) { post_class_goom_t *this = (post_class_goom_t*) class_gen; diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am index af027b6e6..106d480c3 100644 --- a/src/post/mosaico/Makefile.am +++ b/src/post/mosaico/Makefile.am @@ -1,13 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la xineplug_post_mosaico_la_SOURCES = mosaico.c xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) -xineplug_post_mosaico_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module xineplug_post_switch_la_SOURCES = switch.c xineplug_post_switch_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) -xineplug_post_switch_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_switch_la_LDFLAGS = -avoid-version -module diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 50b1cfcdf..5683002f6 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -96,9 +96,6 @@ struct post_mosaico_s { static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *mosaico_get_identifier(post_class_t *class_gen); -static char *mosaico_get_description(post_class_t *class_gen); -static void mosaico_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void mosaico_dispose(post_plugin_t *this_gen); @@ -128,9 +125,9 @@ static void *mosaico_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = mosaico_open_plugin; - this->class.get_identifier = mosaico_get_identifier; - this->class.get_description = mosaico_get_description; - this->class.dispose = mosaico_class_dispose; + this->class.identifier = "mosaico"; + this->class.description = N_("Mosaico is a picture in picture (pip) post plugin"); + this->class.dispose = default_post_class_dispose; this->xine = xine; return &this->class; @@ -158,7 +155,7 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, _x_post_init(&this->post, 0, inputs); - this->pip = (mosaico_pip_t *)xine_xmalloc(sizeof(mosaico_pip_t) * (inputs - 1)); + this->pip = (mosaico_pip_t *)xine_xcalloc((inputs - 1), sizeof(mosaico_pip_t)); this->pip_count = inputs - 1; pthread_cond_init(&this->vpts_limit_changed, NULL); @@ -202,22 +199,6 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *mosaico_get_identifier(post_class_t *class_gen) -{ - return "mosaico"; -} - -static char *mosaico_get_description(post_class_t *class_gen) -{ - return "Mosaico is a picture in picture (pip) post plugin"; -} - -static void mosaico_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void mosaico_dispose(post_plugin_t *this_gen) { post_mosaico_t *this = (post_mosaico_t *)this_gen; diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c index 8fec5ee77..23469e566 100644 --- a/src/post/mosaico/switch.c +++ b/src/post/mosaico/switch.c @@ -82,9 +82,6 @@ struct post_switch_s { static post_plugin_t *switch_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *switch_get_identifier(post_class_t *class_gen); -static char *switch_get_description(post_class_t *class_gen); -static void switch_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void switch_dispose(post_plugin_t *this_gen); @@ -107,9 +104,9 @@ static void *switch_init_plugin(xine_t *xine, void *data) return NULL; this->class.open_plugin = switch_open_plugin; - this->class.get_identifier = switch_get_identifier; - this->class.get_description = switch_get_description; - this->class.dispose = switch_class_dispose; + this->class.identifier = "switch"; + this->class.description = N_("Switch is a post plugin able to switch at any time between different streams"); + this->class.dispose = default_post_class_dispose; this->xine = xine; return &this->class; @@ -168,22 +165,6 @@ static post_plugin_t *switch_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *switch_get_identifier(post_class_t *class_gen) -{ - return "switch"; -} - -static char *switch_get_description(post_class_t *class_gen) -{ - return "Switch is a post plugin able to switch at any time between different streams"; -} - -static void switch_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void switch_dispose(post_plugin_t *this_gen) { post_switch_t *this = (post_switch_t *)this_gen; diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index 4ba6bfa41..cb1ee68f9 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -1,34 +1,30 @@ include $(top_srcdir)/misc/Makefile.common -POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la +AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags) +AM_CPPFLAGS = +AM_LDFLAGS = -if HAVE_FFMPEG +if WITH_EXTERNAL_FFMPEG postproc_lib = $(FFMPEG_POSTPROC_LIBS) -ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) +ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) else -ff_cflags = -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc -postproc_lib = $(POSTPROC_INT_LIB) -postproc_dep = $(postproc_lib) -endif +AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc +postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \ + $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a -# -fomit-frame-pointer is always needed. it might cause debug to not -# work, but at least it compiles. -AM_CFLAGS = $(ff_cflags) -fomit-frame-pointer +$(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a: + $(MAKE) -C $(top_builddir)/contrib ffmpeg/libpostproc/libpostproc.a +$(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a: + $(MAKE) -C $(top_builddir)/contrib ffmpeg/libavutil/libavutil.a +endif -# Avoid errors with -O0 -xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` -xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` -xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` +noinst_LTLIBRARIES = libpost_planar_asm.la +libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c +libpost_planar_asm_la_CFLAGS = $(O1_CFLAGS) -fomit-frame-pointer $(AM_CFLAGS) xinepost_LTLIBRARIES = xineplug_post_planar.la - xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \ - denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c -xineplug_post_planar_la_DEPENDENCIES = $(postproc_dep) -xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(LTLIBINTL) -xineplug_post_planar_la_LDFLAGS = -avoid-version -module \ - @IMPURE_TEXT_LDFLAGS@ -xineplug_post_planar_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) - -$(POSTPROC_INT_LIB): - cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la + denoise3d.c unsharp.c pp.c +xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES) +xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) +xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c index b7a6f524f..225e75954 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -120,9 +120,6 @@ static xine_post_api_t post_api = { static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *boxblur_get_identifier(post_class_t *class_gen); -static char *boxblur_get_description(post_class_t *class_gen); -static void boxblur_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void boxblur_dispose(post_plugin_t *this_gen); @@ -136,15 +133,15 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream); void *boxblur_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = boxblur_open_plugin; - class->get_identifier = boxblur_get_identifier; - class->get_description = boxblur_get_description; - class->dispose = boxblur_class_dispose; + class->identifier = "boxblur"; + class->description = N_("box blur filter from mplayer"); + class->dispose = default_post_class_dispose; return class; } @@ -194,22 +191,6 @@ static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *boxblur_get_identifier(post_class_t *class_gen) -{ - return "boxblur"; -} - -static char *boxblur_get_description(post_class_t *class_gen) -{ - return "box blur filter from mplayer"; -} - -static void boxblur_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void boxblur_dispose(post_plugin_t *this_gen) { post_plugin_boxblur_t *this = (post_plugin_boxblur_t *)this_gen; diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c index fb3c1102b..fb7021ece 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -157,9 +157,6 @@ static xine_post_api_t post_api = { static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *denoise3d_get_identifier(post_class_t *class_gen); -static char *denoise3d_get_description(post_class_t *class_gen); -static void denoise3d_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void denoise3d_dispose(post_plugin_t *this_gen); @@ -176,15 +173,15 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream); void *denoise3d_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = denoise3d_open_plugin; - class->get_identifier = denoise3d_get_identifier; - class->get_description = denoise3d_get_description; - class->dispose = denoise3d_class_dispose; + class->identifier = "denoise3d"; + class->description = N_("3D Denoiser (variable lowpass filter)"); + class->dispose = default_post_class_dispose; return class; } @@ -237,22 +234,6 @@ static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *denoise3d_get_identifier(post_class_t *class_gen) -{ - return "denoise3d"; -} - -static char *denoise3d_get_description(post_class_t *class_gen) -{ - return "3D Denoiser (variable lowpass filter)"; -} - -static void denoise3d_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void denoise3d_dispose(post_plugin_t *this_gen) { post_plugin_denoise3d_t *this = (post_plugin_denoise3d_t *)this_gen; diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c index b2cf6e50f..03f647d68 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -208,9 +208,6 @@ static xine_post_api_t post_api = { static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *eq_get_identifier(post_class_t *class_gen); -static char *eq_get_description(post_class_t *class_gen); -static void eq_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void eq_dispose(post_plugin_t *this_gen); @@ -228,15 +225,15 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream); void *eq_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = eq_open_plugin; - class->get_identifier = eq_get_identifier; - class->get_description = eq_get_description; - class->dispose = eq_class_dispose; + class->identifier = "eq"; + class->description = N_("soft video equalizer"); + class->dispose = default_post_class_dispose; return class; } @@ -292,22 +289,6 @@ static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *eq_get_identifier(post_class_t *class_gen) -{ - return "eq"; -} - -static char *eq_get_description(post_class_t *class_gen) -{ - return "soft video equalizer"; -} - -static void eq_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void eq_dispose(post_plugin_t *this_gen) { post_plugin_eq_t *this = (post_plugin_eq_t *)this_gen; diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 6b277c347..ceb9f9024 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -389,9 +389,6 @@ static xine_post_api_t post_api = { static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *eq2_get_identifier(post_class_t *class_gen); -static char *eq2_get_description(post_class_t *class_gen); -static void eq2_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void eq2_dispose(post_plugin_t *this_gen); @@ -409,15 +406,15 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream); void *eq2_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = eq2_open_plugin; - class->get_identifier = eq2_get_identifier; - class->get_description = eq2_get_description; - class->dispose = eq2_class_dispose; + class->identifier = "eq2"; + class->description = N_("Software video equalizer"); + class->dispose = default_post_class_dispose; return class; } @@ -489,22 +486,6 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *eq2_get_identifier(post_class_t *class_gen) -{ - return "eq2"; -} - -static char *eq2_get_description(post_class_t *class_gen) -{ - return "Software video equalizer"; -} - -static void eq2_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void eq2_dispose(post_plugin_t *this_gen) { post_plugin_eq2_t *this = (post_plugin_eq2_t *)this_gen; diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 67d449153..db62a5512 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -100,9 +100,6 @@ typedef struct post_expand_s { static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *expand_get_identifier(post_class_t *class_gen); -static char *expand_get_description(post_class_t *class_gen); -static void expand_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void expand_dispose(post_plugin_t *this_gen); @@ -130,15 +127,15 @@ static int32_t expand_overlay_add_event(video_overlay_manager_t *this_gen void *expand_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = expand_open_plugin; - class->get_identifier = expand_get_identifier; - class->get_description = expand_get_description; - class->dispose = expand_class_dispose; + class->identifier = "expand"; + class->description = N_("add black borders to top and bottom of video to expand it to 4:3 aspect ratio"); + class->dispose = default_post_class_dispose; return class; } @@ -191,22 +188,6 @@ static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *expand_get_identifier(post_class_t *class_gen) -{ - return "expand"; -} - -static char *expand_get_description(post_class_t *class_gen) -{ - return "add black borders to top and bottom of video to expand it to 4:3 aspect ratio"; -} - -static void expand_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void expand_dispose(post_plugin_t *this_gen) { post_expand_t *this = (post_expand_t *)this_gen; diff --git a/src/post/planar/fill.c b/src/post/planar/fill.c index 32a9d5dfb..62fdc1381 100644 --- a/src/post/planar/fill.c +++ b/src/post/planar/fill.c @@ -32,9 +32,6 @@ void *fill_init_plugin(xine_t *xine, void *); static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *fill_get_identifier(post_class_t *class_gen); -static char *fill_get_description(post_class_t *class_gen); -static void fill_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void fill_dispose(post_plugin_t *this_gen); @@ -48,15 +45,15 @@ static int fill_draw(vo_frame_t *frame, xine_stream_t *stream); void *fill_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = fill_open_plugin; - class->get_identifier = fill_get_identifier; - class->get_description = fill_get_description; - class->dispose = fill_class_dispose; + class->identifier = "fill"; + class->description = N_("crops left and right of video to fill 4:3 aspect ratio"); + class->dispose = default_post_class_dispose; return class; } @@ -92,21 +89,6 @@ static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs, return this; } -static char *fill_get_identifier(post_class_t *class_gen) -{ - return "fill"; -} - -static char *fill_get_description(post_class_t *class_gen) -{ - return "crops left and right of video to fill 4:3 aspect ratio"; -} - -static void fill_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - static void fill_dispose(post_plugin_t *this) { if (_x_post_dispose(this)) diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 1aa5c2a2e..b5ee1e3f2 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -33,9 +33,6 @@ void *invert_init_plugin(xine_t *xine, void *); static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *invert_get_identifier(post_class_t *class_gen); -static char *invert_get_description(post_class_t *class_gen); -static void invert_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void invert_dispose(post_plugin_t *this_gen); @@ -49,15 +46,15 @@ static int invert_draw(vo_frame_t *frame, xine_stream_t *stream); void *invert_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = invert_open_plugin; - class->get_identifier = invert_get_identifier; - class->get_description = invert_get_description; - class->dispose = invert_class_dispose; + class->identifier = "invert"; + class->description = N_("inverts the colours of every video frame"); + class->dispose = default_post_class_dispose; return class; } @@ -91,22 +88,6 @@ static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs, return this; } -static char *invert_get_identifier(post_class_t *class_gen) -{ - return "invert"; -} - -static char *invert_get_description(post_class_t *class_gen) -{ - return "inverts the colours of every video frame"; -} - -static void invert_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void invert_dispose(post_plugin_t *this) { if (_x_post_dispose(this)) diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index 8c04f2e72..afe05b180 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -429,9 +429,6 @@ static xine_post_api_t post_api = { static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *noise_get_identifier(post_class_t *class_gen); -static char *noise_get_description(post_class_t *class_gen); -static void noise_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void noise_dispose(post_plugin_t *this_gen); @@ -445,15 +442,15 @@ static int noise_draw(vo_frame_t *frame, xine_stream_t *stream); void *noise_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = noise_open_plugin; - class->get_identifier = noise_get_identifier; - class->get_description = noise_get_description; - class->dispose = noise_class_dispose; + class->identifier = "noise"; + class->description = N_("Adds noise"); + class->dispose = default_post_class_dispose; #ifdef ARCH_X86 if (xine_mm_accel() & MM_ACCEL_X86_MMX) { @@ -515,22 +512,6 @@ static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *noise_get_identifier(post_class_t *class_gen) -{ - return "noise"; -} - -static char *noise_get_description(post_class_t *class_gen) -{ - return "Adds noise"; -} - -static void noise_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void noise_dispose(post_plugin_t *this_gen) { post_plugin_noise_t *this = (post_plugin_noise_t *)this_gen; diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index e13119311..3f9c0d745 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -135,9 +135,6 @@ static xine_post_api_t post_api = { static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *pp_get_identifier(post_class_t *class_gen); -static char *pp_get_description(post_class_t *class_gen); -static void pp_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void pp_dispose(post_plugin_t *this_gen); @@ -151,15 +148,15 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream); void *pp_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = pp_open_plugin; - class->get_identifier = pp_get_identifier; - class->get_description = pp_get_description; - class->dispose = pp_class_dispose; + class->identifier = "pp"; + class->description = N_("plugin for ffmpeg libpostprocess"); + class->dispose = default_post_class_dispose; return class; } @@ -221,22 +218,6 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *pp_get_identifier(post_class_t *class_gen) -{ - return "pp"; -} - -static char *pp_get_description(post_class_t *class_gen) -{ - return "plugin for ffmpeg libpostprocess"; -} - -static void pp_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - - static void pp_dispose(post_plugin_t *this_gen) { post_plugin_pp_t *this = (post_plugin_pp_t *)this_gen; diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c index b9b791a8e..ff86f21bc 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -253,9 +253,6 @@ static xine_post_api_t post_api = { static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); -static char *unsharp_get_identifier(post_class_t *class_gen); -static char *unsharp_get_description(post_class_t *class_gen); -static void unsharp_class_dispose(post_class_t *class_gen); /* plugin instance functions */ static void unsharp_dispose(post_plugin_t *this_gen); @@ -269,15 +266,15 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream); void *unsharp_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t)); if (!class) return NULL; class->open_plugin = unsharp_open_plugin; - class->get_identifier = unsharp_get_identifier; - class->get_description = unsharp_get_description; - class->dispose = unsharp_class_dispose; + class->identifier = "unsharp"; + class->description = N_("unsharp mask & gaussian blur"); + class->dispose = default_post_class_dispose; return class; } @@ -332,21 +329,6 @@ static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *unsharp_get_identifier(post_class_t *class_gen) -{ - return "unsharp"; -} - -static char *unsharp_get_description(post_class_t *class_gen) -{ - return "unsharp mask & gaussian blur"; -} - -static void unsharp_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - static void unsharp_free_SC(post_plugin_unsharp_t *this) { int i; diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index f42598d9c..bea89ac49 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -1,13 +1,14 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = fooviz.c +noinst_HEADERS = fft.h visualizations.h + xinepost_LTLIBRARIES = xineplug_post_visualizations.la xineplug_post_visualizations_la_SOURCES = \ visualizations.c fft.c fftscope.c oscope.c fftgraph.c xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm -xineplug_post_visualizations_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module - -noinst_HEADERS = fft.h visualizations.h diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index 5068bd37a..7e7f52fbf 100644 --- a/src/post/visualizations/fftgraph.c +++ b/src/post/visualizations/fftgraph.c @@ -452,21 +452,6 @@ static post_plugin_t *fftgraph_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fftgraph_get_identifier(post_class_t *class_gen) -{ - return "fftgraph"; -} - -static char *fftgraph_get_description(post_class_t *class_gen) -{ - return "fftgraph Visualization Post Plugin"; -} - -static void fftgraph_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *fftgraph_init_plugin(xine_t *xine, void *data) { @@ -476,9 +461,9 @@ void *fftgraph_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fftgraph_open_plugin; - class->post_class.get_identifier = fftgraph_get_identifier; - class->post_class.get_description = fftgraph_get_description; - class->post_class.dispose = fftgraph_class_dispose; + class->post_class.identifier = "fftgraph"; + class->post_class.description = N_("fftgraph Visualization Post Plugin"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index ba34437f5..917af508d 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -473,21 +473,6 @@ static post_plugin_t *fftscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fftscope_get_identifier(post_class_t *class_gen) -{ - return "FFT Scope"; -} - -static char *fftscope_get_description(post_class_t *class_gen) -{ - return "FFT Scope"; -} - -static void fftscope_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *fftscope_init_plugin(xine_t *xine, void *data) { @@ -497,9 +482,9 @@ void *fftscope_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fftscope_open_plugin; - class->post_class.get_identifier = fftscope_get_identifier; - class->post_class.get_description = fftscope_get_description; - class->post_class.dispose = fftscope_class_dispose; + class->post_class.identifier = "FFT Scope"; + class->post_class.description = N_("FFT Scope"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index 21854afc6..78803f8d2 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -284,21 +284,6 @@ static post_plugin_t *fooviz_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *fooviz_get_identifier(post_class_t *class_gen) -{ - return "fooviz"; -} - -static char *fooviz_get_description(post_class_t *class_gen) -{ - return "fooviz"; -} - -static void fooviz_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ static void *fooviz_init_plugin(xine_t *xine, void *data) { @@ -308,9 +293,9 @@ static void *fooviz_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = fooviz_open_plugin; - class->post_class.get_identifier = fooviz_get_identifier; - class->post_class.get_description = fooviz_get_description; - class->post_class.dispose = fooviz_class_dispose; + class->post_class.identifier = "fooviz"; + class->post_class.description = N_("fooviz"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index a435604d4..86b8b2750 100644 --- a/src/post/visualizations/oscope.c +++ b/src/post/visualizations/oscope.c @@ -355,21 +355,6 @@ static post_plugin_t *oscope_open_plugin(post_class_t *class_gen, int inputs, return &this->post; } -static char *oscope_get_identifier(post_class_t *class_gen) -{ - return "Oscilloscope"; -} - -static char *oscope_get_description(post_class_t *class_gen) -{ - return "Oscilloscope"; -} - -static void oscope_class_dispose(post_class_t *class_gen) -{ - free(class_gen); -} - /* plugin class initialization function */ void *oscope_init_plugin(xine_t *xine, void *data) { @@ -379,9 +364,9 @@ void *oscope_init_plugin(xine_t *xine, void *data) return NULL; class->post_class.open_plugin = oscope_open_plugin; - class->post_class.get_identifier = oscope_get_identifier; - class->post_class.get_description = oscope_get_description; - class->post_class.dispose = oscope_class_dispose; + class->post_class.identifier = "Oscilloscope"; + class->post_class.description = N_("Oscilloscope"); + class->post_class.dispose = default_post_class_dispose; class->xine = xine; |