From: <sl...@ke...> - 2007-03-30 15:59:46
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: slomo Date: Fri Mar 30 2007 15:59:39 UTC Log message: * configure.ac: * gst/auparse/gstauparse.c: (gst_au_parse_reset), (gst_au_parse_parse_header), (gst_au_parse_chain): * gst/auparse/gstauparse.h: Revert last change as we don't want plugins-good to depend on plugins-base CVS now. Modified files: . : ChangeLog configure.ac gst/auparse : gstauparse.c gstauparse.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2846&r2=1.2847 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/configure.ac.diff?r1=1.692&r2=1.693 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/auparse/gstauparse.c.diff?r1=1.68&r2=1.69 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/auparse/gstauparse.h.diff?r1=1.10&r2=1.11 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2846 retrieving revision 1.2847 diff -u -d -r1.2846 -r1.2847 --- ChangeLog 29 Mar 2007 18:51:32 -0000 1.2846 +++ ChangeLog 30 Mar 2007 15:59:26 -0000 1.2847 @@ -1,3 +1,12 @@ +2007-03-30 Sebastian Dröge <sl...@ci...> + + * configure.ac: + * gst/auparse/gstauparse.c: (gst_au_parse_reset), + (gst_au_parse_parse_header), (gst_au_parse_chain): + * gst/auparse/gstauparse.h: + Revert last change as we don't want plugins-good to depend on + plugins-base CVS now. 2007-03-29 Sebastian Dröge <sl...@ci...> * configure.ac: Index: configure.ac RCS file: /cvs/gstreamer/gst-plugins-good/configure.ac,v retrieving revision 1.692 retrieving revision 1.693 diff -u -d -r1.692 -r1.693 --- configure.ac 29 Mar 2007 18:51:32 -0000 1.692 +++ configure.ac 30 Mar 2007 15:59:26 -0000 1.693 @@ -47,7 +47,7 @@ dnl *** required versions of GStreamer stuff *** GST_REQ=0.10.11.1 -GSTPB_REQ=0.10.12.1 +GSTPB_REQ=0.10.11.1 dnl *** autotools stuff **** Index: gstauparse.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/auparse/gstauparse.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- gstauparse.c 29 Mar 2007 18:51:33 -0000 1.68 +++ gstauparse.c 30 Mar 2007 15:59:27 -0000 1.69 @@ -158,6 +158,7 @@ auparse->encoding = 0; auparse->samplerate = 0; auparse->channels = 0; + auparse->float_swap = 0; gst_adapter_clear (auparse->adapter); @@ -282,6 +283,8 @@ * http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/AU/Samples.html */ switch (auparse->encoding) { case 1: /* 8-bit ISDN mu-law G.711 */ law = 1; @@ -360,9 +363,13 @@ tempcaps = gst_caps_new_simple ("audio/x-raw-float", "rate", G_TYPE_INT, auparse->samplerate, "channels", G_TYPE_INT, auparse->channels, - "endianness", G_TYPE_INT, auparse->endianness, + "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, depth, NULL); auparse->sample_size = auparse->channels * depth / 8; + if (auparse->endianness != G_BYTE_ORDER) { + GST_DEBUG_OBJECT (auparse, "need to swap float byte order ourselves!"); + auparse->float_swap = depth; + } } else if (layout[0]) { tempcaps = gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, layout, NULL); @@ -467,7 +474,35 @@ } data = gst_adapter_peek (auparse->adapter, sendnow); - memcpy (GST_BUFFER_DATA (outbuf), data, sendnow); + /* audioconvert only handles floats in native endianness ... */ + switch (auparse->float_swap) { + case 32:{ + guint32 *indata = (guint32 *) data; + guint32 *outdata = (guint32 *) GST_BUFFER_DATA (outbuf); + gint i; + for (i = 0; i < (sendnow / sizeof (guint32)); ++i) { + outdata[i] = GUINT32_SWAP_LE_BE (indata[i]); + } + break; + } + case 64:{ + guint64 *indata = (guint64 *) data; + guint64 *outdata = (guint64 *) GST_BUFFER_DATA (outbuf); + for (i = 0; i < (sendnow / sizeof (guint64)); ++i) { + outdata[i] = GUINT64_SWAP_LE_BE (indata[i]); + default:{ + memcpy (GST_BUFFER_DATA (outbuf), data, sendnow); gst_adapter_flush (auparse->adapter, sendnow); auparse->buffer_offset += sendnow; Index: gstauparse.h RCS file: /cvs/gstreamer/gst-plugins-good/gst/auparse/gstauparse.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gstauparse.h 29 Mar 2007 18:51:33 -0000 1.10 +++ gstauparse.h 30 Mar 2007 15:59:27 -0000 1.11 @@ -62,6 +62,10 @@ guint samplerate; guint endianness; guint channels; + /* audioconvert only handles float in native endianness, + * so we need to swap endianness here ourselves for now */ + guint float_swap; /* 0, 32 or 64 */ }; struct _GstAuParseClass { |