[gst-devel] gst_element_class_set_details() gone?

Felipe Contreras felipe.contreras at gmail.com
Sun Apr 25 14:00:51 CEST 2010

On Sun, Apr 25, 2010 at 1:53 PM, Benjamin Otte <otte at redhat.com> wrote:
> I'm sorry that the commit message didn't include the why. I guess I had
> talked so much about why on IRC that I assumed it was common knowledge
> when I actually comitted the patch. :/

I find that as a common problem in the GStreamer community; not
everyone is in IRC in European timezone all the time. It doesn't hurt
to add one line explanation for "the others".

> There's one big reason why I wanted thois function deprecated: It breaks
> -Wwrite-strings and as we all agreed that that warning is rather
> important, we don't want to expose APIs that can't cope with it.

That's a good point, although there are other ways to solve that
problem (make a new struct with the fields const).

> Other reasons were that we had two APIs for exactly the same thing and
> that's a bad idea, that APIs that expose a simple struct just so that it
> can be passed as an argument to a single function is a bad API or that
> this API does not work well from a bindings point of view.

I don't agree completely; the linux kernel API has many instances of
struct passing, if done properly it works fine. Besides, the single
call to __gst_element_details_copy() is an irrelevant implementation
detail. Also, it's not a big deal for bindings; it might be for
*automatic* bindings, but for that there's the _simple() version. OTOH
I agree that two APIs doing the same thing is not ideal, although I
was leaning towards the non-simple one.

Hopefully for 0.11 there will be a better way to specify these
details, but in the meantime I guess the current proposal is sensible.


Felipe Contreras

More information about the gstreamer-devel mailing list