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
On 06/09/10 16:42, Nicholas Young wrote:> 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?You may find it easier to use the stats connection for this, try curl -X STATS 'http://admin:pw at host:port/' | grep metadata would that be enough to get the details you want? karl.
On Mon, 6 Sep 2010, Karl Heyes wrote:> You may find it easier to use the stats connection for this, try > > curl -X STATS 'http://admin:pw at host:port/' | grep metadata > > would that be enough to get the details you want?I think he wants something which will fire on every metadata change. Looking at the stats page could mean missed metadata and wouldn't reflect exactly when it happened. Geoff.