[Gstreamer-openmax] [PATCH] replace deprecated API
Stefan Kost
ensonic at hora-obscura.de
Mon Apr 26 07:47:15 PDT 2010
Felipe Contreras wrote:
> On Sat, Apr 24, 2010 at 11:31 PM, Stefan Kost <ensonic at hora-obscura.de> wrote:
>
>> I agree that gst_element_class_set_details_simple() does not bring a
>> huge speedup normally, but then there is no point in wasting cycles. It
>> definitely shortes a fully registry rescann, which e.g. happens when you install
>> a new plugin (e.g. on demand). And as usual several small gains (or wastes) add up.
>> Anyway do as you prefer, I said what I have to say on this matter.
>>
>
> If you really want to save cycles, try this:
>
> static inline void
> __gst_element_details_copy(GstElementDetails *dest,
> const GstElementDetails *src)
> {
> g_free(dest->longname);
> g_free(dest->klass);
> g_free(dest->description);
> g_free(dest->author);
> dest->longname = g_strdup(src->longname);
> dest->klass = g_strdup(src->klass);
> dest->description = g_strdup(src->description);
> dest->author = g_strdup(src->author);
> }
>
Yes, the stupid validate is something that should be tuned off for a
release.
Stefan
> That's saving *way* many more cycles.
>
> Or even better, make gst_element_class_set_details() inline, then the
> compiler can find the most optimal path. I did tests, and the
> resulting assembly is the same for gst_element_class_set_details(),
> and gst_element_class_set_details_simple() with -O2 (when the
> functions are inline).
>
>
More information about the Gstreamer-openmax
mailing list