[gst-devel] Perl and varargs...

Brett Kosinski brettk at frodo.dyn.gno.org
Sat May 24 11:12:02 CEST 2003

I haven't officially announced anything yet, but I'm currently working on
a set of Perl bindings for GStreamer.  However, I've encountered a problem
with the API which makes it incredibly difficult to bind certain

In particular, I've encountered a number of functions
(gst_autoplug_to_caps, gst_autoplug_to_renderers, etc) which take variable
number of arguments, but don't offer a variant which takes a va_list
structure (like vsprintf).  Currently, the only way I can work around this
is to directly call the class method, which does take a variable list.


if (oclass->autoplug_to_caps)
  element = (oclass->autoplug_to_caps)(autoplug, srccaps,
                                       sinkccaps, vargs);

Clearly, this isn't desirable, since I'm delving into the inner workings
of the class, rather than using the published interface.  So, the question
is, can new variants be added which take va_list structures?  Heck, I
could implement these and provide patches to 0.6.1, if necessary.  I'm
thinking something like this:

gst_autoplug_capsv(GstAutoplug *autoplug, GstCaps *caps,
                   GstCaps *sinkcaps, va_list ap);


More information about the gstreamer-devel mailing list