Open jorisvandesande opened 11 years ago
Is there anybody that can shed some light on this?
it should be possible when it's vorbis only, multiple codecs would disable it. It should be set up by default to allow it unless explicily disabled by a mount tag
karl.
Thanks for the insight. I might look into this if you could give me some pointers what needs to be changed for this to work. I know the basics of C/C++, but I haven't written a single line of C in the past few years.
I've been digging a little deeper into this. My conclusion is that the problem is in the process_vorbis_page function in format_vorbis.c. In that function the following code checks if the mount configuration option "admin_comments_only" is 0 (default). When it's 0 the metadata is always taken from the stream (overwriting any metadata that has been set via the update metadata command). This behaviour is a bit odd, as the "allow-url-ogg-metadata" might still have a value of 1.
if (ogg_info->admin_comments_only == 0)
{
free (ogg_info->title);
comment = vorbis_comment_query (&source_vorbis->vc, "TITLE", 0);
if (comment)
ogg_info->title = strdup (comment);
else
ogg_info->title = NULL;
free (ogg_info->artist);
comment = vorbis_comment_query (&source_vorbis->vc, "ARTIST", 0);
if (comment)
ogg_info->artist = strdup (comment);
else
ogg_info->artist = NULL;
}
In my opinion the best solution is to use the metadata that has been set via the update metadata command, because this is explicitly called.
When streaming an OGG stream via icecast, it is not possible to update the metadata of the stream. The update is triggered via the web interface at: /admin/metadata.xsl?song=xxxx&mount=/xxxx.ogg&mode=updinfo&charset=UTF-8
As far as I can see from the source code the hook to set the metadata is not implemented for OGG (plugin->set_tag = NULL; (line 170 in format_ogg.c).
However the update command responds with:
It would be great if this could be implemented for OGG. But if that's impossible, an error code should be returned when the metadata update is not supported for the current stream (in my opinion).