Status of xine-lib code reduction efforts

I’ve been able to reduce the size of xine-lib’s code again today, by doing some cleanup around allocated memory and usage of sprintf over asprintf and similar little things.

They are little things, but within libxine.so I was able to remove 4KB of machine code without having to do big refactoring, and without losing any functional code.

I was also able to remove about 3 KB of memory constantly used by the HTTP plugin before, now it uses part of it only when connecting, while on the libavutil branch it only uses a minimal part of the memory, allocated dynamically only when needed, and I removed yet another base64 implementation from xine-lib by using again the base64 functions provided by libavutil.

The result is, as usual, a reduction of lines of code, as well as final code in the library and the plugins.

At the moment instead my current goal is to simplify the headers and the buildsystem. At the moment the path to use xine’s include depends on whether you’re building xine or building against xine, this because the include files are scattered around the source tree, rather than present in a structure compatible with what goes installed.

What I’m doing instead is consolidating all the includes in a single directory, removing the installation quirks xine added, and then changing all the source code to refer to xine/header.h to include the headers.

When I’ll be done, there should be less buildsystem code hanging around, which means less code to maintain specifically for xine.

The next steps would probably be starting to document stuff properly, as there way too few comments on the whole sourcetree. For instance there was nothing to link the HTTP auth code to base64 but the standard string for base64 encoding that I just remembered. No comment explained that the function was just encoding username and password to base64.

Hopefully, more documentation will bring more people to work on xine; at least I hope so, because I’m quite tired of doing this almost alone (ds and Vir help, but three people are not really enough for this project).

Exit mobile version