[gst-cvs] CVS: gstreamer/libs/audio gstaudio.h,1.4,1.4.4.1
Erik Walthinsen
omegahacker at users.sourceforge.net
Wed Oct 17 01:52:26 PDT 2001
- Previous message: [gst-cvs] CVS: gstreamer/libs Makefile.am,1.14.4.1,1.14.4.2
- Next message: [gst-cvs] CVS: gstreamer/gst Makefile.am,1.74.4.4,1.74.4.5 cothreads.h,1.15,1.15.6.1 gobject2gtk.c,1.9.4.3,1.9.4.4 gobject2gtk.h,1.14.2.5,1.14.2.6 gst.c,1.42.4.4,1.42.4.5 gst.h,1.24.4.1,1.24.4.2 gstautoplug.c,1.22.4.2,1.22.4.3 gstbin.c,1.89.2.2,1.89.2.3 gstelement.c,1.73.2.5,1.73.2.6 gstelement.h,1.59.4.4,1.59.4.5 gstelementfactory.c,1.42.4.1,1.42.4.2 gstextratypes.c,1.5,1.5.4.1 gstlog.h,1.2,1.2.14.1 gstobject.c,1.23.4.2,1.23.4.3 gstpad.c,1.104.2.4,1.104.2.5 gstpad.h,1.62.4.3,1.62.4.4 gstparse.c,1.21.4.1,1.21.4.2 gstpipeline.c,1.52,1.52.4.1 gstplugin.c,1.64.4.1,1.64.4.2 gstpluginfeature.c,1.2,1.2.4.1 gstprops.c,1.41.4.1,1.41.4.2 gstqueue.c,1.16,1.16.4.1 gstscheduler.c,1.31.4.2,1.31.4.3 gstthread.c,1.52.4.2,1.52.4.3 gsttrace.c,1.5,1.5.6.1 gsttype.c,1.30,1.30.4.1 gsttypefind.c,1.10,1.10.4.1 gstutils.c,1.15,1.15.4.1 gstutils.h,1.8,1.8.4.1 gstxml.c,1.22,1.22.4.1 gstdparam.c,1.3,NONE gstdparam.h,1.3,NONE gstdparammanager.c,1.3,NONE gstdparammanager.h,1.2,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/gstreamer/gstreamer/libs/audio
In directory usw-pr-cvs1:/tmp/cvs-serv20849/libs/audio
Modified Files:
Tag: BRANCH-EVENTS1
gstaudio.h
Log Message:
merge from HEAD on 20011016
Index: gstaudio.h
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/libs/audio/gstaudio.h,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -d -r1.4 -r1.4.4.1
--- gstaudio.h 2001/06/13 21:08:02 1.4
+++ gstaudio.h 2001/10/17 08:51:00 1.4.4.1
@@ -18,13 +18,76 @@
* Boston, MA 02111-1307, USA.
*/
+#include <gst/gst.h>
+
+/* for people that are looking at this source: the purpose of these defines is
+ * to make GstCaps a bit easier, in that you don't have to know all of the
+ * properties that need to be defined. you can just use these macros. currently
+ * (8/01) the only plugins that use these are the passthrough, speed, volume,
+ * and [de]interleave plugins. so. these are for convenience only, and do not
+ * specify the 'limits' of gstreamer. you might also use these definitions as a
+ * base for making your own caps, if need be.
+ *
+ * for example, to make a source pad that can output mono streams of either
+ * float or int:
+
+ template = gst_padtemplate_new
+ ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
+ gst_caps_append(gst_caps_new ("sink_int", "audio/raw",
+ GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
+ gst_caps_new ("sink_float", "audio/raw",
+ GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS)),
+ NULL);
+
+ srcpad = gst_pad_new_from_template(template,"src");
+
+ * Andy Wingo, 18 August 2001 */
+
+#define GST_AUDIO_INT_PAD_TEMPLATE_PROPS \
+ gst_props_new (\
+ "format", GST_PROPS_STRING ("int"),\
+ "law", GST_PROPS_INT (0),\
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),\
+ "signed", GST_PROPS_LIST (\
+ GST_PROPS_BOOLEAN (TRUE),\
+ GST_PROPS_BOOLEAN(FALSE)\
+ ),\
+ "width", GST_PROPS_LIST (GST_PROPS_INT(8), GST_PROPS_INT(16)),\
+ "depth", GST_PROPS_LIST (GST_PROPS_INT(8), GST_PROPS_INT(16)),\
+ "rate", GST_PROPS_INT_RANGE (4000, 96000),\
+ "channels", GST_PROPS_INT_RANGE (1, G_MAXINT),\
+ NULL)
+
+#define GST_AUDIO_INT_MONO_PAD_TEMPLATE_PROPS \
+ gst_props_new (\
+ "format", GST_PROPS_STRING ("int"),\
+ "law", GST_PROPS_INT (0),\
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),\
+ "signed", GST_PROPS_LIST (\
+ GST_PROPS_BOOLEAN (TRUE),\
+ GST_PROPS_BOOLEAN(FALSE)\
+ ),\
+ "width", GST_PROPS_LIST (GST_PROPS_INT(8), GST_PROPS_INT(16)),\
+ "depth", GST_PROPS_LIST (GST_PROPS_INT(8), GST_PROPS_INT(16)),\
+ "rate", GST_PROPS_INT_RANGE (4000, 96000),\
+ "channels", GST_PROPS_INT (1),\
+ NULL)
+
+#define GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS \
+ gst_props_new (\
+ "format", GST_PROPS_STRING ("float"),\
+ "layout", GST_PROPS_STRING ("gfloat"),\
+ "intercept", GST_PROPS_FLOAT (0.0),\
+ "slope", GST_PROPS_FLOAT (1.0),\
+ "rate", GST_PROPS_INT_RANGE (4000, 96000),\
+ "channels", GST_PROPS_INT (1),\
+ NULL)
+
/*
* this library defines and implements some helper functions for audio
* handling
*/
-#include <gst/gst.h>
-
/* get byte size of audio frame (based on caps of pad */
int gst_audio_frame_byte_size (GstPad* pad);
@@ -42,4 +105,5 @@
/* check if the buffer size is a whole multiple of the frame size */
gboolean gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf);
+
- Previous message: [gst-cvs] CVS: gstreamer/libs Makefile.am,1.14.4.1,1.14.4.2
- Next message: [gst-cvs] CVS: gstreamer/gst Makefile.am,1.74.4.4,1.74.4.5 cothreads.h,1.15,1.15.6.1 gobject2gtk.c,1.9.4.3,1.9.4.4 gobject2gtk.h,1.14.2.5,1.14.2.6 gst.c,1.42.4.4,1.42.4.5 gst.h,1.24.4.1,1.24.4.2 gstautoplug.c,1.22.4.2,1.22.4.3 gstbin.c,1.89.2.2,1.89.2.3 gstelement.c,1.73.2.5,1.73.2.6 gstelement.h,1.59.4.4,1.59.4.5 gstelementfactory.c,1.42.4.1,1.42.4.2 gstextratypes.c,1.5,1.5.4.1 gstlog.h,1.2,1.2.14.1 gstobject.c,1.23.4.2,1.23.4.3 gstpad.c,1.104.2.4,1.104.2.5 gstpad.h,1.62.4.3,1.62.4.4 gstparse.c,1.21.4.1,1.21.4.2 gstpipeline.c,1.52,1.52.4.1 gstplugin.c,1.64.4.1,1.64.4.2 gstpluginfeature.c,1.2,1.2.4.1 gstprops.c,1.41.4.1,1.41.4.2 gstqueue.c,1.16,1.16.4.1 gstscheduler.c,1.31.4.2,1.31.4.3 gstthread.c,1.52.4.2,1.52.4.3 gsttrace.c,1.5,1.5.6.1 gsttype.c,1.30,1.30.4.1 gsttypefind.c,1.10,1.10.4.1 gstutils.c,1.15,1.15.4.1 gstutils.h,1.8,1.8.4.1 gstxml.c,1.22,1.22.4.1 gstdparam.c,1.3,NONE gstdparam.h,1.3,NONE gstdparammanager.c,1.3,NONE gstdparammanager.h,1.2,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Gstreamer-commits
mailing list