[gst-devel] Query regarding GstPadBufferAllocFunction for allocating physically continues mem

#KUGAN VIVEKANANDARAJAH# kugan at pmail.ntu.edu.sg
Tue Mar 27 10:13:20 CEST 2007


Hi All,
I have a hardware implementation of a filter and need to write a gsteramer wrapper for this work in a gstreamer pipeline. As a first step, I want to test this on a  gstemare pipeline witth videotetsrc -> filter ->tvout. Here filter and tvout are hardware modules for which I will be writing the gstreamer plugins. However, in doing this I have run into following problem:
1. I need to allocate physically continuous memory such that the hardware modules can do DMA on them. In this regard, I tried writing a buffer_allocation callback (with gst_pad_set_bufferalloc_fuction) for the filter sinkpad. If id this, can I assume that the GstBuffer pushed by videotestsrc will be allocated using this? If not how do I do this?
2. the callback function has the prototype GstFlowReturn (*GstPadBufferAllocFunction)  (GstPad *pad, guint64 offset, guint size,  GstCaps *caps, GstBuffer **buf);In the callback function, I am doing the follwing
a. malloc memory for GstBuffer structure
b. create a copy of GstCaps and pointing to GstBuffer 
c. set the offset for the GstBuffer
d. allocate physically continuouse memory and point it to GstBuffer data
Is it sufficient or am is missing anything?
Thanks in advance 
-Kugan

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070327/a72a5444/attachment.htm>


More information about the gstreamer-devel mailing list