Pushing Multiple buffers form source element

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Apr 8 01:41:31 PDT 2011


On Fri, 2011-04-08 at 11:24 +0530, ramanadh ravinuthala wrote:

> How can we push the multiple buffers from the source element in the
> create function
> My source element will create multiple streams and has to push all the
> streams at a time with different buffers(like list of buffers)
> Is there any way for it

GstBaseSrc/GstPushSrc (which I assume you are using because you refer to
"the create function") aren't really designed for that. You could of
course just add additional pads in your subclass and just push on those
pads from the create function, but that would mean other things that the
base class does in certain cases (e.g. timestamp buffers in live mode,
set caps, event/query handling etc.) won't be done for those buffers
unless you do it yourself. But then you should probably just write your
own GstElement instead of deriving from BaseSrc.

Alternatively, you could make a really simple pseudo-mux format and
output your multiple buffers as one buffer or buffer list, and then have
a simple demuxer after your source that splits that single buffer or
buffer list into multiple buffers/streams.

 Cheers
  -Tim




More information about the gstreamer-devel mailing list