Its not 16 bit alaw, i have to swap every 2 bytes, so i tell the audioconvert to get a sample of 16bits and swap it from 4321 to 1234. so the bytes (alaw samples) will be on the right position. I know its kinda odd, but my alaw file has the samples on the wrong order, so the bytes must be swaped, something like swap byte[0] with byte[1], byte[2] with byte[3]...and so goes on. I know i can make a element to do this, but i was trying to already use what is already done to acomplish the swaping.<br>
<br>Its not a endianess problem, its the alaw samples that are on the wrong order, i just use the audioconvert endianess to try to swap the samples for me.<br><br><div class="gmail_quote">On Mon, Jul 13, 2009 at 2:30 PM, Michael Smith <span dir="ltr"><<a href="mailto:msmith@xiph.org">msmith@xiph.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Mon, Jul 13, 2009 at 8:54 AM, Tiago Katcipis<<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>> wrote:<br>
> I have a file that is alaw encoded, but the file has the bytes swaped, every<br>
> two bytes must be swaped so the alaw decoder can decode properly. I started<br>
> to try to build a pipe but i got stuck.<br>
><br>
> The pipe:<br>
><br>
> gst-launch -v filesrc location=alaw_inv.dat ! audio/x-raw-int,<br>
> endianness=4321, channels=1, rate=8000, width=16, depth=16, signed=false !<br>
> audioconvert ! audio/x-raw-int, endianess=1234, channels=1, rate=8000,<br>
> width=16, depth=16, signed=false ! queue ! audio/x-alaw, rate=8000,<br>
> channels=1 ! alawdec ! audioconvert ! wavenc ! filesink<br>
> location=exemplo_convertido.<br>
> wav<br>
<br>
</div>This won't work, because audioconvert won't just do byteswapping on<br>
unknown data, which is basically what you want.<br>
<br>
It also won't work because you seem to have 16 bit a-law? GStreamer's<br>
alaw decoder doesn't support that; I've never heard of it being used -<br>
are you sure it's a-law? Regardless, you'll need a special decoder.<br>
<br>
Once you have written a decoder for this format, you can make that<br>
decoder accept the endianness your data is in, so you don't need to<br>
byteswap beforehand.<br>
<br>
Mike<br>
<br>
------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>"it might be a profitable thing to learn Java, but it has no intellectual value whatsoever" Alexander Stepanov<br>