From 4be3e6fdbf067f75eed9ba59e2768890f6b317fa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Oct 2004 22:45:31 +0000 Subject: prepare next release git-svn-id: file:///home/lennart/svn/public/gst-pulse/trunk@6 bb39ca4e-bce3-0310-b5d4-eea78a553289 --- Makefile.am | 4 +- configure.ac | 10 ++--- doc/Makefile.am | 36 ++++++++++++++++++ doc/README.html.in | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/style.css | 34 +++++++++++++++++ doc/todo | 6 +++ src/Makefile.am | 24 +++++++++++- src/polypsink.c | 49 ++++++++++++++++-------- 8 files changed, 246 insertions(+), 25 deletions(-) create mode 100644 doc/Makefile.am create mode 100644 doc/README.html.in create mode 100644 doc/style.css create mode 100644 doc/todo diff --git a/Makefile.am b/Makefile.am index 5ab9c3c..22a5b47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,8 +26,8 @@ noinst_DATA = README README: rm -f README -# $(MAKE) -C doc README -# cd $(srcdir) && ln -s doc/README README + $(MAKE) -C doc README + cd $(srcdir) && ln -s doc/README README homepage: all dist test -d $$HOME/homepage/private diff --git a/configure.ac b/configure.ac index 24a169b..217ad2f 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. AC_PREREQ(2.57) -AC_INIT([gst-polyp],[0.2],[mzkzzfcbylc (at) 0pointer (dot) de]) +AC_INIT([gst-polyp],[0.1],[mzkzzfcbylc (at) 0pointer (dot) de]) AC_CONFIG_SRCDIR([src/plugin.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign -Wall]) @@ -47,10 +47,10 @@ ACX_PTHREAD if test -d ../polypaudio ; then POLYP_CFLAGS='-I$(top_srcdir)/../polypaudio' - POLYP_LIBS='-L$(top_srcdir)/../polypaudio/polyp -lpolyp-0.5 -lpolyp-error-0.5 -lpolyp-mainloop-0.5' + POLYP_LIBS='-L$(top_srcdir)/../polypaudio/polyp -lpolyp-0.6 -lpolyp-error-0.6 -lpolyp-mainloop-0.6' echo "*** Found polypaudio in ../polypaudio, using that version ***" else - PKG_CHECK_MODULES(POLYP, [ polyplib >= 0.5 ]) + PKG_CHECK_MODULES(POLYP, [ polyplib >= 0.6 ]) fi AC_SUBST(POLYP_LIBS) @@ -60,7 +60,7 @@ PKG_CHECK_MODULES(GST, [ gstreamer-0.8 >= 0.8.4 ]) AC_SUBST(GST_LIBS) AC_SUBST(GST_CFLAGS) -y + # If using GCC specifiy some additional parameters if test "x$GCC" = "xyes" ; then CFLAGS="$CFLAGS -pipe -Wall -W -Wno-unused-parameter" @@ -85,5 +85,5 @@ fi AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) -AC_CONFIG_FILES([Makefile src/Makefile]) # doc/Makefile doc/README.html]) +AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile doc/README.html]) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..86a684f --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,36 @@ +# $Id$ + +# This file is part of gst-polyp. +# +# gst-polyp is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# gst-polyp 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with gst-polyp; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +noinst_DATA = README.html README +EXTRA_DIST = $(noinst_DATA) style.css README.html.in + +MAINTAINERCLEANFILES = README README.html +CLEANFILES = + +if USE_LYNX +README: README.html + lynx --dump $^ | sed 's,file://localhost/.*/doc/README.html,README,' > $@ + +CLEANFILES += README +endif + +tidy: README.html + tidy -e < README.html + +.PHONY: tidy + diff --git a/doc/README.html.in b/doc/README.html.in new file mode 100644 index 0000000..6e5057c --- /dev/null +++ b/doc/README.html.in @@ -0,0 +1,108 @@ + + + + + +gst-polyp @PACKAGE_VERSION@ + + + + +

gst-polyp @PACKAGE_VERSION@

+ +

Copyright 2004 Lennart Poettering <@PACKAGE_BUGREPORT@>

+ + + +

License

+ +

This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version.

+ +

This program 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 +General Public License for more details.

+ +

You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

+ +

News

+ +
Thu Oct 28 2004:

Version 0.1 released

+ +

Overview

+ +

gst-polyp is a GStreamer 0.8 sink for the polypaudio sound server.

+ +

Status

+ +

It ist tested and works quite fine with Rhythmbox. However, there's much room for improvements:

+ + + +

Documentation

+ +

There is not much to say. Just install this software, the driver is than available as polypsink.

+ +

Requirements

+ +

Currently, gst-polyp is tested on Linux only.

+ +

gst-polyp was developed and tested on Debian GNU/Linux +"testing" from October 2004, it should work on most other Linux +distributions (and maybe Unix versions) since it uses GNU autoconf for +source code configuration.

+ +

Obviously gst-polyp requires an installation of +polypaudio (version 0.6) and gstreamer 0.8.x.

+ +

Installation

+ +

As this package is made with the GNU autotools you should run +./configure inside the distribution directory for configuring +the source tree. After that you should run make for +compilation and make install (as root) for installation of +gst-polyp.

+ +

Acknowledgements

+ +

None so far.

+ +

Download

+ +

The newest release is always available from @PACKAGE_URL@

+ +

The current release is @PACKAGE_VERSION@

+ +

Get gst-polyp's development sources from the Subversion repository (viewcvs):

+ +
svn checkout svn://seth.intheinter.net/gst-polyp/trunk gst-polyp
+ +

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.

