From 8a1fa31c67a2ff494ed4bce7692815501a6c2f31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 16 Jan 2016 18:56:26 +0200 Subject: [PATCH] audio: Move audioaggregator base class to a library It's useful enough already to be used in other elements for audio aggregation, let's give people the opportunity to use it and give it some API testing. https://bugzilla.gnome.org/show_bug.cgi?id=760733 --- configure.ac | 3 +++ gst-libs/gst/Makefile.am | 6 ++--- gst-libs/gst/audio/Makefile.am | 26 ++++++++++++++++++++++ .../gst/audio}/gstaudioaggregator.c | 0 .../gst/audio}/gstaudioaggregator.h | 0 gst/audiomixer/Makefile.am | 5 +++-- gst/audiomixer/gstaudiointerleave.h | 2 +- gst/audiomixer/gstaudiomixer.h | 2 +- pkgconfig/gstreamer-bad-audio-uninstalled.pc.in | 15 +++++++++++++ pkgconfig/gstreamer-bad-audio.pc.in | 15 +++++++++++++ 10 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 gst-libs/gst/audio/Makefile.am rename {gst/audiomixer => gst-libs/gst/audio}/gstaudioaggregator.c (100%) rename {gst/audiomixer => gst-libs/gst/audio}/gstaudioaggregator.h (100%) create mode 100644 pkgconfig/gstreamer-bad-audio-uninstalled.pc.in create mode 100644 pkgconfig/gstreamer-bad-audio.pc.in diff --git a/configure.ac b/configure.ac index ac21412..186a8c3 100644 --- a/configure.ac +++ b/configure.ac @@ -3570,6 +3570,7 @@ gst-libs/gst/wayland/Makefile gst-libs/gst/base/Makefile gst-libs/gst/player/Makefile gst-libs/gst/video/Makefile +gst-libs/gst/audio/Makefile sys/Makefile sys/dshowdecwrapper/Makefile sys/acmenc/Makefile @@ -3723,6 +3724,8 @@ pkgconfig/gstreamer-bad-base.pc pkgconfig/gstreamer-bad-base-uninstalled.pc pkgconfig/gstreamer-bad-video.pc pkgconfig/gstreamer-bad-video-uninstalled.pc +pkgconfig/gstreamer-bad-audio.pc +pkgconfig/gstreamer-bad-audio-uninstalled.pc tools/Makefile m4/Makefile ) diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am index 732978d..7d0b309 100644 --- a/gst-libs/gst/Makefile.am +++ b/gst-libs/gst/Makefile.am @@ -11,14 +11,14 @@ WAYLAND_DIR=wayland endif SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \ - insertbin mpegts base video player $(GL_DIR) $(WAYLAND_DIR) + insertbin mpegts base video audio player $(GL_DIR) $(WAYLAND_DIR) noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \ - codecparsers insertbin mpegts wayland base video player + codecparsers insertbin mpegts wayland base video audio player #dependencies -video: base +video, audio: base adaptivedemux: uridownloader diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am new file mode 100644 index 0000000..9e0e2e1 --- /dev/null +++ b/gst-libs/gst/audio/Makefile.am @@ -0,0 +1,26 @@ +# variables used for enum generation +lib_LTLIBRARIES = libgstbadaudio-@GST_API_VERSION@.la + +CLEANFILES = + +libgstbadaudio_@GST_API_VERSION@_la_SOURCES = \ + gstaudioaggregator.c + +nodist_libgstbadaudio_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES) + +libgstbadaudio_@GST_API_VERSION@_la_CFLAGS = \ + -DGST_USE_UNSTABLE_API \ + -I$(top_srcdir)/gst-libs \ + -I$(top_builddir)/gst-libs \ + $(GST_CFLAGS) $(ORC_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) + +libgstbadaudio_@GST_API_VERSION@_la_LIBADD = \ + $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \ + $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM) + +libgstbadaudio_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + +noinst_HEADERS = gstaudioaggregator.h diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst-libs/gst/audio/gstaudioaggregator.c similarity index 100% rename from gst/audiomixer/gstaudioaggregator.c rename to gst-libs/gst/audio/gstaudioaggregator.c diff --git a/gst/audiomixer/gstaudioaggregator.h b/gst-libs/gst/audio/gstaudioaggregator.h similarity index 100% rename from gst/audiomixer/gstaudioaggregator.h rename to gst-libs/gst/audio/gstaudioaggregator.h diff --git a/gst/audiomixer/Makefile.am b/gst/audiomixer/Makefile.am index a126f90..9104c1b 100644 --- a/gst/audiomixer/Makefile.am +++ b/gst/audiomixer/Makefile.am @@ -4,7 +4,7 @@ ORC_SOURCE=gstaudiomixerorc include $(top_srcdir)/common/orc.mak -libgstaudiomixer_la_SOURCES = gstaudiomixer.c gstaudioaggregator.c gstaudiointerleave.c +libgstaudiomixer_la_SOURCES = gstaudiomixer.c gstaudiointerleave.c nodist_libgstaudiomixer_la_SOURCES = $(ORC_NODIST_SOURCES) libgstaudiomixer_la_CFLAGS = \ -I$(top_srcdir)/gst-libs \ @@ -14,9 +14,10 @@ libgstaudiomixer_la_CFLAGS = \ libgstaudiomixer_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaudiomixer_la_LIBADD = \ $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \ + $(top_builddir)/gst-libs/gst/audio/libgstbadaudio-$(GST_API_VERSION).la \ $(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \ $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) libgstaudiomixer_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) -noinst_HEADERS = gstaudiomixer.h gstaudioaggregator.h gstaudiointerleave.h +noinst_HEADERS = gstaudiomixer.h gstaudiointerleave.h diff --git a/gst/audiomixer/gstaudiointerleave.h b/gst/audiomixer/gstaudiointerleave.h index 0473b45..6dd82d3 100644 --- a/gst/audiomixer/gstaudiointerleave.h +++ b/gst/audiomixer/gstaudiointerleave.h @@ -27,7 +27,7 @@ #include #include -#include "gstaudioaggregator.h" +#include G_BEGIN_DECLS diff --git a/gst/audiomixer/gstaudiomixer.h b/gst/audiomixer/gstaudiomixer.h index add6e32..0e4098d 100644 --- a/gst/audiomixer/gstaudiomixer.h +++ b/gst/audiomixer/gstaudiomixer.h @@ -26,7 +26,7 @@ #include #include -#include "gstaudioaggregator.h" +#include G_BEGIN_DECLS diff --git a/pkgconfig/gstreamer-bad-audio-uninstalled.pc.in b/pkgconfig/gstreamer-bad-audio-uninstalled.pc.in new file mode 100644 index 0000000..11c3ebb --- /dev/null +++ b/pkgconfig/gstreamer-bad-audio-uninstalled.pc.in @@ -0,0 +1,15 @@ +prefix= +exec_prefix= +libdir=${pcfiledir}/../gst-libs/gst/audio +includedir=${pcfiledir}/../gst-libs +pluginsdir=${pcfiledir}/.. + +Name: GStreamer bad audio library, uninstalled +Description: Bad audio library for GStreamer, Not Installed +Version: @VERSION@ +Requires: gstreamer-@GST_API_VERSION@ + +Libs: -L${libdir} ${libdir}/libgstbadaudio-@GST_API_VERSION@.la @BADBASE_LIBS@ +Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@ + +libraries=badaudio diff --git a/pkgconfig/gstreamer-bad-audio.pc.in b/pkgconfig/gstreamer-bad-audio.pc.in new file mode 100644 index 0000000..e861649 --- /dev/null +++ b/pkgconfig/gstreamer-bad-audio.pc.in @@ -0,0 +1,15 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/gstreamer-@GST_API_VERSION@ +pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@ + +Name: GStreamer bad audio library, uninstalled +Description: Bad audio library for GStreamer elements, Not Installed +Version: @VERSION@ +Requires: gstreamer-@GST_API_VERSION@ + +Libs: -L${libdir} ${libdir}/libgstbadaudio-@GST_API_VERSION@.la @BADBASE_LIBS@ +Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@ + +libraries=badaudio -- 2.7.4