[gst-devel] tee src pad buffers

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Feb 27 19:51:23 CET 2009


On Fri, 2009-02-27 at 10:26 -0800, Ron McOuat wrote:

Hi,

> [tee element internals] From this I presume tee replicates references
> and not actual contents.

Correct.

> My issue is using a live source, downstream from the tee I offset time 
> stamps using a buffer probe handler for when recording is turned on or 
> off in one of the branches. The time offset changes bleed into the other 
> tee branches because of what I think is buffer reference copying instead 
> of content copying.

Correct. You aren't really allowed to do this in a buffer probe
callback. What you want to do before changing the offset is
gst_buffer_make_writable(), which will copy the buffer *structure* and
metadata if needed (but not the content) so you can change it. However,
you can't use that in a pad probe callback, since you can't return the
new buffer pointer.

You should/need to write an element to do this.


> As an alternate I could feed the front end into a multifdsink and then 
> pull the data out for the different purposes by connecting to that 
> element using a UNIX socket. I would prefer to not do this for 
> efficiency reasons but the system use is minimal for moving data around 
> so maybe not a good reason to avoid this approach.

The latest gst-plugins-base release contains the appsink element, which
is a much easier and much more efficient way to get data out of a
pipeline if you have to.

Cheers
 -Tim






More information about the gstreamer-devel mailing list