diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Makefile.am | 10 | ||||
-rw-r--r-- | ext/mas/Makefile.am | 10 | ||||
-rw-r--r-- | ext/mas/Makefile.in | 498 | ||||
-rw-r--r-- | ext/mas/massink.c | 546 | ||||
-rw-r--r-- | ext/mas/massink.h | 94 |
5 files changed, 1156 insertions, 2 deletions
diff --git a/ext/Makefile.am b/ext/Makefile.am index d31f7fe6..0d107fc5 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -64,6 +64,12 @@ else ESD_DIR= endif +if USE_MAS +MAS_DIR=mas +else +MAS_DIR= +endif + ## if USE_FESTIVAL ## FESTIVAL_DIR=festival ## else @@ -253,7 +259,7 @@ endif SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \ $(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \ $(AVIFILE_DIR) $(CDPARANOIA_DIR) \ - $(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) \ + $(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) $(MAS_DIR) \ $(FFMPEG_DIR) $(FLAC_DIR) $(GNOMEVFS_DIR) $(GSM_DIR) \ $(HERMES_DIR) $(HTTP_DIR) $(JACK_DIR) $(JPEG_DIR) \ $(LADSPA_DIR) $(LAME_DIR) $(LCS_DIR) \ @@ -268,7 +274,7 @@ DIST_SUBDIRS=\ a52dec aalib alsa \ arts artsd avifile \ audiofile cdparanoia dv \ - dvdread dvdnav esd ffmpeg \ + dvdread dvdnav esd mas ffmpeg \ flac gnomevfs gsm \ hermes http jack jpeg \ ladspa lame lcs libfame libpng \ diff --git a/ext/mas/Makefile.am b/ext/mas/Makefile.am new file mode 100644 index 00000000..9e6781f4 --- /dev/null +++ b/ext/mas/Makefile.am @@ -0,0 +1,10 @@ +plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@ + +plugin_LTLIBRARIES = libgstmassink.la + +libgstmassink_la_SOURCES = massink.c +libgstmassink_la_CFLAGS = $(GST_CFLAGS) $(MAS_CFLAGS) +libgstmassink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MAS_LIBS) + +noinst_HEADERS = massink.h +EXTRA_DIST = README diff --git a/ext/mas/Makefile.in b/ext/mas/Makefile.in new file mode 100644 index 00000000..7a9b0824 --- /dev/null +++ b/ext/mas/Makefile.in @@ -0,0 +1,498 @@ +# Makefile.in generated by automake 1.6.3 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# 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@ +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +A52DEC_CFLAGS = @A52DEC_CFLAGS@ +A52DEC_LIBS = @A52DEC_LIBS@ +AALIB_CFLAGS = @AALIB_CFLAGS@ +AALIB_CONFIG = @AALIB_CONFIG@ +AALIB_LIBS = @AALIB_LIBS@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +ARTSC_CFLAGS = @ARTSC_CFLAGS@ +ARTSC_CONFIG = @ARTSC_CONFIG@ +ARTSC_LIBS = @ARTSC_LIBS@ +ARTS_CONFIG = @ARTS_CONFIG@ +ARTS_CXXFLAGS = @ARTS_CXXFLAGS@ +ARTS_LIBS = @ARTS_LIBS@ +AS = @AS@ +AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@ +AUDIOFILE_LIBS = @AUDIOFILE_LIBS@ +AVIFILE_CONFIG = @AVIFILE_CONFIG@ +AVIFILE_CXXFLAGS = @AVIFILE_CXXFLAGS@ +AVIFILE_LDFLAGS = @AVIFILE_LDFLAGS@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CDPARANOIA_LIBS = @CDPARANOIA_LIBS@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXFLAGS = @CXXFLAGS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DVDNAV_CFLAGS = @DVDNAV_CFLAGS@ +DVDNAV_LIBS = @DVDNAV_LIBS@ +DVDREAD_LIBS = @DVDREAD_LIBS@ +ECHO = @ECHO@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_CONFIG = @ESD_CONFIG@ +ESD_LIBS = @ESD_LIBS@ +FLAC_LIBS = @FLAC_LIBS@ +FT2_CFLAGS = @FT2_CFLAGS@ +FT2_CONFIG = @FT2_CONFIG@ +FT2_LIBS = @FT2_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@ +GLIB2_REQ = @GLIB2_REQ@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@ +GNOME_VFS_LIBS = @GNOME_VFS_LIBS@ +GSM_LIBS = @GSM_LIBS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_CONTROL_LIBS = @GST_CONTROL_LIBS@ +GST_DISABLE_ = @GST_DISABLE_@ +GST_HTTPSRC_GET_TYPE = @GST_HTTPSRC_GET_TYPE@ +GST_LIBS = @GST_LIBS@ +GST_MAJORMINOR = @GST_MAJORMINOR@ +GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ +GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ +GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ +GST_TOOLS_DIR = @GST_TOOLS_DIR@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVE_ = @HAVE_@ +HAVE_CXX = @HAVE_CXX@ +HAVE_GCONFTOOL = @HAVE_GCONFTOOL@ +HERMES_LIBS = @HERMES_LIBS@ +HTTP_LIBS = @HTTP_LIBS@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LIBS = @JACK_LIBS@ +JPEG_LIBS = @JPEG_LIBS@ +LAME_LIBS = @LAME_LIBS@ +LCS_CFLAGS = @LCS_CFLAGS@ +LCS_LIBS = @LCS_LIBS@ +LDFLAGS = @LDFLAGS@ +LIBDV_CFLAGS = @LIBDV_CFLAGS@ +LIBDV_LIBS = @LIBDV_LIBS@ +LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ +LIBFAME_CONFIG = @LIBFAME_CONFIG@ +LIBFAME_LIBS = @LIBFAME_LIBS@ +LIBMIKMOD_CFLAGS = @LIBMIKMOD_CFLAGS@ +LIBMIKMOD_CONFIG = @LIBMIKMOD_CONFIG@ +LIBMIKMOD_LDADD = @LIBMIKMOD_LDADD@ +LIBMIKMOD_LIBS = @LIBMIKMOD_LIBS@ +LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ +LIBPNG_LIBS = @LIBPNG_LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAD_LIBS = @MAD_LIBS@ +MAINT = @MAINT@ +MAS_CFLAGS = @MAS_CFLAGS@ +MAS_LIBS = @MAS_LIBS@ +MCOPIDL = @MCOPIDL@ +MIKMOD_CFLAGS = @MIKMOD_CFLAGS@ +MIKMOD_LIBS = @MIKMOD_LIBS@ +MJPEGTOOLS_CFLAGS = @MJPEGTOOLS_CFLAGS@ +MJPEGTOOLS_LIBS = @MJPEGTOOLS_LIBS@ +MPEG2DEC_CFLAGS = @MPEG2DEC_CFLAGS@ +MPEG2DEC_LIBS = @MPEG2DEC_LIBS@ +NASM_PATH = @NASM_PATH@ +OBJDUMP = @OBJDUMP@ +OPENQUICKTIME_LIBS = @OPENQUICKTIME_LIBS@ +PACKAGE = @PACKAGE@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +RAW1394_LIBS = @RAW1394_LIBS@ +RTP_LIBS = @RTP_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SHOUT2_CFLAGS = @SHOUT2_CFLAGS@ +SHOUT2_LIBS = @SHOUT2_LIBS@ +SHOUT_LIBS = @SHOUT_LIBS@ +SIDPLAY_CFLAGS = @SIDPLAY_CFLAGS@ +SIDPLAY_LIBS = @SIDPLAY_LIBS@ +STRIP = @STRIP@ +SWFDEC_CFLAGS = @SWFDEC_CFLAGS@ +SWFDEC_LIBS = @SWFDEC_LIBS@ +VERSION = @VERSION@ +VORBISENC_LIBS = @VORBISENC_LIBS@ +VORBISFILE_LIBS = @VORBISFILE_LIBS@ +VORBIS_CFLAGS = @VORBIS_CFLAGS@ +VORBIS_LIBS = @VORBIS_LIBS@ +XMMS_CFLAGS = @XMMS_CFLAGS@ +XMMS_CONFIG = @XMMS_CONFIG@ +XMMS_DATA_DIR = @XMMS_DATA_DIR@ +XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ +XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ +XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ +XMMS_LIBS = @XMMS_LIBS@ +XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ +XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ +XMMS_VERSION = @XMMS_VERSION@ +XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ +XVIDEO_LIBS = @XVIDEO_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +am__include = @am__include@ +am__quote = @am__quote@ +install_sh = @install_sh@ +plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@ + +plugin_LTLIBRARIES = libgstmassink.la + +libgstmassink_la_SOURCES = massink.c +libgstmassink_la_CFLAGS = $(GST_CFLAGS) $(MAS_CFLAGS) +libgstmassink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MAS_LIBS) + +noinst_HEADERS = massink.h +EXTRA_DIST = README +subdir = ext/mas +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(plugin_LTLIBRARIES) + +libgstmassink_la_LIBADD = +am_libgstmassink_la_OBJECTS = libgstmassink_la-massink.lo +libgstmassink_la_OBJECTS = $(am_libgstmassink_la_OBJECTS) + +DEFS = @DEFS@ +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +LIBS = @LIBS@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libgstmassink_la-massink.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ +DIST_SOURCES = $(libgstmassink_la_SOURCES) +HEADERS = $(noinst_HEADERS) + +DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in +SOURCES = $(libgstmassink_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu ext/mas/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +pluginLTLIBRARIES_INSTALL = $(INSTALL) +install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(plugindir) + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f"; \ + $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f; \ + else :; fi; \ + done + +uninstall-pluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/$$p; \ + 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 -z "$dir" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgstmassink_la-massink.lo: massink.c +libgstmassink.la: $(libgstmassink_la_OBJECTS) $(libgstmassink_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(libgstmassink_la_LDFLAGS) $(libgstmassink_la_OBJECTS) $(libgstmassink_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstmassink_la-massink.Plo@am__quote@ + +distclean-depend: + -rm -rf ./$(DEPDIR) + +.c.o: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `cygpath -w $<` + +.c.lo: +@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +libgstmassink_la-massink.o: massink.c +@AMDEP_TRUE@ source='massink.c' object='libgstmassink_la-massink.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libgstmassink_la-massink.Po' tmpdepfile='$(DEPDIR)/libgstmassink_la-massink.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmassink_la_CFLAGS) $(CFLAGS) -c -o libgstmassink_la-massink.o `test -f 'massink.c' || echo '$(srcdir)/'`massink.c + +libgstmassink_la-massink.obj: massink.c +@AMDEP_TRUE@ source='massink.c' object='libgstmassink_la-massink.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libgstmassink_la-massink.Po' tmpdepfile='$(DEPDIR)/libgstmassink_la-massink.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmassink_la_CFLAGS) $(CFLAGS) -c -o libgstmassink_la-massink.obj `cygpath -w massink.c` + +libgstmassink_la-massink.lo: massink.c +@AMDEP_TRUE@ source='massink.c' object='libgstmassink_la-massink.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libgstmassink_la-massink.Plo' tmpdepfile='$(DEPDIR)/libgstmassink_la-massink.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstmassink_la_CFLAGS) $(CFLAGS) -c -o libgstmassink_la-massink.lo `test -f 'massink.c' || echo '$(srcdir)/'`massink.c +CCDEPMODE = @CCDEPMODE@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +tags: TAGS + +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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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: + $(mkinstalldirs) $(DESTDIR)$(plugindir) + +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_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 + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-pluginLTLIBRARIES + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES + +.PHONY: GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginLTLIBRARIES distclean \ + distclean-compile distclean-depend distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am info \ + info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-pluginLTLIBRARIES install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool tags uninstall \ + uninstall-am uninstall-info-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/ext/mas/massink.c b/ext/mas/massink.c new file mode 100644 index 00000000..1b965beb --- /dev/null +++ b/ext/mas/massink.c @@ -0,0 +1,546 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * + * Most of the code from maswavplay and esdsink + * 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 "massink.h" + +#define BUFFER_SIZE 640 +#define BUFFER_TIME_NS 3628118 +#define FORCED_STABLE_LOOPS 10 +#define NANOSLEEP_GRANULARITY 100000 + + +/* elementfactory information */ +static GstElementDetails massink_details = { + "Esound audio sink", + "Sink/Audio", + "LGPL", + "Plays audio to a MAS server", + VERSION, + "Zeeshan Ali <zak147@yahoo.com>", + "(C) 2003", +}; + +/* Signals and args */ +enum { + /* FILL ME */ + LAST_SIGNAL +}; + +enum { + ARG_0, + ARG_MUTE, + ARG_DEPTH, + ARG_CHANNELS, + ARG_RATE, + ARG_HOST, +}; + +GST_PAD_TEMPLATE_FACTORY (sink_factory, + "sink", /* the name of the pads */ + GST_PAD_SINK, /* type of the pad */ + GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ + GST_CAPS_NEW ( + "massink_sink8", /* the name of the caps */ + "audio/x-wav", /* the mime type of the caps */ + NULL + ) +); + +static void gst_massink_class_init (GstMassinkClass *klass); +static void gst_massink_init (GstMassink *massink); +static void gst_massink_set_clock (GstElement *element, GstClock *clock); +static gboolean gst_massink_open_audio (GstMassink *sink); +//static void gst_massink_close_audio (GstMassink *sink); +static GstElementStateReturn gst_massink_change_state (GstElement *element); +static gboolean gst_massink_sync_parms (GstMassink *massink); +static GstPadLinkReturn gst_massink_sinkconnect (GstPad *pad, GstCaps *caps); + +static void gst_massink_chain (GstPad *pad, GstBuffer *buf); + +static void gst_massink_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec); +static void gst_massink_get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec); + +#define GST_TYPE_MASSINK_DEPTHS (gst_massink_depths_get_type()) +static GType +gst_massink_depths_get_type (void) +{ + static GType massink_depths_type = 0; + static GEnumValue massink_depths[] = { + {8, "8", "8 Bits"}, + {16, "16", "16 Bits"}, + {0, NULL, NULL}, + }; + if (!massink_depths_type) { + massink_depths_type = g_enum_register_static("GstMassinkDepths", massink_depths); + } + return massink_depths_type; +} + +static GstElementClass *parent_class = NULL; +/*static guint gst_massink_signals[LAST_SIGNAL] = { 0 }; */ + +GType +gst_massink_get_type (void) +{ + static GType massink_type = 0; + + if (!massink_type) { + static const GTypeInfo massink_info = { + sizeof(GstMassinkClass), NULL, + NULL, + (GClassInitFunc)gst_massink_class_init, + NULL, + NULL, + sizeof(GstMassink), + 0, + (GInstanceInitFunc)gst_massink_init, + }; + massink_type = g_type_register_static(GST_TYPE_ELEMENT, "GstMassink", &massink_info, 0); + } + return massink_type; +} + +static void +gst_massink_class_init (GstMassinkClass *klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass*)klass; + gstelement_class = (GstElementClass*)klass; + + parent_class = g_type_class_ref(GST_TYPE_ELEMENT); + + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MUTE, + g_param_spec_boolean("mute","mute","mute", + TRUE,G_PARAM_READWRITE)); /* CHECKME */ + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DEPTH, + g_param_spec_enum("depth","depth","depth", + GST_TYPE_MASSINK_DEPTHS,16,G_PARAM_READWRITE)); /* CHECKME! */ + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_RATE, + g_param_spec_int("frequency","frequency","frequency", + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */ + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_HOST, + g_param_spec_string("host","host","host", + NULL, G_PARAM_READWRITE)); /* CHECKME */ + + gobject_class->set_property = gst_massink_set_property; + gobject_class->get_property = gst_massink_get_property; + + gstelement_class->change_state = gst_massink_change_state; + gstelement_class->set_clock = gst_massink_set_clock; +} + +static void +gst_massink_set_clock (GstElement *element, GstClock *clock) +{ + GstMassink *massink; + + massink = GST_MASSINK (element); + + massink->clock = clock; +} + +static void +gst_massink_init(GstMassink *massink) +{ + massink->sinkpad = gst_pad_new_from_template ( + GST_PAD_TEMPLATE_GET (sink_factory), "sink"); + gst_element_add_pad(GST_ELEMENT(massink), massink->sinkpad); + gst_pad_set_chain_function(massink->sinkpad, GST_DEBUG_FUNCPTR(gst_massink_chain)); + gst_pad_set_link_function(massink->sinkpad, gst_massink_sinkconnect); + + massink->mute = FALSE; + massink->format = 16; + massink->depth = 16; + massink->channels = 2; + massink->frequency = 44100; + massink->host = NULL; +} + +static gboolean +gst_massink_sync_parms (GstMassink *massink) +{ + g_return_val_if_fail (massink != NULL, FALSE); + g_return_val_if_fail (GST_IS_MASSINK (massink), FALSE); + + //gst_massink_close_audio (massink); + //return gst_massink_open_audio (massink); + return 1; +} + +static GstPadLinkReturn +gst_massink_sinkconnect (GstPad *pad, GstCaps *caps) +{ + GstMassink *massink; + + massink = GST_MASSINK (gst_pad_get_parent (pad)); + + if (!GST_CAPS_IS_FIXED (caps)) + return GST_PAD_LINK_DELAYED; + + if (gst_massink_sync_parms (massink)) + return GST_PAD_LINK_OK; + + return GST_PAD_LINK_REFUSED; +} + +static void +gst_massink_chain (GstPad *pad, GstBuffer *buf) +{ + gint32 err; + + g_return_if_fail(pad != NULL); + g_return_if_fail(GST_IS_PAD(pad)); + g_return_if_fail(buf != NULL); + + GstMassink *massink = GST_MASSINK (gst_pad_get_parent (pad)); + + if (massink->clock) { + GstClockID id = gst_clock_new_single_shot_id (massink->clock, GST_BUFFER_TIMESTAMP (buf)); + + GST_DEBUG (0, "massink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP (buf)); + gst_element_clock_wait (GST_ELEMENT (massink), id, NULL); + gst_clock_id_free (id); + } + + if (GST_BUFFER_DATA (buf) != NULL) { + if (!massink->mute) { + GST_DEBUG (0, "massink: data=%p size=%d", GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); + if (GST_BUFFER_SIZE (buf) > BUFFER_SIZE) { + gst_buffer_unref (buf); + return; + } + + massink->data->length = GST_BUFFER_SIZE (buf); + + memcpy (massink->data->segment, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); + + err = mas_send (massink->audio_channel, massink->data); + + if (err < 0) { + g_print ("error sending data to MAS server\n"); + gst_buffer_unref (buf); + return; + } + + /* FIXME: Please correct the Timestamping if its wrong */ + massink->data->header.media_timestamp += massink->data->length / 4; + massink->data->header.sequence++; + } + } + + gst_buffer_unref (buf); +} + +static void +gst_massink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +{ + GstMassink *massink; + + /* it's not null if we got it, but it might not be ours */ + g_return_if_fail(GST_IS_MASSINK(object)); + massink = GST_MASSINK(object); + + switch (prop_id) { + case ARG_MUTE: + massink->mute = g_value_get_boolean (value); + break; + case ARG_DEPTH: + massink->depth = g_value_get_enum (value); + gst_massink_sync_parms (massink); + break; + case ARG_CHANNELS: + massink->channels = g_value_get_enum (value); + gst_massink_sync_parms (massink); + break; + case ARG_RATE: + massink->frequency = g_value_get_int (value); + gst_massink_sync_parms (massink); + break; + case ARG_HOST: + if (massink->host != NULL) g_free(massink->host); + if (g_value_get_string (value) == NULL) + massink->host = NULL; + else + massink->host = g_strdup (g_value_get_string (value)); + break; + default: + break; + } +} + +static void +gst_massink_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +{ + GstMassink *massink; + + /* it's not null if we got it, but it might not be ours */ + g_return_if_fail(GST_IS_MASSINK(object)); + massink = GST_MASSINK(object); + + switch (prop_id) { + case ARG_MUTE: + g_value_set_boolean (value, massink->mute); + break; + case ARG_DEPTH: + g_value_set_enum (value, massink->depth); + break; + case ARG_CHANNELS: + g_value_set_enum (value, massink->channels); + break; + case ARG_RATE: + g_value_set_int (value, massink->frequency); + break; + case ARG_HOST: + g_value_set_string (value, massink->host); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static gboolean +plugin_init (GModule *module, GstPlugin *plugin) +{ + GstElementFactory *factory; + + factory = gst_element_factory_new("massink", GST_TYPE_MASSINK, + &massink_details); + g_return_val_if_fail(factory != NULL, FALSE); + + gst_element_factory_add_pad_template(factory, GST_PAD_TEMPLATE_GET (sink_factory)); + + gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); + + return TRUE; +} + +GstPluginDesc plugin_desc = { + GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "massink", + plugin_init +}; + +static gboolean +gst_massink_open_audio (GstMassink *massink) +{ + gint32 err; + char *ratestring = g_malloc (16); + char *bps = g_malloc (8); + + struct mas_data_characteristic* dc; + + g_print ("Connecting to MAS.\n"); + masc_log_verbosity (MAS_VERBLVL_DEBUG); + err = mas_init(); + + if (err < 0) { + GST_DEBUG(err, "connection with local MAS server failed."); + exit (1); + } + + GST_DEBUG (0, "Establishing audio output channel."); + mas_make_data_channel ("Gstreamer", &massink->audio_channel, &massink->audio_source, &massink->audio_sink); + mas_asm_get_port_by_name (0, "default_mix_sink", &massink->mix_sink); + + GST_DEBUG (0, "Instantiating endian device."); + err = mas_asm_instantiate_device ("endian", 0, 0, &massink->endian); + + if (err < 0) { + GST_DEBUG(0, "Failed to instantiate endian converter device"); + exit(1); + } + + mas_asm_get_port_by_name (massink->endian, "endian_sink", &massink->endian_sink); + mas_asm_get_port_by_name (massink->endian, "endian_source", &massink->endian_source); + + sprintf (bps, "%u", massink->depth); + sprintf (ratestring, "%u", massink->frequency); + + GST_DEBUG (0, "Connecting net -> endian."); + masc_make_dc (&dc, 6); + + /* wav weirdness: 8 bit data is unsigned, >8 data is signed. */ + masc_append_dc_key_value (dc, "format", (massink->depth==8) ? "ulinear":"linear"); + masc_append_dc_key_value (dc, "resolution", bps); + masc_append_dc_key_value (dc, "sampling rate", ratestring); + masc_append_dc_key_value (dc, "channels", "2"); + masc_append_dc_key_value (dc, "endian", "little"); + err = mas_asm_connect_source_sink (massink->audio_source, massink->endian_sink, dc); + + if ( err < 0 ) { + GST_DEBUG(err, "Failed to connect net audio output to endian"); + return -1; + } + + /* The next device is 'if needed' only. After the following if() + statement, open_source will contain the current unconnected + source in the path (will be either endian_source or + squant_source in this case) + */ + + massink->open_source = massink->endian_source; + + if (massink->depth != 16) { + GST_DEBUG (0, "Sample resolution is not 16 bit/sample, instantiating squant device."); + err = mas_asm_instantiate_device ("squant", 0, 0, &massink->squant); + if (err < 0) { + GST_DEBUG(err, "Failed to instantiate squant device"); + return -1; + } + + mas_asm_get_port_by_name (massink->squant, "squant_sink", &massink->squant_sink); + mas_asm_get_port_by_name (massink->squant, "squant_source", &massink->squant_source); + + GST_DEBUG (0, "Connecting endian -> squant."); + + masc_make_dc (&dc, 6); + masc_append_dc_key_value (dc,"format",(massink->depth==8) ? "ulinear":"linear"); + masc_append_dc_key_value (dc, "resolution", bps); + masc_append_dc_key_value (dc, "sampling rate", ratestring); + masc_append_dc_key_value (dc, "channels", "2"); + masc_append_dc_key_value (dc, "endian", "host"); + err = mas_asm_connect_source_sink (massink->endian_source, massink->squant_sink, dc); + + if (err < 0) { + GST_DEBUG(err, "Failed to connect endian output to squant"); + return -1; + } + + /* sneaky: the squant device is optional -> pretend it isn't there */ + massink->open_source = massink->squant_source; + } + + + /* Another 'if necessary' device, as above */ + if (massink->frequency != 44100) { + GST_DEBUG (0, "Sample rate is not 44100, instantiating srate device."); + err = mas_asm_instantiate_device ("srate", 0, 0, &massink->srate); + + if (err < 0) { + GST_DEBUG (err, "Failed to instantiate srate device"); + return -1; + } + + mas_asm_get_port_by_name (massink->srate, "sink", &massink->srate_sink); + mas_asm_get_port_by_name (massink->srate, "source", &massink->srate_source); + + GST_DEBUG (0, "Connecting to srate."); + masc_make_dc (&dc, 6); + masc_append_dc_key_value (dc, "format", "linear"); + masc_append_dc_key_value (dc, "resolution", "16"); + masc_append_dc_key_value (dc, "sampling rate", ratestring); + masc_append_dc_key_value (dc, "channels", "2"); + masc_append_dc_key_value (dc, "endian", "host"); + + err = mas_asm_connect_source_sink (massink->open_source, massink->srate_sink, dc); + + if ( err < 0 ) { + GST_DEBUG(err, "Failed to connect to srate"); + return -1; + } + + + massink->open_source = massink->srate_source; + } + + GST_DEBUG(0, "Connecting to mix."); + masc_make_dc(&dc, 6); + masc_append_dc_key_value (dc, "format", "linear"); + masc_append_dc_key_value (dc, "resolution", "16"); + masc_append_dc_key_value (dc, "sampling rate", "44100"); + masc_append_dc_key_value (dc, "channels", "2"); + masc_append_dc_key_value (dc, "endian", "host"); + + err = mas_asm_connect_source_sink (massink->open_source, massink->mix_sink, dc); + + if ( err < 0 ) { + GST_DEBUG(err, "Failed to connect to mixer"); + return -1; + } + + GST_FLAG_SET (massink, GST_MASSINK_OPEN); + + masc_make_mas_data (&massink->data, BUFFER_SIZE); + + massink->data->header.type = 10; + + massink->data->header.media_timestamp = 0; + massink->data->header.sequence = 0; + + return TRUE; +} + +/*static void +gst_massink_close_audio (GstMassink *massink) +{ + mas_free_device(massink->endian); + mas_free_device(massink->srate); + mas_free_device(massink->squant); + + mas_free_port(massink->mix_sink); + mas_free_port(massink->srate_source); + mas_free_port(massink->srate_sink); + mas_free_port(massink->audio_source); + mas_free_port(massink->audio_sink); + mas_free_port(massink->endian_source); + mas_free_port(massink->endian_sink); + mas_free_port(massink->squant_source); + mas_free_port(massink->squant_sink); + mas_free_port(massink->open_source); + + mas_free_channel (massink->audio_channel); + masc_destroy_mas_data (massink->data); + + g_free (ratestring); + g_free (bps); + + GST_FLAG_UNSET (massink, GST_MASSINK_OPEN); + + GST_DEBUG (0, "massink: closed sound channel"); +}*/ + +static GstElementStateReturn +gst_massink_change_state (GstElement *element) +{ + g_return_val_if_fail (GST_IS_MASSINK (element), FALSE); + + /* if going down into NULL state, close the fd if it's open */ + if (GST_STATE_PENDING (element) == GST_STATE_NULL) { + //if (GST_FLAG_IS_SET (element, GST_MASSINK_OPEN)) + //gst_massink_close_audio (GST_MASSINK (element)); + /* otherwise (READY or higher) we need to open the fd */ + } else { + if (!GST_FLAG_IS_SET (element, GST_MASSINK_OPEN)) { + if (!gst_massink_open_audio (GST_MASSINK (element))) + return GST_STATE_FAILURE; + } + } + + if (GST_ELEMENT_CLASS (parent_class)->change_state) + return GST_ELEMENT_CLASS (parent_class)->change_state (element); + return GST_STATE_SUCCESS; +} + diff --git a/ext/mas/massink.h b/ext/mas/massink.h new file mode 100644 index 00000000..7194ef38 --- /dev/null +++ b/ext/mas/massink.h @@ -0,0 +1,94 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * + * 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_MASSINK_H__ +#define __GST_MASSINK_H__ + +#include <gst/gst.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <mas/mas.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GST_TYPE_MASSINK \ + (gst_massink_get_type()) +#define GST_MASSINK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MASSINK,GstMassink)) +#define GST_MASSINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MASSINK,GstMassink)) +#define GST_IS_MASSINK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MASSINK)) +#define GST_IS_MASSINK_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MASSINK)) + +typedef enum { + GST_MASSINK_OPEN = GST_ELEMENT_FLAG_LAST, + GST_MASSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2, +} GstMasSinkFlags; + +typedef struct _GstMassink GstMassink; +typedef struct _GstMassinkClass GstMassinkClass; + +struct _GstMassink { + GstElement element; + + GstPad *sinkpad; + + gboolean mute; + gint format; + gint depth; + gint channels; + gint frequency; + + gchar *host; + + mas_channel_t audio_channel; + mas_port_t mix_sink; + mas_port_t srate_source, srate_sink; + mas_port_t audio_source, audio_sink; + mas_port_t endian_sink, endian_source; + mas_port_t squant_sink, squant_source; + mas_port_t open_source; /* (!) */ + mas_device_t endian; + mas_device_t srate; + mas_device_t squant; + + struct mas_data *data; + GstClock *clock; +}; + +struct _GstMassinkClass { + GstElementClass parent_class; +}; + +GType gst_massink_get_type(void); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __GST_MASSINK_H__ */ |