From: Michael R. <re...@eu...> - 2003-12-19 06:35:31
|
Hi Markus, > I have tried to convert the Sourcecode form C++ to ANSI-C, but i think my port > is very buggy. :-| Well, you were right :-) I modified your code a bit, and committed it to CVS. It works, at least for me. How to test: - get latest CVS release - compile it - run 'lcd4linux -i' - at the eval prompt, enter: xmms('Title') Thanks a lot for your contribution! But I think there's a lot of 'optimization' possible for your plugin. The current major drawback is that for every access, the whole file will be read in and parsed. Question: How often does the content of /tmp/xmms-info change? (Once a second?) You should add some buffering of the key:value pairs, and add a conditional like "if the last file parse was less than one second ago, do not parse again, but use my buffered content" I also renamed client.[c|h] to plugin.[c|h] and extracted some of the basic functions to plugin_math.c and plugin_string.c I really like this new structure.... -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |