How to make avdec_h264 use custom buffer pool to dump decoded data

Nicolas Dufresne nicolas.dufresne at collabora.com
Thu Nov 13 06:56:25 PST 2014


Le 2014-11-13 05:17, ajay kumar a écrit :
> Am using Gstreamer-1.0. I've a pool of display buffers which I want
> 'avdec_h264' decoder plugin to use to dump decoded raw data. Currently I'm
> doing a 'memcpy' of decoded raw buffers to the display buffers which is
> deteriorating the framerate. So, how can I make 'avdec_h264' use the display
> buffers directly to dump the decoded data from application and avoid the
> 'memcpy'.
>
In your display sink element, you will have to derive GstAllocator and 
GstVideoBufferPool. Then you will have to override propose_allocation() 
method of GstBaseSink in order to offer your own allocator and pool. So 
I'd first suggest you to get familiar with these, the best example I can 
think of is the implementation of xvimagesink.

Nicolas


More information about the gstreamer-devel mailing list