[gst-devel] buffer passing through pads .
LRN
lrn1986 at gmail.com
Mon Jul 20 06:56:52 CEST 2009
sudarshan bisht wrote:
> Hi All ,
> I want to know does Gstreamer pass buffers from one plugin to
> another using pads , what internally pad does in order to send buffer to
> next plugin's pad .
> I mean is it some sort of shared buffer mechanism ?
>
>
1) Some elements will try to ask downstream elements to allocate the
buffer for them. Sinks usually do. This allows GStreamre to eliminate
unnecessary buffer copying.
2) Whenever you do gst_pad_push, you're losing the buffer you've pushed
(if you want to keep it around, _ref() it). Some elements can do
in-place transformations, without creating a new output buffer from
input buffer. In extreme cases (pipelines) a single buffer produced
(allocated) by the source element will travel downstream all the way
without actually moving in memory, and will be copied only by the sink
element.
3) You can run gst-launch-0.10 in gdb, break on gst_pad_push() and see
for yourself how exactly does it work.
More information about the gstreamer-devel
mailing list