Buffer usage query

Tim-Philipp Müller t.i.m at zen.co.uk
Sat Jan 19 05:36:50 PST 2013


On Sat, 2013-01-19 at 02:38 -0800, Sudhirkumar wrote:

Hi,

> We are developing an application which requires the following:
> 
> 1) Data is already present in an memory buffer. This data has to be given as
> input to "Element" in an pipeline.
> 
> *Is there any procedure for constructing the pipeline to solve our problem.*

Use an appsrc element. Construct GstBuffers from your memory and push
the buffers into appsrc. You need to figure out how to best manage the
memory (to make sure it gets freed when the buffer gets freed, but not
sooner). GST_BUFFER_FREE_FUNC might be useful if you have special
requirements (in 0.10). In 1.0 there's GstMemory.


> 2) We receive an TS stream with Audio, Video, proprietary speech codec and
> data carousel. 
>    
>     a) We have a decode function written in 'C', which takes a buffer and
> outputs a buffer. Can we take data from gstreamer pipeline? Our Idea is to
> use pipeline until demux for proprietary speech codec and use our C function
> to decode. The decoded buffer will be used with audio sink (as queried in
> #1)

You could use an appsink element to get buffers/data out of the
pipeline. Or simply write your own element and use your C function
inside the element.


 Cheers
  -Tim



More information about the gstreamer-devel mailing list