Commit 4a65aa25 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo

caps refcounting fixes for float2int fixed wrt setting of caps on int pad with...

caps refcounting fixes for float2int fixed wrt setting of caps on int pad with dynamic number of sink pads in float2i...

Original commit message from CVS:
* caps refcounting fixes for float2int
* fixed wrt setting of caps on int pad with dynamic number of sink pads in float2int
* added libsndfile plugin (currently only the src is implemented) - currently only float output, noninterleaved is implemented
parent c7cc73bf
......@@ -425,10 +425,10 @@ GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [
CFLAGS=$X_CFLAGS
dnl check for PIC static lib
GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv_pic -lXext")
GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv_pic -lXext")
if test x$HAVE_XVIDEO = xno; then
dnl PIC lib not found, check for regular lib
GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xvlib.h, XVIDEO_LIBS="-lXv -lXext")
GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv -lXext")
fi
AC_SUBST(XVIDEO_LIBS)
......@@ -495,8 +495,7 @@ GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
dnl we need this function
AC_CHECK_LIB(audiofile, afOpenVirtualFile, , HAVE_AUDIOFILE="no")
fi
])
fi])
dnl *** CDParanoia ***
translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
......@@ -928,6 +927,14 @@ GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
AC_SUBST(LIBPNG_LIBS)
])
dnl *** sndfile ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SNDFILE, true)
GST_CHECK_FEATURE(SNDFILE, [sndfile plug-in], sfsrc sfsink, [
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)
])
dnl *** swfdec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SWFDEC, true)
GST_CHECK_FEATURE(SWFDEC, [swfdec plug-in], swfdec, [
......@@ -1270,6 +1277,7 @@ ext/shout2/Makefile
ext/sidplay/Makefile
ext/smoothwave/Makefile
ext/snapshot/Makefile
ext/sndfile/Makefile
ext/swfdec/Makefile
ext/vorbis/Makefile
ext/tarkin/Makefile
......
......@@ -214,6 +214,12 @@ else
SMOOTHWAVE_DIR=
endif
if USE_SNDFILE
SNDFILE_DIR=sndfile
else
SNDFILE_DIR=
endif
if USE_SWFDEC
SWFDEC_DIR=swfdec
else
......
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libgstsndfile.la
libgstsndfile_la_SOURCES = gstsf.c
libgstsndfile_la_CFLAGS = $(GST_CFLAGS) $(SNDFILE_CFLAGS)
libgstsndfile_la_LIBADD = $(SNDFILE_LIBS)
libgstsndfile_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsf.h
This diff is collapsed.
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
* 2003 Andy Wingo <wingo at pobox dot com>
*
* gstsf.c: libsndfile plugin for GStreamer
*
* 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_SFSINK_H__
#define __GST_SFSINK_H__
#include <config.h>
#include <gst/gst.h>
#include <sndfile.h>
G_BEGIN_DECLS
#define GST_TYPE_SF \
(gst_sf_get_type())
#define GST_SF(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SF,GstSF))
#define GST_SF_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SF,GstSFClass))
#define GST_IS_SF(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SF))
#define GST_IS_SF_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SF))
#define GST_TYPE_SFSRC \
(gst_sfsrc_get_type())
#define GST_SFSRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SFSRC,GstSF))
#define GST_SFSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SFSRC,GstSFClass))
#define GST_IS_SFSRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SFSRC))
#define GST_IS_SFSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SFSRC))
#define GST_TYPE_SFSINK \
(gst_sfsink_get_type())
#define GST_SFSINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SFSINK,GstSF))
#define GST_SFSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SFSINK,GstSFClass))
#define GST_IS_SFSINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SFSINK))
#define GST_IS_SFSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SFSINK))
typedef struct _GstSF GstSF;
typedef struct _GstSFClass GstSFClass;
typedef enum {
GST_SF_OPEN = GST_ELEMENT_FLAG_LAST,
GST_SF_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} GstSFlags;
typedef struct {
GstPad *pad;
gint num;
gboolean caps_set;
} GstSFChannel;
#define GST_SF_CHANNEL(l) ((GstSFChannel*)l->data)
struct _GstSF {
GstElement element;
GList *channels;
gchar *filename;
SNDFILE *file;
void *buffer;
gboolean loop;
gboolean create_pads;
gint channelcount;
gint numchannels;
gint format_major;
gint format_subtype;
gint format;
gint rate;
};
struct _GstSFClass {
GstElementClass parent_class;
};
GType gst_sf_get_type (void);
GType gst_sfsrc_get_type (void);
GType gst_sfsink_get_type (void);
G_END_DECLS
#endif /* __GST_SFSINK_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment