From 9e643a614771617be59e21ee2c63a6cb56ff36fe Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 21 Dec 2012 14:29:01 +0100 Subject: [PATCH] Add videoutils submodule for GstVideoDecoder APIs. --- .gitmodules | 3 ++ autogen.sh | 8 +++++- configure.ac | 6 ++-- ext/Makefile.am | 19 +++++++++++++ ext/videoutils | 1 + gst-libs/gst/Makefile.am | 2 +- gst-libs/gst/vaapi/Makefile.am | 1 + gst-libs/gst/video/Makefile.am | 64 ++++++++++++++++++++++++++++++++++++++++++ gst/vaapi/Makefile.am | 3 +- 9 files changed, 101 insertions(+), 6 deletions(-) create mode 160000 ext/videoutils create mode 100644 gst-libs/gst/video/Makefile.am diff --git a/.gitmodules b/.gitmodules index e40ceed..bad3c46 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "ext/codecparsers"] path = ext/codecparsers url = git://gitorious.org/vaapi/gstreamer-codecparsers.git +[submodule "ext/videoutils"] + path = ext/videoutils + url = git://gitorious.org/vaapi/gstreamer-videoutils.git diff --git a/autogen.sh b/autogen.sh index 4314352..b4a63f3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -20,7 +20,13 @@ if test -z "$GIT"; then echo "*** No git found ***" exit 1 else - if test ! -f ext/codecparsers/autogen.sh; then + submodule_init="no" + for ext_module in codecparsers videoutils; do + if test ! -f ext/${ext_module}/autogen.sh; then + submodule_init="yes" + fi + done + if test "$submodule_init" = "yes"; then $GIT submodule init fi $GIT submodule update diff --git a/configure.ac b/configure.ac index 68dcd0e..657bea8 100644 --- a/configure.ac +++ b/configure.ac @@ -234,9 +234,8 @@ AC_CACHE_CHECK([for GstVideoDecoder], CPPFLAGS="$saved_CPPFLAGS" LIBS="$saved_LIBS" ]) -if test "$ac_cv_have_gst_video_decoder" != "yes"; then - AC_MSG_ERROR([GstVideoDecoder is not available]) -fi +AM_CONDITIONAL([USE_LOCAL_GST_VIDEO_DECODER], + [test "$ac_cv_have_gst_video_decoder" != "yes"]) dnl GStreamer -bad plugins PKG_CHECK_MODULES([GST_BASEVIDEO], @@ -597,6 +596,7 @@ debian.upstream/libgstvaapi-x11.install.in gst-libs/gst/Makefile gst-libs/gst/codecparsers/Makefile gst-libs/gst/vaapi/Makefile + gst-libs/gst/video/Makefile gst/Makefile gst/vaapi/Makefile pkgconfig/Makefile diff --git a/ext/Makefile.am b/ext/Makefile.am index bad55d5..cfb2bc0 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -25,5 +25,24 @@ codecparsers_source_h = \ EXTRA_DIST += $(codecparsers_source_h:%.h=$(codecparsers_srcdir)/%.h) +videoutils_srcdir = \ + $(top_srcdir)/ext/videoutils/gst-libs/gst/video + +videoutils_source_c = \ + gstvideodecoder.c \ + gstvideoutils.c \ + video.c \ + $(NULL) + +EXTRA_DIST += $(videoutils_source_c:%.c=$(videoutils_srcdir)/%.c) + +videoutils_source_h = \ + gstvideodecoder.h \ + gstvideoutils.h \ + video.h \ + $(NULL) + +EXTRA_DIST += $(videoutils_source_h:%.h=$(videoutils_srcdir)/%.h) + # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = Makefile.in diff --git a/ext/videoutils b/ext/videoutils new file mode 160000 index 0000000..251df2b --- /dev/null +++ b/ext/videoutils @@ -0,0 +1 @@ +Subproject commit 251df2b0958e6265cf5752fdfc82c69a2869eca7 diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am index 06d14db..6d09e2b 100644 --- a/gst-libs/gst/Makefile.am +++ b/gst-libs/gst/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = codecparsers vaapi +SUBDIRS = codecparsers video vaapi # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = Makefile.in $(gen_headers) diff --git a/gst-libs/gst/vaapi/Makefile.am b/gst-libs/gst/vaapi/Makefile.am index b0779d4..79684e2 100644 --- a/gst-libs/gst/vaapi/Makefile.am +++ b/gst-libs/gst/vaapi/Makefile.am @@ -38,6 +38,7 @@ libgstvaapi_libs = \ $(GST_VIDEO_LIBS) \ $(GST_CODEC_PARSERS_LIBS) \ $(LIBVA_LIBS) \ + $(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la \ $(top_builddir)/gst-libs/gst/codecparsers/libgstvaapi-codecparsers.la libgstvaapi_source_c = \ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am new file mode 100644 index 0000000..fc0ca01 --- /dev/null +++ b/gst-libs/gst/video/Makefile.am @@ -0,0 +1,64 @@ +noinst_LTLIBRARIES = \ + libgstvaapi-videoutils.la \ + $(NULL) + +local_videoutils_srcdir = \ + $(top_srcdir)/ext/videoutils/gst-libs/gst/video + +libgstvaapi_videoutils_cflags = \ + -DGST_USE_UNSTABLE_API \ + -I$(top_srcdir)/gst-libs \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ + $(NULL) + +libgstvaapi_videoutils_libs = \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ + $(NULL) + +gen_source_c = +gen_source_h = + +if USE_LOCAL_GST_VIDEO_DECODER +gen_source_c += gstvideodecoder.c gstvideoutils.c video.c +gen_source_h += gstvideodecoder.h gstvideoutils.h video.h +endif + +GENFILES = \ + $(gen_source_c) \ + $(gen_source_h) \ + $(NULL) + +nodist_EXTRA_libgstvaapi_videoutils_la_SOURCES = dummy.c + +nodist_libgstvaapi_videoutils_la_SOURCES = \ + $(gen_source_c) \ + $(NULL) + +libgstvaapi_videoutils_la_CFLAGS = \ + $(libgstvaapi_videoutils_cflags) \ + $(NULL) + +libgstvaapi_videoutils_la_LIBADD = \ + $(libgstvaapi_videoutils_libs) \ + $(NULL) + +libgstvaapi_videoutils_la_LDFLAGS = \ + $(GST_ALL_LDFLAGS) \ + $(NULL) + +all-local: .timestamp.symlinks + +.timestamp.symlinks: $(GENFILES) + touch $@ + +$(gen_source_c): %.c: $(local_videoutils_srcdir)/%.c %.h + $(LN_S) -f $< $@ +$(gen_source_h): %.h: $(local_videoutils_srcdir)/%.h + $(LN_S) -f $< $@ + +DISTCLEANFILES = $(GENFILES) .timestamp.symlinks + +# Extra clean files so that maintainer-clean removes *everything* +MAINTAINERCLEANFILES = Makefile.in diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am index 4da267e..df61ad9 100644 --- a/gst/vaapi/Makefile.am +++ b/gst/vaapi/Makefile.am @@ -68,7 +68,8 @@ libgstvaapi_la_LIBADD = \ $(GST_VIDEO_LIBS) \ $(GST_INTERFACES_LIBS) \ $(GST_BASEVIDEO_LIBS) \ - $(GST_PLUGINS_BASE_LIBS) + $(GST_PLUGINS_BASE_LIBS) \ + $(top_builddir)/gst-libs/gst/video/libgstvaapi-videoutils.la libgstvaapi_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstvaapi_la_LIBTOOLFLAGS = --tag=disable-static -- 2.7.4