From: Brett K. <br...@fr...> - 2003-05-24 18:11:35
|
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 functions. 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. eg: oclass = GST_AUTOPLUG_CLASS(G_OBJECT_GET_CLASS(autoplug)); 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: GstElement* gst_autoplug_capsv(GstAutoplug *autoplug, GstCaps *caps, GstCaps *sinkcaps, va_list ap); Brett. |