From 4c70acb313cc8b0a5cc769e736ee30726af90cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Sat, 1 Mar 2008 16:42:09 +0100 Subject: Support the new FFmpeg include layout. Now the same include directive should work for both internal and external FFmpeg (with new layout). --- src/post/planar/pp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index e13119311..bc7cc1928 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -23,9 +23,14 @@ #include "xine_internal.h" #include "post.h" #include "xineutils.h" -#include "postprocess.h" #include +#ifdef HAVE_FFMPEG_AVCODEC_H +# include +#else +# include +#endif + #define PP_STRING_SIZE 256 /* size of pp mode string (including all options) */ /* plugin class initialization function */ -- cgit v1.2.3 From 6772044da2f3574f09b8f39832710daab249e83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 2 Mar 2008 18:52:09 +0100 Subject: Backport the MANGLE macro handling from 1.2-libavutil branch (and adapt). --- src/libw32dll/wine/Makefile.am | 3 +- src/libw32dll/wine/win32.c | 8 ++-- src/post/deinterlace/plugins/Makefile.am | 2 +- .../plugins/tomsmocomp/tomsmocompmacros.h | 2 + src/xine-utils/Makefile.am | 2 +- src/xine-utils/mangle.h | 50 ++++++++++++++++++++++ 6 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 src/xine-utils/mangle.h (limited to 'src') diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 63da4068e..70341a502 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -9,7 +9,8 @@ noinst_LTLIBRARIES = $(wine_lib) AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ -Wmissing-prototypes -Wimplicit-function-declaration \ -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ - -Ddbg_printf=__vprintf -DTRACE=__vprintf + -Ddbg_printf=__vprintf -DTRACE=__vprintf \ + -I$(top_srcdir)/src/xine-utils # CFLAGS is here to filter out -fomit-frame-pointer, # -finline-functions and -frename-registers because they cause bad diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index 3b0941391..9b627a10a 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -5058,11 +5058,9 @@ struct libs libraries[]={ LL(ddraw) #endif }; -#if defined(__CYGWIN__) || defined(__OS2__) || defined (__OpenBSD__) -#define MANGLE(a) "_" #a -#else -#define MANGLE(a) #a -#endif + +#include "mangle.h" + static void ext_stubs(void) { // expects: diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index 1ff139d29..5f0997eb8 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ # 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 + -I$(top_srcdir)/src/xine-utils # Avoid "can't find register" failures with -O0, -O2, -O3 (gcc 4.0) libdeinterlaceplugins_la-kdetv_greedyh.o libdeinterlaceplugins_la-kdetv_greedyh.lo: CFLAGS=$(shell echo @CFLAGS@ | sed -e 's/$$/ -O1/') diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h index a3b92a51c..a0136fd44 100644 --- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h +++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h @@ -2,6 +2,8 @@ #include #include +#include "mangle.h" + #define USE_FOR_DSCALER #define MyMemCopy xine_fast_memcpy diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 95de06b9e..a23ebe579 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -46,5 +46,5 @@ xineinclude_HEADERS = \ ring_buffer.h -noinst_HEADERS = ppcasm_string.h xine_check.h +noinst_HEADERS = ppcasm_string.h xine_check.h mangle.h diff --git a/src/xine-utils/mangle.h b/src/xine-utils/mangle.h new file mode 100644 index 000000000..7627ca2fc --- /dev/null +++ b/src/xine-utils/mangle.h @@ -0,0 +1,50 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * copyright (c) 2008 the xine-project + * + * This file is part of FFmpeg. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +/** + * @file + * + * @brief MANGLE definition from FFmpeg project, until the code is ported + * not to require this (considered an hack by the FFmpeg project. + */ + +#ifndef _XINE_MANGLE_H +#define _XINE_MANGLE_H + +// Use rip-relative addressing if compiling PIC code on x86-64. +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__DJGPP__) || \ + defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__)) +# if defined(__x86_64__) && defined(__PIC__) +# define MANGLE(a) "_" #a"(%%rip)" +# else +# define MANGLE(a) "_" #a +# endif +#else +# if defined(__x86_64__) && defined(__PIC__) +# define MANGLE(a) #a"(%%rip)" +# elif defined(__APPLE__) +# define MANGLE(a) "_" #a +# else +# define MANGLE(a) #a +# endif +#endif + +#endif -- cgit v1.2.3 From c414377fbfa2be0577381c80dd0171061e242905 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 2 Mar 2008 22:16:08 +0000 Subject: Fix compilation with older external ffmpeg. HAVE_FFMPEG_AVUTIL_H wasn't being defined, and there were some incorrect checks. --- src/libffmpeg/ff_dvaudio_decoder.c | 2 +- src/libffmpeg/ff_video_decoder.c | 2 +- src/libffmpeg/ffmpeg_decoder.h | 2 +- src/post/planar/pp.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index a394e6615..5106a402c 100644 --- a/src/libffmpeg/ff_dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c @@ -52,7 +52,7 @@ # undef uint64_t #endif -#ifdef HAVE_FFMPEG_AVCODEC_H +#ifdef HAVE_FFMPEG_AVUTIL_H # include #else # include diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c index d1d69416e..3d9c0225a 100644 --- a/src/libffmpeg/ff_video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -45,7 +45,7 @@ #include "ffmpeg_decoder.h" #include "ff_mpeg_parser.h" -#ifdef HAVE_FFMPEG_AVCODEC_H +#ifdef HAVE_FFMPEG_AVUTIL_H # include #else # include diff --git a/src/libffmpeg/ffmpeg_decoder.h b/src/libffmpeg/ffmpeg_decoder.h index adf0908dd..6de9e8772 100644 --- a/src/libffmpeg/ffmpeg_decoder.h +++ b/src/libffmpeg/ffmpeg_decoder.h @@ -25,7 +25,7 @@ #include "config.h" #endif -#ifdef HAVE_FFMPEG_AVCODEC_H +#ifdef HAVE_FFMPEG_AVUTIL_H # include #else # include diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index bc7cc1928..e658dadd0 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -25,7 +25,7 @@ #include "xineutils.h" #include -#ifdef HAVE_FFMPEG_AVCODEC_H +#ifdef HAVE_FFMPEG_AVUTIL_H # include #else # include -- cgit v1.2.3