On Fri, Nov 25, 2011 at 4:55 PM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 2011-11-25 at 10:14 +0530, Sree Gowri wrote:<br>
><br>
> I am developing a live audio streaming application using the gstreamer<br>
> API’s. I have tried with the following API’s of<br>
> gstreamer,[gst_element_factory_make()] which accepts file as the<br>
> argument. But require gstreamer API which accepts byte* buffer as an<br>
> argument as we are managing the connections in a different layer and<br>
> my streaming-application will receive the live audio streaming buffer<br>
> periodically from other components.<br>
<br>
</div>Maybe you're looking for the appsrc element? (from gst-plugins-base)<br>
<br>
Cheers<br>
-Tim<br>
<br></blockquote><div>Hi,<br>
<br>
Thanks tim for your reply. I used appsrc to pass the buffer to the
pipeline. From the file, buffer is read of size READBUF and then passed to
gst_app_buffer_new. <br>
<br>
I have defined READBUF as 188*1000. What is the ideal way of the buffer
size to be? Is there any standard size of the buffer to be passed to the
gst_app_buffer_new.<br>
<br>
code snippet as follows <br>
"<br>
const int READBUF = 188*1000;<br>
bytes_read = fread(data, 1, READBUF, fp);<br>
buf =( GstBuffer *) gst_app_buffer_new (data, READBUF, g_free, data);<br>
"<br>
<br>
and the pipeline is "pipeline= gst_parse_launch("appsrc name=mysource !audio/mpeg ! mad ! alsasink", NULL);"<br>
<br>
However I can listen only to some portion of audio from the file and
then gets segmentation fault. Not sure why the entire buffer is not
playing. <br>
<br>
I am investigating on this. Kindly let me know if I am missing anything. Soon will post the entire code. <br>
<br>
<br>
Currently buffer contains only mp3 data. In case if buffer contains mp3
data+metadata, does gstreamer skips the metadata and plays only audio
data?? or do we need to remove the metadata and then give only audio
data to gstreamer. <br>
<br>
Kindly let me know on this.<br><br>Thanks and Regards,<br>Gowri<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>