[vlc-devel] [PATCH 1/5] modules: module_list_cap sort list using the name argument
thomas at gllm.fr
Thu Jun 4 12:00:13 CEST 2015
On Thu, Jun 4, 2015, at 10:52, Rémi Denis-Courmont wrote:
> Le 2015-06-04 11:34, Thomas Guillem a écrit :
> > Now, if you specify ":codec=hwdecoder2,hwdecoder1,any" in the name
> > arguments (or any compatible shortcuts), the list will be sorted like
> > "hwdecoder2,hwdecoder1,avcodec".
> > As the list is fully sorted, you know that you could try hwdecoder1
> > if
> > hwdecoder2 fails. See the next patch.
> Optimizing that would make sense if we had a large list of names, or a
> large list of plugins matching a name. In practice, this patch makes
> everything slower in the real-life situations:
> - not matching any name, or
> - matching only one or very few names.
> It seems to me that you would need qsort_r() to keep the code
> digestible. Regardless I still don't see how this optmization fits with
> the rest of the patch series.
It's second time I wanted the qsort_r() function. It's available on
linux, osx and windows, but not on android. So if we add it, we will
need a (ugly) compat function.
Without this patch, my second patch will be more complex. Indeed, I'll
have to store a list of modules already loaded in order to skip them
from the vlc_module_load_next function.
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel