summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5fa560d)
raw | patch | inline | side by side (parent: 5fa560d)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 10:29:27 +0000 (10:29 +0000) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 10:29:27 +0000 (10:29 +0000) |
This just tests for the H264 encoder header, I'm not sure if that's
safe enough or if one can have a random set of encoders installed,
in which case each header should be tested separately.
For now though, it fixes the build.
safe enough or if one can have a random set of encoders installed,
in which case each header should be tested separately.
For now though, it fixes the build.
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/gstducati.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 923d7beefc455c628bc39ab85f3cc188678ec4f6..d7f81a59bc7b6b70f610a97c23d3a710d3234fa0 100644 (file)
--- a/configure.ac
+++ b/configure.ac
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)
+dnl encoders - they can be missing
+AC_CHECK_HEADER([ti/sdo/codecs/h264enc/ih264enc.h],[HAVE_ENCODERS=1])
+AM_CONDITIONAL(HAVE_ENCODERS, test "$HAVE_ENCODERS" = "1")
+
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index ecb68b3827d2de952148f16f9f789639b417ae0b..aa3ec0691bd57c22aa9194908ab8b78c32fccc15 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
plugin_LTLIBRARIES = libgstducati.la
+if HAVE_ENCODERS
+encoders_headers = \
+ gstducatih264enc.h \
+ gstducatimpeg4enc.h \
+ gstducatividenc.h
+encoders_sources = \
+ gstducatih264enc.c \
+ gstducatimpeg4enc.c \
+ gstducatividenc.c
+endif
+
# headers we need but don't want installed
noinst_HEADERS = \
gstducatirvdec.h \
gstducatimpeg4dec.h \
gstducatih264dec.h \
gstducatividdec.h \
- gstducatih264enc.h \
- gstducatimpeg4enc.h \
- gstducatividenc.h \
gstducatibufferpriv.h \
- gstducati.h
+ gstducati.h \
+ $(encoders_headers)
# sources used to compile this plug-in
libgstducati_la_SOURCES = \
gstducatimpeg4dec.c \
gstducatih264dec.c \
gstducatividdec.c \
- gstducatih264enc.c \
- gstducatimpeg4enc.c \
- gstducatividenc.c \
gstducatibufferpriv.c \
gstducati.c \
+ $(encoders_sources) \
$(noinst_HEADERS)
# compiler and linker flags used to compile this plugin, set in configure.ac
diff --git a/src/gstducati.c b/src/gstducati.c
index 02d8f775c1700d49da8356a1268e28e6a70a6db5..54aebcfea7607e42cd486674dc9af1a9686fe18c 100644 (file)
--- a/src/gstducati.c
+++ b/src/gstducati.c
#include "gstducativp6dec.h"
#include "gstducativp7dec.h"
#include "gstducatirvdec.h"
+#if HAVE_ENCODERS
#include "gstducatih264enc.h"
#include "gstducatimpeg4enc.h"
+#endif
GST_DEBUG_CATEGORY (gst_ducati_debug);
GST_TYPE_DUCATIVP7DEC) &&
gst_element_register (plugin, "ducatirvdec", GST_RANK_PRIMARY,
GST_TYPE_DUCATIRVDEC) &&
+#ifdef HAVE_ENCODERS
gst_element_register (plugin, "ducatih264enc", GST_RANK_PRIMARY + 1,
GST_TYPE_DUCATIH264ENC) &&
gst_element_register (plugin, "ducatimpeg4enc", GST_RANK_PRIMARY + 1,
- GST_TYPE_DUCATIMPEG4ENC);
+ GST_TYPE_DUCATIMPEG4ENC) &&
+#endif
+ TRUE;
}
/* PACKAGE: this is usually set by autotools depending on some _INIT macro