summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/combined/Makefile.am2
-rw-r--r--src/combined/ffmpeg/Makefile.am47
-rw-r--r--src/combined/ffmpeg/ff_audio_decoder.c (renamed from src/libffmpeg/ff_audio_decoder.c)2
-rw-r--r--src/combined/ffmpeg/ff_dvaudio_decoder.c (renamed from src/libffmpeg/ff_dvaudio_decoder.c)6
-rw-r--r--src/combined/ffmpeg/ff_mpeg_parser.c (renamed from src/libffmpeg/ff_mpeg_parser.c)0
-rw-r--r--src/combined/ffmpeg/ff_mpeg_parser.h (renamed from src/libffmpeg/ff_mpeg_parser.h)0
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c (renamed from src/libffmpeg/ff_video_decoder.c)2
-rw-r--r--src/combined/ffmpeg/ffmpeg_decoder.c (renamed from src/libffmpeg/ffmpeg_decoder.c)2
-rw-r--r--src/combined/ffmpeg/ffmpeg_decoder.h (renamed from src/libffmpeg/ffmpeg_decoder.h)4
-rw-r--r--src/combined/ffmpeg/ffmpeg_encoder.c (renamed from src/libffmpeg/ffmpeg_encoder.c)6
-rw-r--r--src/libffmpeg/Makefile.am38
11 files changed, 64 insertions, 45 deletions
diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am
index 884fcf0cc..03250ef67 100644
--- a/src/combined/Makefile.am
+++ b/src/combined/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+SUBDIRS = ffmpeg
+
if HAVE_WAVPACK
xineplug_wavpack = xineplug_wavpack.la
endif
diff --git a/src/combined/ffmpeg/Makefile.am b/src/combined/ffmpeg/Makefile.am
new file mode 100644
index 000000000..741acdf40
--- /dev/null
+++ b/src/combined/ffmpeg/Makefile.am
@@ -0,0 +1,47 @@
+include $(top_srcdir)/misc/Makefile.common
+
+DEFAULT_INCLUDES = -I.
+
+if HAVE_FFMPEG
+ff_cppflags = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
+link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
+else
+ff_cppflags = -I$(top_srcdir)/src/libffmpeg -I$(top_srcdir)/src/libffmpeg/libavcodec -I$(top_srcdir)/src/libffmpeg/libavutil
+link_ffmpeg = \
+ $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \
+ $(top_builddir)/src/libffmpeg/libavutil/libavutil.la \
+ $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
+endif
+
+# ffmpeg_config.h is generated by configure
+DISTCLEANFILES = ffmpeg_config.h
+
+# this must always be included, even if the current machine has no DXR3...
+EXTRA_DIST = ffmpeg_encoder.c
+
+xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
+
+if HAVE_DXR3
+AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \
+ $(ZLIB_CPPFLAGS)
+xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
+ ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \
+ ff_mpeg_parser.h
+else
+AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS)
+xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
+ ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h
+endif
+
+xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
+xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
+xineplug_decode_ff_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) -lm $(ZLIB_LIBS) \
+ $(link_ffmpeg) $(PTHREAD_LIBS) $(LTLIBINTL)
+
+xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
+xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags)
+xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c
+xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
+
+$(top_srcdir)/src/libffmpeg/libavcodec/libavcodec.la:
+ make -C $(top_srcdir)/src/libffmpeg
diff --git a/src/libffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c
index 5f197bed5..4aebd6d60 100644
--- a/src/libffmpeg/ff_audio_decoder.c
+++ b/src/combined/ffmpeg/ff_audio_decoder.c
@@ -22,7 +22,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "ffmpeg_config.h"
+#include "../../libffmpeg/ffmpeg_config.h"
#endif
#include <stdlib.h>
diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/combined/ffmpeg/ff_dvaudio_decoder.c
index 5106a402c..4704c1a2a 100644
--- a/src/libffmpeg/ff_dvaudio_decoder.c
+++ b/src/combined/ffmpeg/ff_dvaudio_decoder.c
@@ -54,11 +54,13 @@
#ifdef HAVE_FFMPEG_AVUTIL_H
# include <avcodec.h>
-#else
+#elif defined HAVE_FFMPEG
# include <libavcodec/avcodec.h>
+#else
+# include "../../libffmpeg/libavcodec/avcodec.h"
#endif
-#include "libavcodec/dvdata.h"
+#include "../../libffmpeg/libavcodec/dvdata.h"
#ifdef _MSC_VER
# undef malloc
diff --git a/src/libffmpeg/ff_mpeg_parser.c b/src/combined/ffmpeg/ff_mpeg_parser.c
index 70901d93b..70901d93b 100644
--- a/src/libffmpeg/ff_mpeg_parser.c
+++ b/src/combined/ffmpeg/ff_mpeg_parser.c
diff --git a/src/libffmpeg/ff_mpeg_parser.h b/src/combined/ffmpeg/ff_mpeg_parser.h
index ea43a6ce4..ea43a6ce4 100644
--- a/src/libffmpeg/ff_mpeg_parser.h
+++ b/src/combined/ffmpeg/ff_mpeg_parser.h
diff --git a/src/libffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index 3d9c0225a..4e772dbca 100644
--- a/src/libffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -22,7 +22,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "ffmpeg_config.h"
+#include "../../libffmpeg/ffmpeg_config.h"
#endif
#include <stdlib.h>
diff --git a/src/libffmpeg/ffmpeg_decoder.c b/src/combined/ffmpeg/ffmpeg_decoder.c
index d0175184f..776e07df9 100644
--- a/src/libffmpeg/ffmpeg_decoder.c
+++ b/src/combined/ffmpeg/ffmpeg_decoder.c
@@ -22,7 +22,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
-#include "ffmpeg_config.h"
+#include "../../libffmpeg/ffmpeg_config.h"
#endif
#include "xine_internal.h"
diff --git a/src/libffmpeg/ffmpeg_decoder.h b/src/combined/ffmpeg/ffmpeg_decoder.h
index 6de9e8772..f47421253 100644
--- a/src/libffmpeg/ffmpeg_decoder.h
+++ b/src/combined/ffmpeg/ffmpeg_decoder.h
@@ -27,8 +27,10 @@
#ifdef HAVE_FFMPEG_AVUTIL_H
# include <avcodec.h>
-#else
+#elif defined HAVE_FFMPEG
# include <libavcodec/avcodec.h>
+#else
+# include "../../libffmpeg/libavcodec/avcodec.h"
#endif
typedef struct ff_codec_s {
diff --git a/src/libffmpeg/ffmpeg_encoder.c b/src/combined/ffmpeg/ffmpeg_encoder.c
index c8a450b0d..2d1be10a3 100644
--- a/src/libffmpeg/ffmpeg_encoder.c
+++ b/src/combined/ffmpeg/ffmpeg_encoder.c
@@ -38,10 +38,12 @@
#include "video_out_dxr3.h"
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_FFMPEG_AVUTIL_H
# include <avcodec.h>
+#elif defined HAVE_FFMPEG
+# include <libavcodec/avcodec.h>
#else
-# include "libavcodec/avcodec.h"
+# include "../../libffmpeg/libavcodec/avcodec.h"
#endif
/* buffer size for encoded mpeg1 stream; will hold one intra frame
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index efc1c18aa..9af34df26 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -3,46 +3,10 @@ include $(top_srcdir)/misc/Makefile.common
DEFAULT_INCLUDES = -I.
if HAVE_FFMPEG
-AM_CFLAGS = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
-ff_cppflags =
-link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
else
-ff_cppflags = -I$(top_srcdir)/src/libffmpeg/libavcodec -I$(top_srcdir)/src/libffmpeg/libavutil
-link_ffmpeg = \
- $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \
- $(top_builddir)/src/libffmpeg/libavutil/libavutil.la \
- $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
SUBDIRS = libavcodec libavutil
endif
-# ffmpeg_config.h is generated by configure
-DISTCLEANFILES = ffmpeg_config.h
-
-# this must always be included, even if the current machine has no DXR3...
-EXTRA_DIST = ffmpeg_encoder.c diff_to_ffmpeg_cvs.txt
+EXTRA_DIST = diff_to_ffmpeg_cvs.txt
INTERNAL_DOCS = diff_to_ffmpeg_cvs.txt
-
-xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
-
-if HAVE_DXR3
-AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \
- $(ZLIB_CPPFLAGS)
-xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
- ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \
- ff_mpeg_parser.h
-else
-AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS)
-xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
- ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h
-endif
-
-xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
-xineplug_decode_ff_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) -lm $(ZLIB_LIBS) \
- $(link_ffmpeg) $(PTHREAD_LIBS) $(LTLIBINTL)
-
-xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags)
-xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c
-xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)