fixed some GST_LIBS stuff added audiofile added gst-libs/audio building

Original commit message from CVS:
fixed some GST_LIBS stuff
added audiofile
added gst-libs/audio building
parent cc33fd24
SUBDIRS=sys ext
SUBDIRS=gst sys ext gst-libs
DIST_SUBDIRS=sys ext
DIST_SUBDIRS=gst sys ext gst-libs
......@@ -5,3 +5,5 @@
it better ;)
* check SDL optimisation flags
* check GST_* in configure.ac, there is too much in it
......@@ -348,6 +348,16 @@ AC_SUBST(X_PRE_LIBS)
AC_SUBST(X_EXTRA_LIBS)
AC_SUBST(X_LIBS)
dnl ==========================================================================
dnl ============================= gst plugins ================================
dnl ==========================================================================
dnl *** sine ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SINE, true)
GST_CHECK_FEATURE(SINE, [sine plugin], sinesrc, [
HAVE_SINE="yes"
])
dnl ==========================================================================
dnl ============================= sys plugins ================================
dnl ==========================================================================
......@@ -428,11 +438,11 @@ GST_CHECK_FEATURE(ARTSC, [artsd plugins], artsdsink, [
dnl *** audiofile ***
dnl this check uses the GST_CHECK_CONFIGPROG macro
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBAUDIOFILE, true)
GST_CHECK_FEATURE(LIBAUDIOFILE, [audiofile], afsink afsrc, [
translit(dnm, m, l) AC_SUBST(LIBAUDIOFILE_LIBS)
translit(dnm, m, l) AC_SUBST(LIBAUDIOFILE_CFLAGS)
GST_CHECK_CONFIGPROG(LIBAUDIOFILE, audiofile-config)
translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config)
])
dnl *** avifile ***
......@@ -1071,10 +1081,11 @@ AC_SUBST(LIBGST_LIBS)
AC_SUBST(LIBGST_CFLAGS)
dnl Vars for everyone else
GST_LIBS="\$(top_builddir)/gst/libgst.la $LIBGST_LIBS"
GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $LIBGST_CFLAGS"
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
dnl FIXME: is there a reason to add this top_builddir stuff ? don't think so
dnl GST_LIBS="\$(top_builddir)/gst/libgst.la $LIBGST_LIBS"
dnl GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $LIBGST_CFLAGS"
dnl AC_SUBST(GST_LIBS)
dnl AC_SUBST(GST_CFLAGS)
dnl #############################
dnl # Configure the subpackages #
......@@ -1127,6 +1138,8 @@ dnl stamp.h
dnl echo "$infomessages", infomessages="$infomessages"
AC_OUTPUT(
Makefile
gst/Makefile
gst/sine/Makefile
sys/Makefile
sys/oss/Makefile
sys/qcam/Makefile
......@@ -1135,11 +1148,14 @@ sys/vcd/Makefile
sys/vga/Makefile
sys/xvideo/Makefile
ext/Makefile
ext/audiofile/Makefile
ext/esd/Makefile
ext/lame/Makefile
ext/mad/Makefile
ext/sdl/Makefile
ext/vorbis/Makefile
gst-libs/Makefile
gst-libs/audio/Makefile
)
echo -e "configure: *** Plugins that will be built : $GST_PLUGINS_YES"
......
if USE_AUDIOFILE
AUDIOFILE_DIR=audiofile
else
AUDIOFILE_DIR=
endif
if USE_ESD
ESD_DIR=esd
else
......@@ -29,6 +35,7 @@ VORBIS_DIR=
endif
SUBDIRS=$(ESD_DIR) $(LAME_DIR) $(MAD_DIR) $(SDL_DIR) $(VORBIS_DIR)
SUBDIRS=$(AUDIOFILE_DIR) $(ESD_DIR) $(LAME_DIR) $(MAD_DIR) \
$(SDL_DIR) $(VORBIS_DIR)
DIST_SUBDIRS=esd lame mad sdl vorbis
DIST_SUBDIRS=audiofile esd lame mad sdl vorbis
plugindir = $(libdir)/gst
plugin_LTLIBRARIES = libafsink.la libafsrc.la
libafsink_la_SOURCES = gstafsink.c
libafsrc_la_SOURCES = gstafsrc.c
noinst_HEADERS = gstafsink.h gstafsrc.h
libafsink_la_LIBADD = $(AUDIOFILE_LIBS)
libafsrc_la_LIBADD = $(AUDIOFILE_LIBS)
libafsink_la_CFLAGS = $(GST_CFLAGS)
libafsrc_la_CFLAGS = $(GST_CFLAGS)
This plugin wraps the SGI Audiofile
(http://oss.sgi.com/projects/audiofile/) library into a src and sink
element.
You can read from and write to the supported formats (WAVE, AIFF, AIFFC,
NEXTSND).
What is supported :
* all the file formats
* integer sample data, both 2's complement and unsigned
* 8 or 16 bit width & depth (haven't tested others)
* sample rate
* some sort of endianness control
What isn't supported yet :
* float data
What you can do :
* src element only accepts location argument
* sink element accepts location, endianness and type
- location : file on the system to output
- endianness : at this time endianness is still a bit shady
you can either set 1234 or 4321;
setting it to 4321 will byteswap the buffer data
you might want to keep it at 1234 for now
- type : one of the file types
Use gstreamer-inspect on afsink and afsrc to see all of the supported
options.
Examples :
* tools/gstreamer-launch afsrc location=/opt/media/wav/dark-480-16-m.wav ! afsink type=2 location=/opt/media/wav/dark-480-16-m.aiff
Future plans :
* add float support
* wrap up afsink and afsrc with pipe and fork to act like data convertors,
allowing arbitrary choice of sink and src element
This diff is collapsed.
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* gstafsink.h:
*
* 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_AFSINK_H__
#define __GST_AFSINK_H__
#include <config.h>
#include <gst/gst.h>
#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
//GstElementDetails gst_afsink_details;
#define GST_TYPE_AFSINK \
(gst_afsink_get_type())
#define GST_AFSINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AFSINK,GstAFSink))
#define GST_AFSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AFSINK,GstAFSinkClass))
#define GST_IS_AFSINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AFSINK))
#define GST_IS_AFSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AFSINK))
typedef struct _GstAFSink GstAFSink;
typedef struct _GstAFSinkClass GstAFSinkClass;
typedef enum {
GST_AFSINK_OPEN = GST_ELEMENT_FLAG_LAST,
GST_AFSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} GstAFSinkFlags;
struct _GstAFSink {
GstElement element;
GstPad *sinkpad;
gchar *filename;
// FILE *file;
// AFfilesetup outfilesetup;
AFfilehandle file;
int format;
int channels;
int width;
unsigned int rate;
gboolean is_signed;
int type; /* type of output, compare to audiofile.h
* RAW, AIFF, AIFFC, NEXTSND, WAVE
*/
// FIXME : endianness is a little cryptic at this point
int endianness_data; /* 4321 or 1234 */
int endianness_wanted; /* same thing, but what the output format wants */
int endianness_output; /* what the output endianness will be */
};
struct _GstAFSinkClass {
GstElementClass parent_class;
/* signals */
void (*handoff) (GstElement *element,GstPad *pad);
};
GType gst_afsink_get_type(void);
//gboolean gst_afsink_factory_init (GstElementFactory *factory);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GST_AFSINK_H__ */
This diff is collapsed.
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* gstafsrc.h:
*
* 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_AFSRC_H__
#define __GST_AFSRC_H__
#include <config.h>
#include <gst/gst.h>
#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
//GstElementDetails gst_afsrc_details;
#define GST_TYPE_AFSRC \
(gst_afsrc_get_type())
#define GST_AFSRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AFSRC,GstAFSrc))
#define GST_AFSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AFSRC,GstAFSrcClass))
#define GST_IS_AFSRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AFSRC))
#define GST_IS_AFSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AFSRC))
typedef struct _GstAFSrc GstAFSrc;
typedef struct _GstAFSrcClass GstAFSrcClass;
typedef enum {
GST_AFSRC_OPEN = GST_ELEMENT_FLAG_LAST,
GST_AFSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} GstAFSrcFlags;
struct _GstAFSrc {
GstElement element;
GstPad *srcpad;
gchar *filename;
// FILE *file;
// AFfilesetup outfilesetup;
AFfilehandle file;
int format;
int channels;
int width;
unsigned int rate;
gboolean is_signed;
int type; /* type of output, compare to audiofile.h
* RAW, AIFF, AIFFC, NEXTSND, WAVE
*/
/* blocking */
gulong curoffset;
gulong bytes_per_read;
gulong seq;
guint64 framestamp;
// FIXME : endianness is a little cryptic at this point
int endianness_data; /* 4321 or 1234 */
int endianness_wanted; /* same thing, but what the output format wants */
int endianness_output; /* what the output endianness will be */
};
struct _GstAFSrcClass {
GstElementClass parent_class;
/* signals */
void (*handoff) (GstElement *element,GstPad *pad);
};
GType gst_afsrc_get_type(void);
//gboolean gst_afsrc_factory_init (GstElementFactory *factory);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GST_AFSRC_H__ */
libdir = $(libdir)/gst
## libdir = $(libdir)/gst
lib_LTLIBRARIES = libgstaudio.la
......
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