[gst-devel] bufferpools, filter templates

Andy Wingo apwingo at eos.ncsu.edu
Sun Aug 19 00:05:04 CEST 2001


Hey folks. Some thoughts:

I've been moving to try and use interleaved float data for my app.  I'd
like to update passthrough (the example plugin designed to be used with
filterstamp) to allow float data as well as int. Any objections
(thomas?)?

I've also been looking into bufferpools.  I'd like for passthrough to
use bufferpools so that it is easier for someone new to gst to create an
efficient filter. It seems to me like there are two kinds of chain-based
filters: those that can operate on a buffer and pass that same buffer
along, and those that must create a new buffer of some different length.
For the first case, I would just gst_pad_push() the in_buffer, like
identity does. In fact, exactly like identity. For the second, I would
create a bufferpool that would be returned by the sink pad's
get_bufferpool() function. Hopefully the sink's peer element would be
smart enough to grab a buffer from the pool. On the src side, I would
get a buffer using gst_pad_get_bufferpool() on the source pad, or
malloc() one if that failed. Really, using bufferpools in the whole
pipeline so that no malloc()ing occurs is the ideal.

I am just learning about this today, so if folks with more experience
have any comments, I'd like to hear them. I would call the first case
'passthrough', and the second case '

well I don't know what I would call the second case. 'modify' perhaps.
These plugins would not do anything to the data, and would just be
useful to filterstamp.

Objections?

wingo




More information about the gstreamer-devel mailing list