pushsrc element using downstream buffer

Sebastian Dröge sebastian at centricular.com
Wed Aug 6 00:32:30 PDT 2014


On Mo, 2014-08-04 at 09:20 +0200, Thomas Scheuermann wrote:
> Hello,
> 
> is there a simple example of a pushsrc element, which uses downstream
> buffers?
> I want to write a pushsrc element which should use the buffers provided
> by vaapiencode_h264 element that a copy can be avoided.

basesrc will do that automatically for you by default, but you might
need to override GstBaseSrc::decide_allocation() if you need something
special. Also you must only override GstPushSrc::fill() and not
GstPushSrc::create(), as the allocation from the buffer pool happens in
GstPushSrc::alloc() (which you could also call yourself from ::create()
if you need special allocation behaviour).

::create() is basically ::alloc() followed by ::fill().

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140806/37e33b62/attachment.sig>


More information about the gstreamer-devel mailing list