Regarding gstreamer api for accepting data buffer as argument
sreegowris at gmail.com
Wed Dec 7 21:19:07 PST 2011
On Fri, Nov 25, 2011 at 4:55 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:
> On Fri, 2011-11-25 at 10:14 +0530, Sree Gowri wrote:
> > I am developing a live audio streaming application using the gstreamer
> > API’s. I have tried with the following API’s of
> > gstreamer,[gst_element_factory_make()] which accepts file as the
> > argument. But require gstreamer API which accepts byte* buffer as an
> > argument as we are managing the connections in a different layer and
> > my streaming-application will receive the live audio streaming buffer
> > periodically from other components.
> Maybe you're looking for the appsrc element? (from gst-plugins-base)
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
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
code snippet as follows
const int READBUF = 188*1000;
bytes_read = fread(data, 1, READBUF, fp);
buf =( GstBuffer *) gst_app_buffer_new (data, READBUF, g_free, data);
and the pipeline is "pipeline= gst_parse_launch("appsrc name=mysource
!audio/mpeg ! mad ! alsasink", NULL);"
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.
I am investigating on this. Kindly let me know if I am missing anything.
Soon will post the entire code.
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
Kindly let me know on this.
Thanks and Regards,
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel