diff options
Diffstat (limited to 'wearable/sys/osxaudio')
-rw-r--r-- | wearable/sys/osxaudio/Makefile.am | 26 | ||||
-rw-r--r-- | wearable/sys/osxaudio/Makefile.in | 858 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudio.c | 53 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudioelement.c | 92 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudioelement.h | 84 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudiosink.c | 348 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudiosink.h | 86 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudiosrc.c | 362 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxaudiosrc.h | 82 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxringbuffer.c | 689 | ||||
-rw-r--r-- | wearable/sys/osxaudio/gstosxringbuffer.h | 94 |
11 files changed, 0 insertions, 2774 deletions
diff --git a/wearable/sys/osxaudio/Makefile.am b/wearable/sys/osxaudio/Makefile.am deleted file mode 100644 index cfd0c4d..0000000 --- a/wearable/sys/osxaudio/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -plugin_LTLIBRARIES = libgstosxaudio.la - -libgstosxaudio_la_SOURCES = gstosxringbuffer.c \ - gstosxaudioelement.c \ - gstosxaudiosink.c \ - gstosxaudiosrc.c \ - gstosxaudio.c - -libgstosxaudio_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ - -Wno-deprecated-declarations -libgstosxaudio_la_LIBADD = \ - -lgstinterfaces-@GST_MAJORMINOR@ \ - -lgstaudio-@GST_MAJORMINOR@ \ - $(GST_PLUGINS_BASE_LIBS) \ - $(GST_BASE_LIBS) \ - $(GST_LIBS) -libgstosxaudio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework -Wl,CoreAudio -Wl,-framework -Wl,AudioUnit -Wl,-framework -Wl,CoreServices -libgstosxaudio_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = gstosxaudiosink.h \ - gstosxaudioelement.h \ - gstosxringbuffer.h \ - gstosxaudiosrc.h - - - diff --git a/wearable/sys/osxaudio/Makefile.in b/wearable/sys/osxaudio/Makefile.in deleted file mode 100644 index 9e8e186..0000000 --- a/wearable/sys/osxaudio/Makefile.in +++ /dev/null @@ -1,858 +0,0 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = sys/osxaudio -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ - $(top_srcdir)/common/m4/as-auto-alt.m4 \ - $(top_srcdir)/common/m4/as-compiler-flag.m4 \ - $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \ - $(top_srcdir)/common/m4/as-objc.m4 \ - $(top_srcdir)/common/m4/as-python.m4 \ - $(top_srcdir)/common/m4/as-scrub-include.m4 \ - $(top_srcdir)/common/m4/as-version.m4 \ - $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/common/m4/gst-arch.m4 \ - $(top_srcdir)/common/m4/gst-args.m4 \ - $(top_srcdir)/common/m4/gst-check.m4 \ - $(top_srcdir)/common/m4/gst-default.m4 \ - $(top_srcdir)/common/m4/gst-dowhile.m4 \ - $(top_srcdir)/common/m4/gst-error.m4 \ - $(top_srcdir)/common/m4/gst-feature.m4 \ - $(top_srcdir)/common/m4/gst-gettext.m4 \ - $(top_srcdir)/common/m4/gst-glib2.m4 \ - $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ - $(top_srcdir)/common/m4/gst-platform.m4 \ - $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ - $(top_srcdir)/common/m4/gst-plugindir.m4 \ - $(top_srcdir)/common/m4/gst-x11.m4 \ - $(top_srcdir)/common/m4/gst.m4 \ - $(top_srcdir)/common/m4/gtk-doc.m4 \ - $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ - $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \ - $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(plugindir)" -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libgstosxaudio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_libgstosxaudio_la_OBJECTS = libgstosxaudio_la-gstosxringbuffer.lo \ - libgstosxaudio_la-gstosxaudioelement.lo \ - libgstosxaudio_la-gstosxaudiosink.lo \ - libgstosxaudio_la-gstosxaudiosrc.lo \ - libgstosxaudio_la-gstosxaudio.lo -libgstosxaudio_la_OBJECTS = $(am_libgstosxaudio_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -libgstosxaudio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CCLD) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) \ - $(libgstosxaudio_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libgstosxaudio_la_SOURCES) -DIST_SOURCES = $(libgstosxaudio_la_SOURCES) -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -AALIB_CFLAGS = @AALIB_CFLAGS@ -AALIB_CONFIG = @AALIB_CONFIG@ -AALIB_LIBS = @AALIB_LIBS@ -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -ANNODEX_CFLAGS = @ANNODEX_CFLAGS@ -ANNODEX_LIBS = @ANNODEX_LIBS@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BZ2_LIBS = @BZ2_LIBS@ -CAIRO_CFLAGS = @CAIRO_CFLAGS@ -CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@ -CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@ -CAIRO_LIBS = @CAIRO_LIBS@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ -DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ -DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ -DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ -DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ -DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@ -DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@ -DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -DV1394_CFLAGS = @DV1394_CFLAGS@ -DV1394_LIBS = @DV1394_LIBS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ERROR_CFLAGS = @ERROR_CFLAGS@ -ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ -ESD_CFLAGS = @ESD_CFLAGS@ -ESD_CONFIG = @ESD_CONFIG@ -ESD_LIBS = @ESD_LIBS@ -EXEEXT = @EXEEXT@ -FFLAGS = @FFLAGS@ -FGREP = @FGREP@ -FLAC_CFLAGS = @FLAC_CFLAGS@ -FLAC_LIBS = @FLAC_LIBS@ -GCONFTOOL = @GCONFTOOL@ -GCONF_CFLAGS = @GCONF_CFLAGS@ -GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ -GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ -GCOV = @GCOV@ -GCOV_CFLAGS = @GCOV_CFLAGS@ -GCOV_LIBS = @GCOV_LIBS@ -GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ -GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GLIB_PREFIX = @GLIB_PREFIX@ -GLIB_REQ = @GLIB_REQ@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ -GSTPB_PREFIX = @GSTPB_PREFIX@ -GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ -GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ -GST_BASE_LIBS = @GST_BASE_LIBS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ -GST_CHECK_LIBS = @GST_CHECK_LIBS@ -GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@ -GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@ -GST_CXXFLAGS = @GST_CXXFLAGS@ -GST_GDP_CFLAGS = @GST_GDP_CFLAGS@ -GST_GDP_LIBS = @GST_GDP_LIBS@ -GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ -GST_LIBS = @GST_LIBS@ -GST_LICENSE = @GST_LICENSE@ -GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ -GST_MAJORMINOR = @GST_MAJORMINOR@ -GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ -GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ -GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ -GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ -GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ -GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ -GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ -GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ -GST_PREFIX = @GST_PREFIX@ -GST_TOOLS_DIR = @GST_TOOLS_DIR@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -GTK_X11_CFLAGS = @GTK_X11_CFLAGS@ -GTK_X11_LIBS = @GTK_X11_LIBS@ -GUDEV_CFLAGS = @GUDEV_CFLAGS@ -GUDEV_LIBS = @GUDEV_LIBS@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -HAVE_AVC1394 = @HAVE_AVC1394@ -HAVE_BZ2 = @HAVE_BZ2@ -HAVE_CXX = @HAVE_CXX@ -HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@ -HAVE_GCONFTOOL = @HAVE_GCONFTOOL@ -HAVE_ROM1394 = @HAVE_ROM1394@ -HAVE_SPEEX = @HAVE_SPEEX@ -HAVE_X = @HAVE_X@ -HAVE_XSHM = @HAVE_XSHM@ -HAVE_ZLIB = @HAVE_ZLIB@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@ -JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@ -JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@ -JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ -JPEG_LIBS = @JPEG_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBCACA_CFLAGS = @LIBCACA_CFLAGS@ -LIBCACA_LIBS = @LIBCACA_LIBS@ -LIBDV_CFLAGS = @LIBDV_CFLAGS@ -LIBDV_LIBS = @LIBDV_LIBS@ -LIBICONV = @LIBICONV@ -LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@ -LIBIEC61883_LIBS = @LIBIEC61883_LIBS@ -LIBINTL = @LIBINTL@ -LIBM = @LIBM@ -LIBOBJS = @LIBOBJS@ -LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ -LIBPNG_LIBS = @LIBPNG_LIBS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@ -LIBV4L2_LIBS = @LIBV4L2_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALEDIR = @LOCALEDIR@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJC_LDFLAGS = @OBJC_LDFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ORCC = @ORCC@ -ORCC_FLAGS = @ORCC_FLAGS@ -ORC_CFLAGS = @ORC_CFLAGS@ -ORC_LIBS = @ORC_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ -PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ -PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ -PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ -PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLUGINDIR = @PLUGINDIR@ -POSUB = @POSUB@ -PROFILE_CFLAGS = @PROFILE_CFLAGS@ -PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@ -PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@ -PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@ -PULSE_1_0_LIBS = @PULSE_1_0_LIBS@ -PULSE_CFLAGS = @PULSE_CFLAGS@ -PULSE_LIBS = @PULSE_LIBS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -RAW1394_CFLAGS = @RAW1394_CFLAGS@ -RAW1394_LIBS = @RAW1394_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHOUT2_CFLAGS = @SHOUT2_CFLAGS@ -SHOUT2_LIBS = @SHOUT2_LIBS@ -SOUP_CFLAGS = @SOUP_CFLAGS@ -SOUP_LIBS = @SOUP_LIBS@ -SPEEX_CFLAGS = @SPEEX_CFLAGS@ -SPEEX_LIBS = @SPEEX_LIBS@ -STRIP = @STRIP@ -TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ -TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@ -TAGLIB_LIBS = @TAGLIB_LIBS@ -USE_NLS = @USE_NLS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VALGRIND_PATH = @VALGRIND_PATH@ -VERSION = @VERSION@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -WAVPACK_CFLAGS = @WAVPACK_CFLAGS@ -WAVPACK_LIBS = @WAVPACK_LIBS@ -WIN32_LIBS = @WIN32_LIBS@ -XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ -XDAMAGE_LIBS = @XDAMAGE_LIBS@ -XFIXES_CFLAGS = @XFIXES_CFLAGS@ -XFIXES_LIBS = @XFIXES_LIBS@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -XMKMF = @XMKMF@ -XSHM_LIBS = @XSHM_LIBS@ -XVIDEO_LIBS = @XVIDEO_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -plugindir = @plugindir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugin_LTLIBRARIES = libgstosxaudio.la -libgstosxaudio_la_SOURCES = gstosxringbuffer.c \ - gstosxaudioelement.c \ - gstosxaudiosink.c \ - gstosxaudiosrc.c \ - gstosxaudio.c - -libgstosxaudio_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ - -Wno-deprecated-declarations - -libgstosxaudio_la_LIBADD = \ - -lgstinterfaces-@GST_MAJORMINOR@ \ - -lgstaudio-@GST_MAJORMINOR@ \ - $(GST_PLUGINS_BASE_LIBS) \ - $(GST_BASE_LIBS) \ - $(GST_LIBS) - -libgstosxaudio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,-framework -Wl,CoreAudio -Wl,-framework -Wl,AudioUnit -Wl,-framework -Wl,CoreServices -libgstosxaudio_la_LIBTOOLFLAGS = --tag=disable-static -noinst_HEADERS = gstosxaudiosink.h \ - gstosxaudioelement.h \ - gstosxringbuffer.h \ - gstosxaudiosrc.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sys/osxaudio/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu sys/osxaudio/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ - } - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libgstosxaudio.la: $(libgstosxaudio_la_OBJECTS) $(libgstosxaudio_la_DEPENDENCIES) $(EXTRA_libgstosxaudio_la_DEPENDENCIES) - $(AM_V_CCLD)$(libgstosxaudio_la_LINK) -rpath $(plugindir) $(libgstosxaudio_la_OBJECTS) $(libgstosxaudio_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxaudio_la-gstosxaudio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxaudio_la-gstosxaudioelement.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxaudio_la-gstosxaudiosink.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxaudio_la-gstosxaudiosrc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstosxaudio_la-gstosxringbuffer.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -libgstosxaudio_la-gstosxringbuffer.lo: gstosxringbuffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -MT libgstosxaudio_la-gstosxringbuffer.lo -MD -MP -MF $(DEPDIR)/libgstosxaudio_la-gstosxringbuffer.Tpo -c -o libgstosxaudio_la-gstosxringbuffer.lo `test -f 'gstosxringbuffer.c' || echo '$(srcdir)/'`gstosxringbuffer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxaudio_la-gstosxringbuffer.Tpo $(DEPDIR)/libgstosxaudio_la-gstosxringbuffer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstosxringbuffer.c' object='libgstosxaudio_la-gstosxringbuffer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -c -o libgstosxaudio_la-gstosxringbuffer.lo `test -f 'gstosxringbuffer.c' || echo '$(srcdir)/'`gstosxringbuffer.c - -libgstosxaudio_la-gstosxaudioelement.lo: gstosxaudioelement.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -MT libgstosxaudio_la-gstosxaudioelement.lo -MD -MP -MF $(DEPDIR)/libgstosxaudio_la-gstosxaudioelement.Tpo -c -o libgstosxaudio_la-gstosxaudioelement.lo `test -f 'gstosxaudioelement.c' || echo '$(srcdir)/'`gstosxaudioelement.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxaudio_la-gstosxaudioelement.Tpo $(DEPDIR)/libgstosxaudio_la-gstosxaudioelement.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstosxaudioelement.c' object='libgstosxaudio_la-gstosxaudioelement.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -c -o libgstosxaudio_la-gstosxaudioelement.lo `test -f 'gstosxaudioelement.c' || echo '$(srcdir)/'`gstosxaudioelement.c - -libgstosxaudio_la-gstosxaudiosink.lo: gstosxaudiosink.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -MT libgstosxaudio_la-gstosxaudiosink.lo -MD -MP -MF $(DEPDIR)/libgstosxaudio_la-gstosxaudiosink.Tpo -c -o libgstosxaudio_la-gstosxaudiosink.lo `test -f 'gstosxaudiosink.c' || echo '$(srcdir)/'`gstosxaudiosink.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxaudio_la-gstosxaudiosink.Tpo $(DEPDIR)/libgstosxaudio_la-gstosxaudiosink.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstosxaudiosink.c' object='libgstosxaudio_la-gstosxaudiosink.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -c -o libgstosxaudio_la-gstosxaudiosink.lo `test -f 'gstosxaudiosink.c' || echo '$(srcdir)/'`gstosxaudiosink.c - -libgstosxaudio_la-gstosxaudiosrc.lo: gstosxaudiosrc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -MT libgstosxaudio_la-gstosxaudiosrc.lo -MD -MP -MF $(DEPDIR)/libgstosxaudio_la-gstosxaudiosrc.Tpo -c -o libgstosxaudio_la-gstosxaudiosrc.lo `test -f 'gstosxaudiosrc.c' || echo '$(srcdir)/'`gstosxaudiosrc.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxaudio_la-gstosxaudiosrc.Tpo $(DEPDIR)/libgstosxaudio_la-gstosxaudiosrc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstosxaudiosrc.c' object='libgstosxaudio_la-gstosxaudiosrc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -c -o libgstosxaudio_la-gstosxaudiosrc.lo `test -f 'gstosxaudiosrc.c' || echo '$(srcdir)/'`gstosxaudiosrc.c - -libgstosxaudio_la-gstosxaudio.lo: gstosxaudio.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -MT libgstosxaudio_la-gstosxaudio.lo -MD -MP -MF $(DEPDIR)/libgstosxaudio_la-gstosxaudio.Tpo -c -o libgstosxaudio_la-gstosxaudio.lo `test -f 'gstosxaudio.c' || echo '$(srcdir)/'`gstosxaudio.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstosxaudio_la-gstosxaudio.Tpo $(DEPDIR)/libgstosxaudio_la-gstosxaudio.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstosxaudio.c' object='libgstosxaudio_la-gstosxaudio.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstosxaudio_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstosxaudio_la_CFLAGS) $(CFLAGS) -c -o libgstosxaudio_la-gstosxaudio.lo `test -f 'gstosxaudio.c' || echo '$(srcdir)/'`gstosxaudio.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/wearable/sys/osxaudio/gstosxaudio.c b/wearable/sys/osxaudio/gstosxaudio.c deleted file mode 100644 index 1ddfce4..0000000 --- a/wearable/sys/osxaudio/gstosxaudio.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * GStreamer - * Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu> - * Copyright (C) 2007,2008 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * The development of this code was made possible due to the involvement of - * Pioneers of the Inevitable, the creators of the Songbird Music player - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstosxaudioelement.h" -#include "gstosxaudiosink.h" -#include "gstosxaudiosrc.h" - -static gboolean -plugin_init (GstPlugin * plugin) -{ - if (!gst_element_register (plugin, "osxaudiosink", GST_RANK_PRIMARY, - GST_TYPE_OSX_AUDIO_SINK)) { - return FALSE; - } - if (!gst_element_register (plugin, "osxaudiosrc", GST_RANK_PRIMARY, - GST_TYPE_OSX_AUDIO_SRC)) { - return FALSE; - } - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "osxaudio", - "OSX (Mac OS X) audio support for GStreamer", - plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/wearable/sys/osxaudio/gstosxaudioelement.c b/wearable/sys/osxaudio/gstosxaudioelement.c deleted file mode 100644 index a41f4b8..0000000 --- a/wearable/sys/osxaudio/gstosxaudioelement.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * The development of this code was made possible due to the involvement of - * Pioneers of the Inevitable, the creators of the Songbird Music player - * - */ - -#include <gst/gst.h> -#include "gstosxaudioelement.h" - -static void -gst_osx_audio_element_class_init (GstOsxAudioElementInterface * klass); - -GType -gst_osx_audio_element_get_type (void) -{ - static GType gst_osxaudioelement_type = 0; - - if (!gst_osxaudioelement_type) { - static const GTypeInfo gst_osxaudioelement_info = { - sizeof (GstOsxAudioElementInterface), - (GBaseInitFunc) gst_osx_audio_element_class_init, - NULL, - NULL, - NULL, - NULL, - 0, - 0, - NULL, - NULL - }; - - gst_osxaudioelement_type = g_type_register_static (G_TYPE_INTERFACE, - "GstOsxAudioElement", &gst_osxaudioelement_info, 0); - } - - return gst_osxaudioelement_type; -} - -static void -gst_osx_audio_element_class_init (GstOsxAudioElementInterface * klass) -{ - static gboolean initialized = FALSE; - - if (!initialized) { - initialized = TRUE; - } - - /* default virtual functions */ - klass->io_proc = NULL; -} diff --git a/wearable/sys/osxaudio/gstosxaudioelement.h b/wearable/sys/osxaudio/gstosxaudioelement.h deleted file mode 100644 index b5d90c0..0000000 --- a/wearable/sys/osxaudio/gstosxaudioelement.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * The development of this code was made possible due to the involvement of - * Pioneers of the Inevitable, the creators of the Songbird Music player - * - */ - -#ifndef __GST_OSX_AUDIO_ELEMENT_H__ -#define __GST_OSX_AUDIO_ELEMENT_H__ - -#include <gst/gst.h> -#include <CoreAudio/CoreAudio.h> -#include <AudioUnit/AudioUnit.h> - -G_BEGIN_DECLS - -#define GST_OSX_AUDIO_ELEMENT_TYPE \ - (gst_osx_audio_element_get_type()) -#define GST_OSX_AUDIO_ELEMENT(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_OSX_AUDIO_ELEMENT_TYPE,GstOsxAudioElementInterface)) -#define GST_IS_OSX_AUDIO_ELEMENT(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_OSX_AUDIO_ELEMENT_TYPE)) -#define GST_OSX_AUDIO_ELEMENT_GET_INTERFACE(inst) \ - (G_TYPE_INSTANCE_GET_INTERFACE((inst),GST_OSX_AUDIO_ELEMENT_TYPE,GstOsxAudioElementInterface)) - -typedef struct _GstOsxAudioElementInterface GstOsxAudioElementInterface; - -struct _GstOsxAudioElementInterface -{ - GTypeInterface parent; - - OSStatus (*io_proc) (void * userdata, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inBusNumber, UInt32 inNumberFrames, - AudioBufferList * bufferList); -}; - -GType gst_osx_audio_element_get_type (void); - -G_END_DECLS - -#endif /* __GST_OSX_AUDIO_ELEMENT_H__ */ diff --git a/wearable/sys/osxaudio/gstosxaudiosink.c b/wearable/sys/osxaudio/gstosxaudiosink.c deleted file mode 100644 index cd456e5..0000000 --- a/wearable/sys/osxaudio/gstosxaudiosink.c +++ /dev/null @@ -1,348 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005,2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2007,2008 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * The development of this code was made possible due to the involvement of - * Pioneers of the Inevitable, the creators of the Songbird Music player - * - */ - -/** - * SECTION:element-osxaudiosink - * - * This element renders raw audio samples using the CoreAudio api. - * - * <refsect2> - * <title>Example pipelines</title> - * |[ - * gst-launch filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! osxaudiosink - * ]| Play an Ogg/Vorbis file. - * </refsect2> - * - * Last reviewed on 2006-03-01 (0.10.4) - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <gst/gst.h> -#include <CoreAudio/CoreAudio.h> -#include <CoreAudio/AudioHardware.h> -#include "gstosxaudiosink.h" -#include "gstosxaudioelement.h" - -GST_DEBUG_CATEGORY_STATIC (osx_audiosink_debug); -#define GST_CAT_DEFAULT osx_audiosink_debug - -/* Filter signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - -enum -{ - ARG_0, - ARG_DEVICE, - ARG_VOLUME -}; - -#define DEFAULT_VOLUME 1.0 - -static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-raw-float, " - "endianness = (int) {" G_STRINGIFY (G_BYTE_ORDER) " }, " - "signed = (boolean) { TRUE }, " - "width = (int) 32, " - "depth = (int) 32, " - "rate = (int) [1, MAX], " "channels = (int) [1, MAX]") - ); - -static void gst_osx_audio_sink_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_osx_audio_sink_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); - -static GstRingBuffer *gst_osx_audio_sink_create_ringbuffer (GstBaseAudioSink * - sink); -static void gst_osx_audio_sink_osxelement_init (gpointer g_iface, - gpointer iface_data); -static void gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink); -static void gst_osx_audio_sink_set_volume (GstOsxAudioSink * sink); - -static OSStatus gst_osx_audio_sink_io_proc (GstOsxRingBuffer * buf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * bufferList); - -static void -gst_osx_audio_sink_do_init (GType type) -{ - static const GInterfaceInfo osxelement_info = { - gst_osx_audio_sink_osxelement_init, - NULL, - NULL - }; - - GST_DEBUG_CATEGORY_INIT (osx_audiosink_debug, "osxaudiosink", 0, - "OSX Audio Sink"); - GST_DEBUG ("Adding static interface"); - g_type_add_interface_static (type, GST_OSX_AUDIO_ELEMENT_TYPE, - &osxelement_info); -} - -GST_BOILERPLATE_FULL (GstOsxAudioSink, gst_osx_audio_sink, GstBaseAudioSink, - GST_TYPE_BASE_AUDIO_SINK, gst_osx_audio_sink_do_init); - -static void -gst_osx_audio_sink_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_static_pad_template (element_class, &sink_factory); - - gst_element_class_set_details_simple (element_class, "Audio Sink (OSX)", - "Sink/Audio", - "Output to a sound card in OS X", - "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); -} - -static void -gst_osx_audio_sink_class_init (GstOsxAudioSinkClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - GstBaseSinkClass *gstbasesink_class; - GstBaseAudioSinkClass *gstbaseaudiosink_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - gstbasesink_class = (GstBaseSinkClass *) klass; - gstbaseaudiosink_class = (GstBaseAudioSinkClass *) klass; - - parent_class = g_type_class_peek_parent (klass); - - gobject_class->set_property = gst_osx_audio_sink_set_property; - gobject_class->get_property = gst_osx_audio_sink_get_property; - - g_object_class_install_property (gobject_class, ARG_DEVICE, - g_param_spec_int ("device", "Device ID", "Device ID of output device", - 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, ARG_VOLUME, - g_param_spec_double ("volume", "Volume", "Volume of this stream", - 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - gstbaseaudiosink_class->create_ringbuffer = - GST_DEBUG_FUNCPTR (gst_osx_audio_sink_create_ringbuffer); -} - -static void -gst_osx_audio_sink_init (GstOsxAudioSink * sink, GstOsxAudioSinkClass * gclass) -{ - GST_DEBUG ("Initialising object"); - - sink->device_id = kAudioDeviceUnknown; - sink->volume = DEFAULT_VOLUME; -} - -static void -gst_osx_audio_sink_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstOsxAudioSink *sink = GST_OSX_AUDIO_SINK (object); - - switch (prop_id) { - case ARG_DEVICE: - sink->device_id = g_value_get_int (value); - break; - case ARG_VOLUME: - sink->volume = g_value_get_double (value); - gst_osx_audio_sink_set_volume (sink); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_osx_audio_sink_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstOsxAudioSink *sink = GST_OSX_AUDIO_SINK (object); - switch (prop_id) { - case ARG_DEVICE: - g_value_set_int (value, sink->device_id); - break; - case ARG_VOLUME: - g_value_set_double (value, sink->volume); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static GstRingBuffer * -gst_osx_audio_sink_create_ringbuffer (GstBaseAudioSink * sink) -{ - GstOsxAudioSink *osxsink; - GstOsxRingBuffer *ringbuffer; - - osxsink = GST_OSX_AUDIO_SINK (sink); - - gst_osx_audio_sink_select_device (osxsink); - - GST_DEBUG ("Creating ringbuffer"); - ringbuffer = g_object_new (GST_TYPE_OSX_RING_BUFFER, NULL); - GST_DEBUG ("osx sink 0x%p element 0x%p ioproc 0x%p", osxsink, - GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsink), - (void *) gst_osx_audio_sink_io_proc); - - gst_osx_audio_sink_set_volume (osxsink); - - ringbuffer->element = GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsink); - ringbuffer->device_id = osxsink->device_id; - - return GST_RING_BUFFER (ringbuffer); -} - -/* HALOutput AudioUnit will request fairly arbitrarily-sized chunks of data, - * not of a fixed size. So, we keep track of where in the current ringbuffer - * segment we are, and only advance the segment once we've read the whole - * thing */ -static OSStatus -gst_osx_audio_sink_io_proc (GstOsxRingBuffer * buf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * bufferList) -{ - guint8 *readptr; - gint readseg; - gint len; - gint remaining = bufferList->mBuffers[0].mDataByteSize; - gint offset = 0; - - while (remaining) { - if (!gst_ring_buffer_prepare_read (GST_RING_BUFFER (buf), - &readseg, &readptr, &len)) - return 0; - - len -= buf->segoffset; - - if (len > remaining) - len = remaining; - - memcpy ((char *) bufferList->mBuffers[0].mData + offset, - readptr + buf->segoffset, len); - - buf->segoffset += len; - offset += len; - remaining -= len; - - if ((gint) buf->segoffset == GST_RING_BUFFER (buf)->spec.segsize) { - /* clear written samples */ - gst_ring_buffer_clear (GST_RING_BUFFER (buf), readseg); - - /* we wrote one segment */ - gst_ring_buffer_advance (GST_RING_BUFFER (buf), 1); - - buf->segoffset = 0; - } - } - return 0; -} - -static void -gst_osx_audio_sink_osxelement_init (gpointer g_iface, gpointer iface_data) -{ - GstOsxAudioElementInterface *iface = (GstOsxAudioElementInterface *) g_iface; - - iface->io_proc = (AURenderCallback) gst_osx_audio_sink_io_proc; -} - -static void -gst_osx_audio_sink_set_volume (GstOsxAudioSink * sink) -{ - if (!sink->audiounit) - return; - - AudioUnitSetParameter (sink->audiounit, kHALOutputParam_Volume, - kAudioUnitScope_Global, 0, (float) sink->volume, 0); -} - -static void -gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink) -{ - OSStatus status; - UInt32 propertySize; - - if (osxsink->device_id == kAudioDeviceUnknown) { - /* If no specific device has been selected by the user, then pick the - * default device */ - GST_DEBUG_OBJECT (osxsink, "Selecting device for OSXAudioSink"); - propertySize = sizeof (osxsink->device_id); - status = - AudioHardwareGetProperty (kAudioHardwarePropertyDefaultOutputDevice, - &propertySize, &osxsink->device_id); - - if (status) { - GST_WARNING_OBJECT (osxsink, - "AudioHardwareGetProperty returned %d", (int) status); - } else { - GST_DEBUG_OBJECT (osxsink, "AudioHardwareGetProperty returned 0"); - } - - if (osxsink->device_id == kAudioDeviceUnknown) { - GST_WARNING_OBJECT (osxsink, - "AudioHardwareGetProperty: device_id is kAudioDeviceUnknown"); - } - - GST_DEBUG_OBJECT (osxsink, "AudioHardwareGetProperty: device_id is %lu", - (long) osxsink->device_id); - } -} diff --git a/wearable/sys/osxaudio/gstosxaudiosink.h b/wearable/sys/osxaudio/gstosxaudiosink.h deleted file mode 100644 index aac9719..0000000 --- a/wearable/sys/osxaudio/gstosxaudiosink.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005-2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * The development of this code was made possible due to the involvement of - * Pioneers of the Inevitable, the creators of the Songbird Music player - * - */ - -#ifndef __GST_OSXAUDIOSINK_H__ -#define __GST_OSXAUDIOSINK_H__ - -#include <gst/gst.h> -#include <gst/audio/gstbaseaudiosink.h> -#include "gstosxringbuffer.h" - -G_BEGIN_DECLS - -#define GST_TYPE_OSX_AUDIO_SINK \ - (gst_osx_audio_sink_get_type()) -#define GST_OSX_AUDIO_SINK(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_AUDIO_SINK,GstOsxAudioSink)) -#define GST_OSX_AUDIO_SINK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_AUDIO_SINK,GstOsxAudioSinkClass)) - -typedef struct _GstOsxAudioSink GstOsxAudioSink; -typedef struct _GstOsxAudioSinkClass GstOsxAudioSinkClass; - -struct _GstOsxAudioSink -{ - GstBaseAudioSink sink; - - AudioDeviceID device_id; - AudioUnit audiounit; - double volume; -}; - -struct _GstOsxAudioSinkClass -{ - GstBaseAudioSinkClass parent_class; -}; - -GType gst_osx_audio_sink_get_type (void); - -G_END_DECLS - -#endif /* __GST_OSXAUDIOSINK_H__ */ diff --git a/wearable/sys/osxaudio/gstosxaudiosrc.c b/wearable/sys/osxaudio/gstosxaudiosrc.c deleted file mode 100644 index 7e9ad24..0000000 --- a/wearable/sys/osxaudio/gstosxaudiosrc.c +++ /dev/null @@ -1,362 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005,2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2008 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/** - * SECTION:element-osxaudiosrc - * - * This element captures raw audio samples using the CoreAudio api. - * - * <refsect2> - * <title>Example launch line</title> - * |[ - * gst-launch osxaudiosrc ! wavenc ! filesink location=audio.wav - * ]| - * </refsect2> - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <gst/gst.h> -#include <CoreAudio/CoreAudio.h> -#include <CoreAudio/AudioHardware.h> -#include "gstosxaudiosrc.h" -#include "gstosxaudioelement.h" - -GST_DEBUG_CATEGORY_STATIC (osx_audiosrc_debug); -#define GST_CAT_DEFAULT osx_audiosrc_debug - -/* Filter signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - -enum -{ - ARG_0, - ARG_DEVICE -}; - -static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-raw-float, " - "endianness = (int) {" G_STRINGIFY (G_BYTE_ORDER) " }, " - "signed = (boolean) { TRUE }, " - "width = (int) 32, " - "depth = (int) 32, " - "rate = (int) [1, MAX], " "channels = (int) [1, MAX]") - ); - -static void gst_osx_audio_src_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_osx_audio_src_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); - -static GstCaps *gst_osx_audio_src_get_caps (GstBaseSrc * src); - -static GstRingBuffer *gst_osx_audio_src_create_ringbuffer (GstBaseAudioSrc * - src); -static void gst_osx_audio_src_osxelement_init (gpointer g_iface, - gpointer iface_data); -static OSStatus gst_osx_audio_src_io_proc (GstOsxRingBuffer * buf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, UInt32 inBusNumber, - UInt32 inNumberFrames, AudioBufferList * bufferList); -static void gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc); - -static void -gst_osx_audio_src_do_init (GType type) -{ - static const GInterfaceInfo osxelement_info = { - gst_osx_audio_src_osxelement_init, - NULL, - NULL - }; - - GST_DEBUG_CATEGORY_INIT (osx_audiosrc_debug, "osxaudiosrc", 0, - "OSX Audio Src"); - GST_DEBUG ("Adding static interface"); - g_type_add_interface_static (type, GST_OSX_AUDIO_ELEMENT_TYPE, - &osxelement_info); -} - -GST_BOILERPLATE_FULL (GstOsxAudioSrc, gst_osx_audio_src, GstBaseAudioSrc, - GST_TYPE_BASE_AUDIO_SRC, gst_osx_audio_src_do_init); - -static void -gst_osx_audio_src_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_static_pad_template (element_class, &src_factory); - - gst_element_class_set_details_simple (element_class, "Audio Source (OSX)", - "Source/Audio", - "Input from a sound card in OS X", - "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); -} - -static void -gst_osx_audio_src_class_init (GstOsxAudioSrcClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - GstBaseSrcClass *gstbasesrc_class; - GstBaseAudioSrcClass *gstbaseaudiosrc_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - gstbasesrc_class = (GstBaseSrcClass *) klass; - gstbaseaudiosrc_class = (GstBaseAudioSrcClass *) klass; - - parent_class = g_type_class_peek_parent (klass); - - gobject_class->set_property = gst_osx_audio_src_set_property; - gobject_class->get_property = gst_osx_audio_src_get_property; - - gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_osx_audio_src_get_caps); - - g_object_class_install_property (gobject_class, ARG_DEVICE, - g_param_spec_int ("device", "Device ID", "Device ID of input device", - 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - gstbaseaudiosrc_class->create_ringbuffer = - GST_DEBUG_FUNCPTR (gst_osx_audio_src_create_ringbuffer); -} - -static void -gst_osx_audio_src_init (GstOsxAudioSrc * src, GstOsxAudioSrcClass * gclass) -{ - gst_base_src_set_live (GST_BASE_SRC (src), TRUE); - - src->device_id = kAudioDeviceUnknown; - src->deviceChannels = -1; -} - -static void -gst_osx_audio_src_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstOsxAudioSrc *src = GST_OSX_AUDIO_SRC (object); - - switch (prop_id) { - case ARG_DEVICE: - src->device_id = g_value_get_int (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_osx_audio_src_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstOsxAudioSrc *src = GST_OSX_AUDIO_SRC (object); - - switch (prop_id) { - case ARG_DEVICE: - g_value_set_int (value, src->device_id); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static GstCaps * -gst_osx_audio_src_get_caps (GstBaseSrc * src) -{ - GstElementClass *gstelement_class; - GstOsxAudioSrc *osxsrc; - GstPadTemplate *pad_template; - GstCaps *caps; - gint min, max; - - gstelement_class = GST_ELEMENT_GET_CLASS (src); - osxsrc = GST_OSX_AUDIO_SRC (src); - - if (osxsrc->deviceChannels == -1) { - /* -1 means we don't know the number of channels yet. for now, return - * template caps. - */ - return NULL; - } - - max = osxsrc->deviceChannels; - if (max < 1) - max = 1; /* 0 channels means 1 channel? */ - - min = MIN (1, max); - - pad_template = gst_element_class_get_pad_template (gstelement_class, "src"); - g_return_val_if_fail (pad_template != NULL, NULL); - - caps = gst_caps_copy (gst_pad_template_get_caps (pad_template)); - - if (min == max) { - gst_caps_set_simple (caps, "channels", G_TYPE_INT, max, NULL); - } else { - gst_caps_set_simple (caps, "channels", GST_TYPE_INT_RANGE, min, max, NULL); - } - - return caps; -} - -static GstRingBuffer * -gst_osx_audio_src_create_ringbuffer (GstBaseAudioSrc * src) -{ - GstOsxAudioSrc *osxsrc; - GstOsxRingBuffer *ringbuffer; - - osxsrc = GST_OSX_AUDIO_SRC (src); - - gst_osx_audio_src_select_device (osxsrc); - - GST_DEBUG ("Creating ringbuffer"); - ringbuffer = g_object_new (GST_TYPE_OSX_RING_BUFFER, NULL); - GST_DEBUG ("osx src 0x%p element 0x%p ioproc 0x%p", osxsrc, - GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsrc), - (void *) gst_osx_audio_src_io_proc); - - ringbuffer->element = GST_OSX_AUDIO_ELEMENT_GET_INTERFACE (osxsrc); - ringbuffer->is_src = TRUE; - ringbuffer->device_id = osxsrc->device_id; - - return GST_RING_BUFFER (ringbuffer); -} - -static OSStatus -gst_osx_audio_src_io_proc (GstOsxRingBuffer * buf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * bufferList) -{ - OSStatus status; - guint8 *writeptr; - gint writeseg; - gint len; - gint remaining; - gint offset = 0; - - status = AudioUnitRender (buf->audiounit, ioActionFlags, inTimeStamp, - inBusNumber, inNumberFrames, buf->recBufferList); - - if (status) { - GST_WARNING_OBJECT (buf, "AudioUnitRender returned %d", (int) status); - return status; - } - - remaining = buf->recBufferList->mBuffers[0].mDataByteSize; - - while (remaining) { - if (!gst_ring_buffer_prepare_read (GST_RING_BUFFER (buf), - &writeseg, &writeptr, &len)) - return 0; - - len -= buf->segoffset; - - if (len > remaining) - len = remaining; - - memcpy (writeptr + buf->segoffset, - (char *) buf->recBufferList->mBuffers[0].mData + offset, len); - - buf->segoffset += len; - offset += len; - remaining -= len; - - if ((gint) buf->segoffset == GST_RING_BUFFER (buf)->spec.segsize) { - /* we wrote one segment */ - gst_ring_buffer_advance (GST_RING_BUFFER (buf), 1); - - buf->segoffset = 0; - } - } - return 0; -} - -static void -gst_osx_audio_src_osxelement_init (gpointer g_iface, gpointer iface_data) -{ - GstOsxAudioElementInterface *iface = (GstOsxAudioElementInterface *) g_iface; - - iface->io_proc = (AURenderCallback) gst_osx_audio_src_io_proc; -} - -static void -gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc) -{ - OSStatus status; - UInt32 propertySize; - - if (osxsrc->device_id == kAudioDeviceUnknown) { - /* If no specific device has been selected by the user, then pick the - * default device */ - GST_DEBUG_OBJECT (osxsrc, "Selecting device for OSXAudioSrc"); - propertySize = sizeof (osxsrc->device_id); - status = AudioHardwareGetProperty (kAudioHardwarePropertyDefaultInputDevice, - &propertySize, &osxsrc->device_id); - - if (status) { - GST_WARNING_OBJECT (osxsrc, - "AudioHardwareGetProperty returned %d", (int) status); - } else { - GST_DEBUG_OBJECT (osxsrc, "AudioHardwareGetProperty returned 0"); - } - - if (osxsrc->device_id == kAudioDeviceUnknown) { - GST_WARNING_OBJECT (osxsrc, - "AudioHardwareGetProperty: device_id is kAudioDeviceUnknown"); - } - - GST_DEBUG_OBJECT (osxsrc, "AudioHardwareGetProperty: device_id is %lu", - (long) osxsrc->device_id); - } -} diff --git a/wearable/sys/osxaudio/gstosxaudiosrc.h b/wearable/sys/osxaudio/gstosxaudiosrc.h deleted file mode 100644 index a812d9e..0000000 --- a/wearable/sys/osxaudio/gstosxaudiosrc.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2005-2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_OSXAUDIOSRC_H__ -#define __GST_OSXAUDIOSRC_H__ - -#include <gst/gst.h> -#include <gst/audio/gstbaseaudiosrc.h> -#include "gstosxringbuffer.h" - -G_BEGIN_DECLS - -#define GST_TYPE_OSX_AUDIO_SRC \ - (gst_osx_audio_src_get_type()) -#define GST_OSX_AUDIO_SRC(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_AUDIO_SRC,GstOsxAudioSrc)) -#define GST_OSX_AUDIO_SRC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_AUDIO_SRC,GstOsxAudioSrcClass)) - -typedef struct _GstOsxAudioSrc GstOsxAudioSrc; -typedef struct _GstOsxAudioSrcClass GstOsxAudioSrcClass; - -struct _GstOsxAudioSrc -{ - GstBaseAudioSrc src; - - AudioDeviceID device_id; - - /* actual number of channels reported by input device */ - int deviceChannels; -}; - -struct _GstOsxAudioSrcClass -{ - GstBaseAudioSrcClass parent_class; -}; - -GType gst_osx_audio_src_get_type (void); - -G_END_DECLS - -#endif /* __GST_OSXAUDIOSRC_H__ */ diff --git a/wearable/sys/osxaudio/gstosxringbuffer.c b/wearable/sys/osxaudio/gstosxringbuffer.c deleted file mode 100644 index 095efc1..0000000 --- a/wearable/sys/osxaudio/gstosxringbuffer.c +++ /dev/null @@ -1,689 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * Copyright (C) 2008 Pioneers of the Inevitable <songbird@songbirdnest.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <CoreAudio/CoreAudio.h> -#include <CoreServices/CoreServices.h> -#include <gst/gst.h> -#include <gst/audio/multichannel.h> -#include "gstosxringbuffer.h" -#include "gstosxaudiosink.h" -#include "gstosxaudiosrc.h" - -GST_DEBUG_CATEGORY_STATIC (osx_audio_debug); -#define GST_CAT_DEFAULT osx_audio_debug - -static void gst_osx_ring_buffer_dispose (GObject * object); -static void gst_osx_ring_buffer_finalize (GObject * object); -static gboolean gst_osx_ring_buffer_open_device (GstRingBuffer * buf); -static gboolean gst_osx_ring_buffer_close_device (GstRingBuffer * buf); - -static gboolean gst_osx_ring_buffer_acquire (GstRingBuffer * buf, - GstRingBufferSpec * spec); -static gboolean gst_osx_ring_buffer_release (GstRingBuffer * buf); - -static gboolean gst_osx_ring_buffer_start (GstRingBuffer * buf); -static gboolean gst_osx_ring_buffer_pause (GstRingBuffer * buf); -static gboolean gst_osx_ring_buffer_stop (GstRingBuffer * buf); -static guint gst_osx_ring_buffer_delay (GstRingBuffer * buf); -static GstRingBufferClass *ring_parent_class = NULL; - -static OSStatus gst_osx_ring_buffer_render_notify (GstOsxRingBuffer * osxbuf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, unsigned int inBusNumber, - unsigned int inNumberFrames, AudioBufferList * ioData); - -static AudioBufferList *buffer_list_alloc (int channels, int size); -static void buffer_list_free (AudioBufferList * list); - -static void -gst_osx_ring_buffer_do_init (GType type) -{ - GST_DEBUG_CATEGORY_INIT (osx_audio_debug, "osxaudio", 0, - "OSX Audio Elements"); -} - -GST_BOILERPLATE_FULL (GstOsxRingBuffer, gst_osx_ring_buffer, GstRingBuffer, - GST_TYPE_RING_BUFFER, gst_osx_ring_buffer_do_init); - -static void -gst_osx_ring_buffer_base_init (gpointer g_class) -{ - /* Nothing to do right now */ -} - -static void -gst_osx_ring_buffer_class_init (GstOsxRingBufferClass * klass) -{ - GObjectClass *gobject_class; - GstObjectClass *gstobject_class; - GstRingBufferClass *gstringbuffer_class; - - gobject_class = (GObjectClass *) klass; - gstobject_class = (GstObjectClass *) klass; - gstringbuffer_class = (GstRingBufferClass *) klass; - - ring_parent_class = g_type_class_peek_parent (klass); - - gobject_class->dispose = gst_osx_ring_buffer_dispose; - gobject_class->finalize = gst_osx_ring_buffer_finalize; - - gstringbuffer_class->open_device = - GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_open_device); - gstringbuffer_class->close_device = - GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_close_device); - gstringbuffer_class->acquire = - GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_acquire); - gstringbuffer_class->release = - GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_release); - gstringbuffer_class->start = GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_start); - gstringbuffer_class->pause = GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_pause); - gstringbuffer_class->resume = GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_start); - gstringbuffer_class->stop = GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_stop); - - gstringbuffer_class->delay = GST_DEBUG_FUNCPTR (gst_osx_ring_buffer_delay); - - GST_DEBUG ("osx ring buffer class init"); -} - -static void -gst_osx_ring_buffer_init (GstOsxRingBuffer * ringbuffer, - GstOsxRingBufferClass * g_class) -{ - /* Nothing to do right now */ -} - -static void -gst_osx_ring_buffer_dispose (GObject * object) -{ - G_OBJECT_CLASS (ring_parent_class)->dispose (object); -} - -static void -gst_osx_ring_buffer_finalize (GObject * object) -{ - G_OBJECT_CLASS (ring_parent_class)->finalize (object); -} - -static AudioUnit -gst_osx_ring_buffer_create_audio_unit (GstOsxRingBuffer * osxbuf, - gboolean input, AudioDeviceID device_id) -{ - ComponentDescription desc; - Component comp; - OSStatus status; - AudioUnit unit; - UInt32 enableIO; - - /* Create a HALOutput AudioUnit. - * This is the lowest-level output API that is actually sensibly usable - * (the lower level ones require that you do channel-remapping yourself, - * and the CoreAudio channel mapping is sufficiently complex that doing - * so would be very difficult) - * - * Note that for input we request an output unit even though we will do - * input with it: http://developer.apple.com/technotes/tn2002/tn2091.html - */ - desc.componentType = kAudioUnitType_Output; - desc.componentSubType = kAudioUnitSubType_HALOutput; - desc.componentManufacturer = kAudioUnitManufacturer_Apple; - desc.componentFlags = 0; - desc.componentFlagsMask = 0; - - comp = FindNextComponent (NULL, &desc); - if (comp == NULL) { - GST_WARNING_OBJECT (osxbuf, "Couldn't find HALOutput component"); - return NULL; - } - - status = OpenAComponent (comp, &unit); - - if (status) { - GST_WARNING_OBJECT (osxbuf, "Couldn't open HALOutput component"); - return NULL; - } - - if (input) { - /* enable input */ - enableIO = 1; - status = AudioUnitSetProperty (unit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, /* 1 = input element */ - &enableIO, sizeof (enableIO)); - - if (status) { - CloseComponent (unit); - GST_WARNING_OBJECT (osxbuf, "Failed to enable input: %lx", - (gulong) status); - return NULL; - } - - /* disable output */ - enableIO = 0; - status = AudioUnitSetProperty (unit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, 0, /* 0 = output element */ - &enableIO, sizeof (enableIO)); - - if (status) { - CloseComponent (unit); - GST_WARNING_OBJECT (osxbuf, "Failed to disable output: %lx", - (gulong) status); - return NULL; - } - } - - /* Specify which device we're using. */ - GST_DEBUG_OBJECT (osxbuf, "Setting device to %d", (int) device_id); - status = AudioUnitSetProperty (unit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, /* N/A for global */ - &device_id, sizeof (AudioDeviceID)); - - if (status) { - CloseComponent (unit); - GST_WARNING_OBJECT (osxbuf, "Failed to set device: %lx", (gulong) status); - return NULL; - } - - GST_DEBUG_OBJECT (osxbuf, "Create HALOutput AudioUnit: %p", unit); - - return unit; -} - -static gboolean -gst_osx_ring_buffer_open_device (GstRingBuffer * buf) -{ - GstOsxRingBuffer *osxbuf; - GstOsxAudioSink *sink; - GstOsxAudioSrc *src; - AudioStreamBasicDescription asbd_in; - OSStatus status; - UInt32 propertySize; - - osxbuf = GST_OSX_RING_BUFFER (buf); - sink = NULL; - src = NULL; - - osxbuf->audiounit = gst_osx_ring_buffer_create_audio_unit (osxbuf, - osxbuf->is_src, osxbuf->device_id); - - if (osxbuf->is_src) { - src = GST_OSX_AUDIO_SRC (GST_OBJECT_PARENT (buf)); - - propertySize = sizeof (asbd_in); - status = AudioUnitGetProperty (osxbuf->audiounit, - kAudioUnitProperty_StreamFormat, - kAudioUnitScope_Input, 1, &asbd_in, &propertySize); - - if (status) { - CloseComponent (osxbuf->audiounit); - osxbuf->audiounit = NULL; - GST_WARNING_OBJECT (osxbuf, "Unable to obtain device properties: %lx", - (gulong) status); - return FALSE; - } - - src->deviceChannels = asbd_in.mChannelsPerFrame; - } else { - sink = GST_OSX_AUDIO_SINK (GST_OBJECT_PARENT (buf)); - - /* needed for the sink's volume control */ - sink->audiounit = osxbuf->audiounit; - } - - return TRUE; -} - -static gboolean -gst_osx_ring_buffer_close_device (GstRingBuffer * buf) -{ - GstOsxRingBuffer *osxbuf; - osxbuf = GST_OSX_RING_BUFFER (buf); - - CloseComponent (osxbuf->audiounit); - osxbuf->audiounit = NULL; - - return TRUE; -} - -static AudioChannelLabel -gst_audio_channel_position_to_coreaudio_channel_label (GstAudioChannelPosition - position, int channel) -{ - switch (position) { - case GST_AUDIO_CHANNEL_POSITION_NONE: - return kAudioChannelLabel_Discrete_0 | channel; - case GST_AUDIO_CHANNEL_POSITION_FRONT_MONO: - return kAudioChannelLabel_Mono; - case GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT: - return kAudioChannelLabel_Left; - case GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT: - return kAudioChannelLabel_Right; - case GST_AUDIO_CHANNEL_POSITION_REAR_CENTER: - return kAudioChannelLabel_CenterSurround; - case GST_AUDIO_CHANNEL_POSITION_REAR_LEFT: - return kAudioChannelLabel_LeftSurround; - case GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT: - return kAudioChannelLabel_RightSurround; - case GST_AUDIO_CHANNEL_POSITION_LFE: - return kAudioChannelLabel_LFEScreen; - case GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER: - return kAudioChannelLabel_Center; - case GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: - return kAudioChannelLabel_Center; // ??? - case GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: - return kAudioChannelLabel_Center; // ??? - case GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT: - return kAudioChannelLabel_LeftSurroundDirect; - case GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT: - return kAudioChannelLabel_RightSurroundDirect; - default: - return kAudioChannelLabel_Unknown; - } -} - -static gboolean -gst_osx_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) -{ - /* Configure the output stream and allocate ringbuffer memory */ - GstOsxRingBuffer *osxbuf; - AudioStreamBasicDescription format; - AudioChannelLayout *layout = NULL; - OSStatus status; - UInt32 propertySize; - int layoutSize; - int element; - int i; - AudioUnitScope scope; - gboolean ret = FALSE; - GstStructure *structure; - GstAudioChannelPosition *positions; - UInt32 frameSize; - - osxbuf = GST_OSX_RING_BUFFER (buf); - - /* Fill out the audio description we're going to be using */ - format.mFormatID = kAudioFormatLinearPCM; - format.mSampleRate = (double) spec->rate; - format.mChannelsPerFrame = spec->channels; - format.mFormatFlags = kAudioFormatFlagsNativeFloatPacked; - format.mBytesPerFrame = spec->channels * sizeof (float); - format.mBitsPerChannel = sizeof (float) * 8; - format.mBytesPerPacket = spec->channels * sizeof (float); - format.mFramesPerPacket = 1; - format.mReserved = 0; - - /* Describe channels */ - layoutSize = sizeof (AudioChannelLayout) + - spec->channels * sizeof (AudioChannelDescription); - layout = g_malloc (layoutSize); - - structure = gst_caps_get_structure (spec->caps, 0); - positions = gst_audio_get_channel_positions (structure); - - layout->mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions; - layout->mChannelBitmap = 0; /* Not used */ - layout->mNumberChannelDescriptions = spec->channels; - for (i = 0; i < spec->channels; i++) { - if (positions) { - layout->mChannelDescriptions[i].mChannelLabel = - gst_audio_channel_position_to_coreaudio_channel_label (positions[i], - i); - } else { - /* Discrete channel numbers are ORed into this */ - layout->mChannelDescriptions[i].mChannelLabel = - kAudioChannelLabel_Discrete_0 | i; - } - - /* Others unused */ - layout->mChannelDescriptions[i].mChannelFlags = 0; - layout->mChannelDescriptions[i].mCoordinates[0] = 0.f; - layout->mChannelDescriptions[i].mCoordinates[1] = 0.f; - layout->mChannelDescriptions[i].mCoordinates[2] = 0.f; - } - - if (positions) { - g_free (positions); - positions = NULL; - } - - GST_LOG_OBJECT (osxbuf, "Format: %x, %f, %u, %x, %d, %d, %d, %d, %d", - (unsigned int) format.mFormatID, - format.mSampleRate, - (unsigned int) format.mChannelsPerFrame, - (unsigned int) format.mFormatFlags, - (unsigned int) format.mBytesPerFrame, - (unsigned int) format.mBitsPerChannel, - (unsigned int) format.mBytesPerPacket, - (unsigned int) format.mFramesPerPacket, (unsigned int) format.mReserved); - - GST_DEBUG_OBJECT (osxbuf, "Setting format for AudioUnit"); - - scope = osxbuf->is_src ? kAudioUnitScope_Output : kAudioUnitScope_Input; - element = osxbuf->is_src ? 1 : 0; - - propertySize = sizeof (format); - status = AudioUnitSetProperty (osxbuf->audiounit, - kAudioUnitProperty_StreamFormat, scope, element, &format, propertySize); - - if (status) { - GST_WARNING_OBJECT (osxbuf, "Failed to set audio description: %lx", - (gulong) status); - goto done; - } - - status = AudioUnitSetProperty (osxbuf->audiounit, - kAudioUnitProperty_AudioChannelLayout, - scope, element, layout, layoutSize); - if (status) { - GST_WARNING_OBJECT (osxbuf, "Failed to set output channel layout: %lx", - (gulong) status); - goto done; - } - - spec->segsize = - (spec->latency_time * spec->rate / G_USEC_PER_SEC) * - spec->bytes_per_sample; - spec->segtotal = spec->buffer_time / spec->latency_time; - - /* create AudioBufferList needed for recording */ - if (osxbuf->is_src) { - propertySize = sizeof (frameSize); - status = AudioUnitGetProperty (osxbuf->audiounit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, 0, /* N/A for global */ - &frameSize, &propertySize); - - if (status) { - GST_WARNING_OBJECT (osxbuf, "Failed to get frame size: %lx", - (gulong) status); - goto done; - } - - osxbuf->recBufferList = buffer_list_alloc (format.mChannelsPerFrame, - frameSize * format.mBytesPerFrame); - } - - buf->data = gst_buffer_new_and_alloc (spec->segtotal * spec->segsize); - memset (GST_BUFFER_DATA (buf->data), 0, GST_BUFFER_SIZE (buf->data)); - - osxbuf->segoffset = 0; - - status = AudioUnitInitialize (osxbuf->audiounit); - if (status) { - gst_buffer_unref (buf->data); - buf->data = NULL; - - if (osxbuf->recBufferList) { - buffer_list_free (osxbuf->recBufferList); - osxbuf->recBufferList = NULL; - } - - GST_WARNING_OBJECT (osxbuf, - "Failed to initialise AudioUnit: %d", (int) status); - goto done; - } - - GST_DEBUG_OBJECT (osxbuf, "osx ring buffer acquired"); - - ret = TRUE; - -done: - g_free (layout); - return ret; -} - -static gboolean -gst_osx_ring_buffer_release (GstRingBuffer * buf) -{ - GstOsxRingBuffer *osxbuf; - - osxbuf = GST_OSX_RING_BUFFER (buf); - - AudioUnitUninitialize (osxbuf->audiounit); - - gst_buffer_unref (buf->data); - buf->data = NULL; - - if (osxbuf->recBufferList) { - buffer_list_free (osxbuf->recBufferList); - osxbuf->recBufferList = NULL; - } - - return TRUE; -} - -static void -gst_osx_ring_buffer_remove_render_callback (GstOsxRingBuffer * osxbuf) -{ - AURenderCallbackStruct input; - OSStatus status; - - /* Deactivate the render callback by calling SetRenderCallback with a NULL - * inputProc. - */ - input.inputProc = NULL; - input.inputProcRefCon = NULL; - - status = AudioUnitSetProperty (osxbuf->audiounit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, /* N/A for global */ - &input, sizeof (input)); - - if (status) { - GST_WARNING_OBJECT (osxbuf, "Failed to remove render callback"); - } - - /* Remove the RenderNotify too */ - status = AudioUnitRemoveRenderNotify (osxbuf->audiounit, - (AURenderCallback) gst_osx_ring_buffer_render_notify, osxbuf); - - if (status) { - GST_WARNING_OBJECT (osxbuf, "Failed to remove render notify callback"); - } - - /* We're deactivated.. */ - osxbuf->io_proc_needs_deactivation = FALSE; - osxbuf->io_proc_active = FALSE; -} - -static OSStatus -gst_osx_ring_buffer_render_notify (GstOsxRingBuffer * osxbuf, - AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - unsigned int inBusNumber, - unsigned int inNumberFrames, AudioBufferList * ioData) -{ - /* Before rendering a frame, we get the PreRender notification. - * Here, we detach the RenderCallback if we've been paused. - * - * This is necessary (rather than just directly detaching it) to work - * around some thread-safety issues in CoreAudio - */ - if ((*ioActionFlags) & kAudioUnitRenderAction_PreRender) { - if (osxbuf->io_proc_needs_deactivation) { - gst_osx_ring_buffer_remove_render_callback (osxbuf); - } - } - - return noErr; -} - -static gboolean -gst_osx_ring_buffer_start (GstRingBuffer * buf) -{ - OSStatus status; - GstOsxRingBuffer *osxbuf; - AURenderCallbackStruct input; - AudioUnitPropertyID callback_type; - - osxbuf = GST_OSX_RING_BUFFER (buf); - - GST_DEBUG ("osx ring buffer start ioproc: 0x%p device_id %lu", - osxbuf->element->io_proc, (gulong) osxbuf->device_id); - if (!osxbuf->io_proc_active) { - callback_type = osxbuf->is_src ? - kAudioOutputUnitProperty_SetInputCallback : - kAudioUnitProperty_SetRenderCallback; - - input.inputProc = (AURenderCallback) osxbuf->element->io_proc; - input.inputProcRefCon = osxbuf; - - status = AudioUnitSetProperty (osxbuf->audiounit, callback_type, kAudioUnitScope_Global, 0, /* N/A for global */ - &input, sizeof (input)); - - if (status) { - GST_WARNING ("AudioUnitSetProperty returned %d", (int) status); - return FALSE; - } - // ### does it make sense to do this notify stuff for input mode? - status = AudioUnitAddRenderNotify (osxbuf->audiounit, - (AURenderCallback) gst_osx_ring_buffer_render_notify, osxbuf); - - if (status) { - GST_WARNING ("AudioUnitAddRenderNotify returned %d", (int) status); - return FALSE; - } - - osxbuf->io_proc_active = TRUE; - } - - osxbuf->io_proc_needs_deactivation = FALSE; - - status = AudioOutputUnitStart (osxbuf->audiounit); - if (status) { - GST_WARNING ("AudioOutputUnitStart returned %d", (int) status); - return FALSE; - } - return TRUE; -} - -// ### -static gboolean -gst_osx_ring_buffer_pause (GstRingBuffer * buf) -{ - GstOsxRingBuffer *osxbuf = GST_OSX_RING_BUFFER (buf); - - GST_DEBUG ("osx ring buffer pause ioproc: 0x%p device_id %lu", - osxbuf->element->io_proc, (gulong) osxbuf->device_id); - if (osxbuf->io_proc_active) { - /* CoreAudio isn't threadsafe enough to do this here; we must deactivate - * the render callback elsewhere. See: - * http://lists.apple.com/archives/Coreaudio-api/2006/Mar/msg00010.html - */ - osxbuf->io_proc_needs_deactivation = TRUE; - } - return TRUE; -} - -// ### -static gboolean -gst_osx_ring_buffer_stop (GstRingBuffer * buf) -{ - OSErr status; - GstOsxRingBuffer *osxbuf; - - osxbuf = GST_OSX_RING_BUFFER (buf); - - GST_DEBUG ("osx ring buffer stop ioproc: 0x%p device_id %lu", - osxbuf->element->io_proc, (gulong) osxbuf->device_id); - - status = AudioOutputUnitStop (osxbuf->audiounit); - if (status) - GST_WARNING ("AudioOutputUnitStop returned %d", (int) status); - - // ###: why is it okay to directly remove from here but not from pause() ? - if (osxbuf->io_proc_active) { - gst_osx_ring_buffer_remove_render_callback (osxbuf); - } - return TRUE; -} - -static guint -gst_osx_ring_buffer_delay (GstRingBuffer * buf) -{ - double latency; - UInt32 size = sizeof (double); - GstOsxRingBuffer *osxbuf; - OSStatus status; - guint samples; - - osxbuf = GST_OSX_RING_BUFFER (buf); - - status = AudioUnitGetProperty (osxbuf->audiounit, kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, /* N/A for global */ - &latency, &size); - - if (status) { - GST_WARNING_OBJECT (buf, "Failed to get latency: %d", (int) status); - return 0; - } - - samples = latency * GST_RING_BUFFER (buf)->spec.rate; - GST_DEBUG_OBJECT (buf, "Got latency: %f seconds -> %d samples", latency, - samples); - return samples; -} - -static AudioBufferList * -buffer_list_alloc (int channels, int size) -{ - AudioBufferList *list; - int total_size; - int n; - - total_size = sizeof (AudioBufferList) + 1 * sizeof (AudioBuffer); - list = (AudioBufferList *) g_malloc (total_size); - - list->mNumberBuffers = 1; - for (n = 0; n < (int) list->mNumberBuffers; ++n) { - list->mBuffers[n].mNumberChannels = channels; - list->mBuffers[n].mDataByteSize = size; - list->mBuffers[n].mData = g_malloc (size); - } - - return list; -} - -static void -buffer_list_free (AudioBufferList * list) -{ - int n; - - for (n = 0; n < (int) list->mNumberBuffers; ++n) { - if (list->mBuffers[n].mData) - g_free (list->mBuffers[n].mData); - } - - g_free (list); -} diff --git a/wearable/sys/osxaudio/gstosxringbuffer.h b/wearable/sys/osxaudio/gstosxringbuffer.h deleted file mode 100644 index 5e6dbe4..0000000 --- a/wearable/sys/osxaudio/gstosxringbuffer.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * GStreamer - * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Alternatively, the contents of this file may be used under the - * GNU Lesser General Public License Version 2.1 (the "LGPL"), in - * which case the following provisions apply instead of the ones - * mentioned above: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_OSX_RING_BUFFER_H__ -#define __GST_OSX_RING_BUFFER_H__ - -#include <gst/gst.h> -#include <gst/audio/gstringbuffer.h> -#include <CoreAudio/CoreAudio.h> -#include "gstosxaudioelement.h" - -G_BEGIN_DECLS - -#define GST_TYPE_OSX_RING_BUFFER \ - (gst_osx_ring_buffer_get_type()) -#define GST_OSX_RING_BUFFER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_RING_BUFFER,GstOsxRingBuffer)) -#define GST_OSX_RING_BUFFER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_RING_BUFFER,GstOsxRingBufferClass)) -#define GST_OSX_RING_BUFFER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OSX_RING_BUFFER,GstOsxRingBufferClass)) -#define GST_IS_OSX_RING_BUFFER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_RING_BUFFER)) -#define GST_IS_OSX_RING_BUFFER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSX_RING_BUFFER)) - -typedef struct _GstOsxRingBuffer GstOsxRingBuffer; -typedef struct _GstOsxRingBufferClass GstOsxRingBufferClass; - -struct _GstOsxRingBuffer -{ - GstRingBuffer object; - - gboolean is_src; - AudioUnit audiounit; - AudioDeviceID device_id; - gboolean io_proc_active; - gboolean io_proc_needs_deactivation; - guint buffer_len; - guint segoffset; - AudioBufferList * recBufferList; - GstOsxAudioElementInterface * element; -}; - -struct _GstOsxRingBufferClass -{ - GstRingBufferClass parent_class; -}; - -GType gst_osx_ring_buffer_get_type (void); - -G_END_DECLS - -#endif /* __GST_OSX_RING_BUFFER_H__ */ |