[vlc-devel] Re: vlc: svn commit r7377 (andrep)

Sigmund Augdal sigmunau at stud.ntnu.no
Mon Apr 19 22:37:59 CEST 2004


> >>   A /trunk/modules/codec/cmml/xarray.c
> >>   A /trunk/modules/codec/cmml/xarray.h
> >>   A /trunk/modules/codec/cmml/xlist.c
> >>   A /trunk/modules/codec/cmml/xlist.h
> 
> These four files essentially provide a variable-sized array: they could 
> fairly easily be replaced with the vlc_list_t implementation from 
> src/misc/objects.c, except that the vlc_list_t functions in that file 
> are not public, so the API for them would have to be put into an 
> include/ file.  Possible, sure, but again, it's a matter of getting one 
> plugin working vs making more far-reaching changes.

There are also the TAB_* macros in vlc_common.h. Doesn't these do the job?
vlc_list_t is majorly overkill for normal arrays.

> 
> >>   A /trunk/modules/codec/cmml/xtag.c
> >>   A /trunk/modules/codec/cmml/xtag.h
> >>   A /trunk/modules/codec/cmml/xurl.c
> >>   A /trunk/modules/codec/cmml/xurl.h
> 
> These four files could go into the core at a later stage: xtag.[ch] is 
> a very simple (but working!) XML parser.  I would've used libxml2 to do 
> the parsing since VLC already uses it, except that xtag is a meager 13k 
> C file and does the job admirably.  xurl.[ch] is meant to be a general 
> URL handling library.  Both would be useful in libvlc.

vlc_UrlParse() in network.h is for the url parsing. xml parsing should be
done by some lib, I vote for libxml. XML parsing may seem like a simple
thing at first, but there is a nasty world out there any you will allways
allways find nasty exceptions. And the parser code will allways grow and
grow etc.

> Two lofty future goal may also be to unify e.g. the XML parsing code 
> (from codec/cmml, gui/skins, demux/m3u) and possibly URL handling code 
> into a library.  Since everything works at the moment I'm more inclined 
> to leave things as they are, but it's something worth considering 
> later.

Yes, using a xml lib. the parsing code in demux/m3u is a horrible mess. Take
a look there if you wonder what a easy-solution xml-parsing code might end
up as.

> >Also an actual explanation of what you commit might be appreciated. 
> >what does it do, what uses it and what are the advantages.
> 
> Yep, sure.  Perhaps the best thing to do is to describe implementation 
> details (like what I wrote in this message) in a HACKING file?  When I 
> commit that, I'll add details about what the cmml codec does in the 
> commit message.

If you add support for a new codec, simply posting a url to a page with a
description of that codec might be a good start.


Sigmund

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list