unnamed_devel Guest
|
Posted: Fri Mar 31, 2006 9:19 pm Post subject: dumpfile NOT supported anymore in icecast v2 |
|
|
hi all!
im very upset (( icecast v2+libshout2.2 doesnt support dumpfile setting anymore! ...
basically to add this support im patch server and source client library:
in shout.c
function send_http_request
{
....
if (self->format == SHOUT_FORMAT_VORBIS) {
if (!sock_write(self->socket, "Content-Type: application/ogg\r\n"))
return SHOUTERR_SOCKET;
} else if (self->format == SHOUT_FORMAT_MP3) {
if (!sock_write(self->socket, "Content-Type: audio/mpeg\r\n"))
return SHOUTERR_SOCKET;
}
///ADDITION START HERE
if (self->dumpfile) {
if (!sock_write(self->socket, "ice-dumpfile: %s\r\n", self->dumpfile))
return SHOUTERR_SOCKET;
}
///ADDITION STOP HERE
if (!sock_write(self->socket, "\r\n"))
return SHOUTERR_SOCKET;
....
}
how go to icecast 2.3.1 sources and path
source.c
in function source_apply_mount
{
........
if (mountinfo && mountinfo->dumpfile)
{
char *filename = source->dumpfilename;
source->dumpfilename = strdup (mountinfo->dumpfile);
free (filename);
}
///ADDITION START HERE
else {
do {
str = httpp_getvar (parser, "ice-dumpfile");
if (str) break;
str = httpp_getvar (parser, "x-audiocast-dumpfile");
if (str) break;
str = NULL;
} while (0);
if(str) source->dumpfilename = strdup(str);
else source->dumpfilename = NULL;
}
///ADDITION STOP HERE
if (source->intro_file)
{
fclose (source->intro_file);
source->intro_file = NULL;
}
........
}
after that recompile libshout2.2 and icecast v2.3.1 and use normal dumpfile setting at source client feature!
i wonder if this patch will be applied to official icecast v2 tree  |
|