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

Kugan V kugan.vivek at gmail.com
Tue Mar 27 13:40:34 CEST 2007


[Sending this again from subscribed e-mail. Sincere Apologies if the
other mail also reaches the list]

 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/aaf3cbe9/attachment.htm>


More information about the gstreamer-devel mailing list