[xiph-cvs] cvs commit: icecast/src format.c
Brendan
brendan at xiph.org
Wed Jul 2 18:39:59 PDT 2003
brendan 03/07/02 21:39:59
Modified: src format.c
Log:
Convert ice headers to icy headers for MP3 streams.
TODO: rewrite ice-audio-info bitrate tag to icy-br.
Revision Changes Path
1.22 +10 -5 icecast/src/format.c
Index: format.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/format.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -u -r1.21 -r1.22
--- format.c 3 Jul 2003 01:36:06 -0000 1.21
+++ format.c 3 Jul 2003 01:39:59 -0000 1.22
@@ -1,3 +1,4 @@
+/* -*- c-basic-offset: 4; -*- */
/* format.c
**
** format plugin implementation
@@ -107,11 +108,15 @@ void format_send_general_headers(format_
node = avl_get_first(source->parser->vars);
while (node) {
var = (http_var_t *)node->key;
- if (strcasecmp(var->name, "ice-password") &&
- strcasecmp(var->name, "icy-metaint") &&
- (!strncasecmp("ice-", var->name, 4) ||
- !strncasecmp("icy-", var->name, 4))) {
- bytes = sock_write(client->con->sock,
+ if (strcasecmp(var->name, "ice-password") &&
+ strcasecmp(var->name, "icy-metaint") &&
+ (!strncasecmp("ice-", var->name, 4) ||
+ !strncasecmp("icy-", var->name, 4))) {
+ if (source->format->type == FORMAT_TYPE_MP3)
+ bytes = sock_write(client->con->sock, "icy%s:%s\r\n",
+ var->name + 3, var->value);
+ else
+ bytes = sock_write(client->con->sock,
"%s: %s\r\n", var->name, var->value);
if(bytes > 0) client->con->sent_bytes += bytes;
}
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list