+ +
+
Lennart Poettering <@PACKAGE_BUGREPORT@>, October 2004
+
$Id$
+ + + diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 0000000..a929242 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,34 @@ +/* $Id$ */ + +/*** + * This file is part of gst-polyp. + * + * gst-polyp is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gst-polyp 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gst-polyp; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + ***/ + +body { color: black; background-color: white; margin: 0.5cm; } +a:link, a:visited { color: #900000; } +p { margin-left: 0.5cm; margin-right: 0.5cm; } +div.news-date { margin-left: 0.5cm; font-size: 80%; color: #4f0000; } +p.news-text { margin-left: 1cm; } +h1 { color: #00009F; } +h2 { color: #00009F; } +h3 { color: #00004F; margin-left: 0.5cm; } +ul { margin-left: .5cm; } +ol { margin-left: .5cm; } +pre { margin-left: .5cm; background-color: #f0f0f0; padding: 0.4cm;} +.grey { color: #afafaf; } +table { margin-left: 1cm; border:1px solid lightgrey; padding: 0.2cm; } +td { padding-left:10px; padding-right:10px; } diff --git a/doc/todo b/doc/todo new file mode 100644 index 0000000..72b9c56 --- /dev/null +++ b/doc/todo @@ -0,0 +1,6 @@ +* polypsource +* mixer interface +* latency measurement +* timer + +$Id$ diff --git a/src/Makefile.am b/src/Makefile.am index 1bd1fae..8027091 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,14 +1,34 @@ +# $Id$ +# +# This file is part of gst-polyp. +# +# gst-polyp is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# gst-polyp 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with gst-polyp; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + plugindir=/tmp/ -plugin_LTLIBRARIES = libgstpolyp.la +pkglib_LTLIBRARIES = libgstpolyp.la libgstpolyp_la_SOURCES = plugin.c polypsink.c libgstpolyp_la_CFLAGS = $(GST_CFLAGS) $(POLYP_CFLAGS) libgstpolyp_la_LIBADD = $(POLYP_LIBS) $(GST_LIBS) +install-exec-hook: reg reg: - gst-register-0.8 --gst-plugin-path=`pwd` + gst-register-0.8 --gst-plugin-path=$(pkglibdir) inspect: gst-inspect-0.8 polypsink diff --git a/src/polypsink.c b/src/polypsink.c index 70f5b41..6376662 100644 --- a/src/polypsink.c +++ b/src/polypsink.c @@ -29,25 +29,25 @@ static void gst_polypsink_base_init(gpointer g_class) { GST_PAD_ALWAYS, GST_STATIC_CAPS( "audio/x-raw-int, " - "endianness = (int) 1234, " /*{ LITTLE_ENDIAN , BIG_ENDIAN }, "*/ + "endianness = (int) { LITTLE_ENDIAN , BIG_ENDIAN }, " "signed = (boolean) TRUE, " "width = (int) 16, " "depth = (int) 16, " - "rate = (int) 44100, " /*[ 1000, 192000 ], "*/ - "channels = (int) [ 1, 16 ]" /*[ 1, 16 ];"*/ - -/* "audio/x-raw-float, " */ -/* "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " */ -/* "width = (int) 32, " */ -/* "rate = (int) [ 1000, 192000 ], " */ -/* "channels = (int) [ 1, 16 ];" */ + "rate = (int) [ 1, MAX ], " + "channels = (int) [ 1, 16 ];" + + "audio/x-raw-float, " + "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " + "width = (int) 32, " + "rate = (int) [ 1, MAX ], " + "channels = (int) [ 1, 16 ];" -/* "audio/x-raw-int, " */ -/* "signed = (boolean) FALSE, " */ -/* "width = (int) 8, " */ -/* "depth = (int) 8, " */ -/* "rate = (int) [ 1000, 192000 ], " */ - /* "channels = (int) [ 1, 16 ]"*/) + "audio/x-raw-int, " + "signed = (boolean) FALSE, " + "width = (int) 8, " + "depth = (int) 8, " + "rate = (int) [ 1, MAX ], " + "channels = (int) [ 1, 16 ]") ); static const GstElementDetails details = { @@ -294,7 +294,7 @@ static void create_stream(GstPolypSink *polypsink) { pa_stream_set_state_callback(polypsink->stream, stream_state_callback, polypsink); pa_stream_set_write_callback(polypsink->stream, stream_write_callback, polypsink); - pa_stream_connect_playback(polypsink->stream, NULL, NULL, PA_VOLUME_NORM); + pa_stream_connect_playback(polypsink->stream, NULL, NULL, 0, PA_VOLUME_NORM); } static void create_context(GstPolypSink *polypsink) { @@ -506,6 +506,22 @@ static GstPadLinkReturn gst_polypsink_link(GstPad *pad, const GstCaps *caps) { return GST_PAD_LINK_OK; } +static GstCaps* gst_polypsink_sink_fixate(GstPad *pad, const GstCaps *caps) { + GstCaps *newcaps; + GstStructure *structure; + + newcaps = gst_caps_new_full(gst_structure_copy(gst_caps_get_structure(caps, 0)), NULL); + structure = gst_caps_get_structure(newcaps, 0); + + if (gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100) || + gst_caps_structure_fixate_field_nearest_int (structure, "depth", 16) || + gst_caps_structure_fixate_field_nearest_int (structure, "width", 16) || + gst_caps_structure_fixate_field_nearest_int (structure, "channels", 2)) + return newcaps; + + gst_caps_free (newcaps); + return NULL; +} static void gst_polypsink_init(GTypeInstance* instance, gpointer g_class) { GstPolypSink *polypsink = GST_POLYPSINK(instance); @@ -517,6 +533,7 @@ static void gst_polypsink_init(GTypeInstance* instance, gpointer g_class) { gst_element_add_pad(GST_ELEMENT(polypsink), polypsink->sinkpad); gst_pad_set_chain_function(polypsink->sinkpad, gst_polypsink_chain); gst_pad_set_link_function(polypsink->sinkpad, gst_polypsink_link); + gst_pad_set_fixate_function (polypsink->sinkpad, gst_polypsink_sink_fixate); /* GST_FLAG_SET(polypsink, GST_ELEMENT_THREAD_SUGGESTED); */ GST_FLAG_SET(polypsink, GST_ELEMENT_EVENT_AWARE); -- cgit