[Icecast-dev] Adding Configuration Options

Nicholas Young nicholas at nicholaswyoung.com
Mon Sep 6 08:42:49 PDT 2010


So, I'm in the middle of understanding how the icecast.xml file is parsed,
and how the settings for a specific mount point are read.

In cfgfile.c - _parse_mount() I've added the following lines:

} else if (xmlStrcmp (node->name, XMLSTR("playlist-notify-uri")) == 0) {
mount->playlist_notify_uri = (char *)xmlNodeListGetString (doc,
node->xmlChildrenNode, 1);
        }

My goal is to include the URI in my logging.c file, and get the value of the
field:

<mount>
   <playlist-notify-uri>http://test.com/icecast/notify</playlist-notify-uri>
</mount>

Basically, I'm having Icecast POST to a certain URI whenever it detects a
change in metadata. (Which I've already implemented, but now, I need to add
a setting in the config file for storing this URI.) What is the best
practice for doing this? I'm looking to access it in logging.c,
logging_playlist() - where I have a string that represents the mount point.
I guess the question is... How should I go about selecting the value for
this field on the specific mountpoint?

Ideas, suggestions, tips, general advice, or tricks welcome.

Nicholas

Nicholas Young | nicholas at nicholaswyoung.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/icecast-dev/attachments/20100906/fa3bcb93/attachment.htm 


More information about the Icecast-dev mailing list