Is that possible for a source element pushing GstBufferList?
Tim-Philipp Müller
t.i.m at zen.co.uk
Mon Jun 13 02:50:07 PDT 2011
On Mon, 2011-06-13 at 17:12 +0800, Shu-Yu Fu wrote:
Hi,
> Currently, I need to implement a source element which pushes a
> GstBufferList.
Out of curiosity, what kind of element is this?
> But, a sub-class (GstPushSrc) of GstBaseSrc is expected to generate a
> GstBuffer in the create function. Returning a GstBufferList is
> not valided at all.
>
> I am also grep the source code packages (gstreamer-0.10.34,
> gst-plugins-base-0.10.34 and gst-plugins-good-0.10.29), but didn't
> find any thing helpful.
>
> But,the document says I can push a GstBufferList to the peer pad
> (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-push-list) or chain a GstBufferList to a pad (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-chain-list).
>
> So, I was wondering does that means I have to write my own source
> element (like GstBaseSrc did)?
> Or, there is an easy way to do that?
> Or, there are some examples I missed?
You're right, the GstBaseSrc/GstPushSrc API currently doesn't cater for
buffer lists, which is mostly for historical reasons, and because no one
really needed that functionality yet (as far as I know, anyway).
I think it'd be best if you tried to add that functionality to
GstBaseSrc. Don't try to write your own source that doesn't use
GstBaseSrc.
Alternatively, you could do something like gst_pad_push_list() from your
create() function and then return a buffer of 0 size or so to the base
class. That's a bit hackish though.
Cheers
-Tim
More information about the gstreamer-devel
mailing list