[gst-devel] Perl and varargs...
Benjamin Otte
in7y118 at public.uni-hamburg.de
Sun May 25 05:54:03 CEST 2003
There exists bug 90471 in bugzilla about this.
Please add patches and comments there. A varargs function would clearly
make sense IMO.
Benjamin
On Sat, 24 May 2003, Brett Kosinski wrote:
> 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.
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list