From 4938c2e9ea2613d4049dc01756346bbb055eab70 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 13 Dec 2010 19:36:41 -0300 Subject: [PATCH] camerabin2: Move basecamerasrc to gst-libs Move the base camera src class to gst-libs/gst/basecamerabinsrc to allow it to be included from the tests. --- configure.ac | 1 + gst-libs/gst/Makefile.am | 8 +++++-- gst-libs/gst/basecamerabinsrc/Makefile.am | 26 ++++++++++++++++++++++ .../gst/basecamerabinsrc}/gstbasecamerasrc.c | 0 .../gst/basecamerabinsrc}/gstbasecamerasrc.h | 0 .../gst/basecamerabinsrc}/gstcamerabin-enum.c | 0 .../gst/basecamerabinsrc}/gstcamerabin-enum.h | 0 gst/camerabin2/Makefile.am | 7 ++---- gst/camerabin2/gstcamerabin2.c | 3 +-- gst/camerabin2/gstv4l2camerasrc.c | 1 - gst/camerabin2/gstv4l2camerasrc.h | 2 +- tests/check/Makefile.am | 14 ++++++++++++ tests/check/elements/camerabin2.c | 1 + 13 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 gst-libs/gst/basecamerabinsrc/Makefile.am rename {gst/camerabin2 => gst-libs/gst/basecamerabinsrc}/gstbasecamerasrc.c (100%) rename {gst/camerabin2 => gst-libs/gst/basecamerabinsrc}/gstbasecamerasrc.h (100%) rename {gst/camerabin2 => gst-libs/gst/basecamerabinsrc}/gstcamerabin-enum.c (100%) rename {gst/camerabin2 => gst-libs/gst/basecamerabinsrc}/gstcamerabin-enum.h (100%) diff --git a/configure.ac b/configure.ac index 8e92c68..89cc9cb 100644 --- a/configure.ac +++ b/configure.ac @@ -1781,6 +1781,7 @@ gst/vmnc/Makefile gst/y4m/Makefile gst-libs/Makefile gst-libs/gst/Makefile +gst-libs/gst/basecamerabinsrc/Makefile gst-libs/gst/interfaces/Makefile gst-libs/gst/signalprocessor/Makefile gst-libs/gst/video/Makefile diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am index e48cdd8..561c1f4 100644 --- a/gst-libs/gst/Makefile.am +++ b/gst-libs/gst/Makefile.am @@ -1,5 +1,9 @@ -SUBDIRS = interfaces signalprocessor video +if BUILD_EXPERIMENTAL +EXPERIMENTAL_LIBS=basecamerabinsrc +endif + +SUBDIRS = $(EXPERIMENTAL_LIBS) interfaces signalprocessor video noinst_HEADERS = gst-i18n-plugin.h gettext.h -DIST_SUBDIRS = interfaces signalprocessor video +DIST_SUBDIRS = $(EXPERIMENTAL_LIBS) interfaces signalprocessor video diff --git a/gst-libs/gst/basecamerabinsrc/Makefile.am b/gst-libs/gst/basecamerabinsrc/Makefile.am new file mode 100644 index 0000000..d0b69b5 --- /dev/null +++ b/gst-libs/gst/basecamerabinsrc/Makefile.am @@ -0,0 +1,26 @@ + +lib_LTLIBRARIES = libgstbasecamerabinsrc-@GST_MAJORMINOR@.la + +CLEANFILES = $(BUILT_SOURCES) + +libgstbasecamerabinsrc_@GST_MAJORMINOR@_la_SOURCES = \ + gstcamerabin-enum.c \ + gstbasecamerasrc.c + +libgstbasecamerabinsrc_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/basecamerabinsrc +libgstbasecamerabinsrc_@GST_MAJORMINOR@include_HEADERS = \ + gstcamerabin-enum.h \ + gstbasecamerasrc.h + +libgstbasecamerabinsrc_@GST_MAJORMINOR@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + -DGST_USE_UNSTABLE_API \ + $(GST_CFLAGS) +libgstbasecamerabinsrc_@GST_MAJORMINOR@_la_LIBADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_MAJORMINOR@.la \ + $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) \ + -lgstinterfaces-$(GST_MAJORMINOR) + +libgstbasecamerabinsrc_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + diff --git a/gst/camerabin2/gstbasecamerasrc.c b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c similarity index 100% rename from gst/camerabin2/gstbasecamerasrc.c rename to gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c diff --git a/gst/camerabin2/gstbasecamerasrc.h b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h similarity index 100% rename from gst/camerabin2/gstbasecamerasrc.h rename to gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h diff --git a/gst/camerabin2/gstcamerabin-enum.c b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c similarity index 100% rename from gst/camerabin2/gstcamerabin-enum.c rename to gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c diff --git a/gst/camerabin2/gstcamerabin-enum.h b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.h similarity index 100% rename from gst/camerabin2/gstcamerabin-enum.h rename to gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.h diff --git a/gst/camerabin2/Makefile.am b/gst/camerabin2/Makefile.am index 92229d7..4cb29bf 100644 --- a/gst/camerabin2/Makefile.am +++ b/gst/camerabin2/Makefile.am @@ -4,8 +4,6 @@ libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \ gstimagecapturebin.c \ gstvideorecordingbin.c \ camerabingeneral.c \ - gstbasecamerasrc.c \ - gstcamerabin-enum.c \ gstv4l2camerasrc.c \ gstcamerabin2.c \ gstplugin.c @@ -17,6 +15,7 @@ libgstcamerabin2_la_CFLAGS = \ libgstcamerabin2_la_LIBADD = \ $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-$(GST_MAJORMINOR).la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-$(GST_MAJORMINOR).la \ $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \ -lgstinterfaces-$(GST_MAJORMINOR) -lgsttag-$(GST_MAJORMINOR) @@ -27,7 +26,5 @@ noinst_HEADERS = gstviewfinderbin.h \ gstimagecapturebin.h \ gstvideorecordingbin.h \ camerabingeneral.h \ - gstbasecamerasrc.h \ gstv4l2camerasrc.h \ - gstcamerabin2.h \ - gstcamerabin-enum.h + gstcamerabin2.h diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index f15dddf..ccb4c18 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -49,9 +49,8 @@ #include "config.h" #endif -#include "gstbasecamerasrc.h" +#include #include "gstcamerabin2.h" -#include "gstcamerabin-enum.h" GST_DEBUG_CATEGORY_STATIC (gst_camera_bin_debug); #define GST_CAT_DEFAULT gst_camera_bin_debug diff --git a/gst/camerabin2/gstv4l2camerasrc.c b/gst/camerabin2/gstv4l2camerasrc.c index 451b98f..5ea070b 100644 --- a/gst/camerabin2/gstv4l2camerasrc.c +++ b/gst/camerabin2/gstv4l2camerasrc.c @@ -33,7 +33,6 @@ #include "gstv4l2camerasrc.h" #include "camerabingeneral.h" -#include "gstcamerabin-enum.h" enum { diff --git a/gst/camerabin2/gstv4l2camerasrc.h b/gst/camerabin2/gstv4l2camerasrc.h index 5f476fc..580af28 100644 --- a/gst/camerabin2/gstv4l2camerasrc.h +++ b/gst/camerabin2/gstv4l2camerasrc.h @@ -23,7 +23,7 @@ #define __GST_V4L2_CAMERA_SRC_H__ #include -#include "gstbasecamerasrc.h" +#include G_BEGIN_DECLS #define GST_TYPE_V4L2_CAMERA_SRC \ diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 48052a1..864ce08 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -197,6 +197,20 @@ elements_camerabin_LDADD = \ -lgstinterfaces-@GST_MAJORMINOR@ elements_camerabin_SOURCES = elements/camerabin.c +if BUILD_EXPERIMENTAL +elements_camerabin2_CFLAGS = \ + -I$(top_builddir)/gst-libs \ + $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_PLUGINS_BAD_CFLAGS) $(GST_CHECK_CFLAGS) \ + -DGST_USE_UNSTABLE_API +elements_camerabin2_LDADD = \ + $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_MAJORMINOR@.la \ + $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \ + $(GST_CHECK_LIBS) +elements_camerabin2_SOURCES = elements/camerabin2.c +endif + elements_jifmux_CFLAGS = $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) $(AM_CFLAGS) $(EXIF_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) elements_jifmux_LDADD = $(GST_CHECK_LIBS) $(EXIF_LIBS) $(LDADD) $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) elements_jifmux_SOURCES = elements/jifmux.c diff --git a/tests/check/elements/camerabin2.c b/tests/check/elements/camerabin2.c index 4f46e0c..95d1727 100644 --- a/tests/check/elements/camerabin2.c +++ b/tests/check/elements/camerabin2.c @@ -29,6 +29,7 @@ #include #include #include +#include #define IMAGE_FILENAME "image" #define VIDEO_FILENAME "video" -- 2.7.4