1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-29 04:25:55 -04:00

sync-up with recent merge

svn path=/icecast/branches/kh/icecast/; revision=9419
This commit is contained in:
Karl Heyes 2005-06-09 13:55:59 +00:00
parent d051a7ceb6
commit 343588ca3c
6 changed files with 37 additions and 31 deletions

View File

@ -279,8 +279,9 @@ the hostname setting and this specifies the port to redirect listeners to.
</div>
<h4>relays-on-demand</h4>
<div class="indentedbox">
Changes the default on-demand setting, so a stream is only relayed if listeners are connected.
(1=enabled, 0=disabled).
<p>Changes the default on-demand setting for relays, so a stream is only relayed if
listeners are connected. 1=enabled, 0=disabled (default).
</p>
</div>
<br />
@ -350,8 +351,9 @@ If you are relaying a Shoutcast stream, you need to specify this indicator to al
</div>
<h4>on-demand</h4>
<div class="indentedbox">
An on-demand relay will only retrieve the stream if there are listeners connected
(1=enabled, 0=disabled).
<p>An on-demand relay will only retrieve the stream if there are listeners connected
1=enabled, 0=disabled (default is &lt;relays-on-demand&gt;).
</p>
</div>
<h4>enable</h4>
<div class="indentedbox">
@ -463,8 +465,8 @@ listening clients back from the fallback mount.
</div>
<h4>no-yp</h4>
<div class="indentedbox">
<p>Setting this option prevents this mountpoint from advertising on YP. The default is 0
so YP advertising can occur however you may want to prevent it here if you intend listeners
<p>Setting this option prevents this mountpoint from advertising on YP. The default is 0
so YP advertising can occur however you may want to prevent it here if you intend listeners
to connect to a local relay instead. Deprecated option, replaced by &lt;public&gt;
</p>
</div>
@ -530,10 +532,11 @@ as defined in limits. The value is in bytes.
</div>
<h4>mp3-metadata-interval</h4>
<div class="indentedbox">
This optional setting specifies what interval, in bytes, there is between metadata updates within
shoutcast compatible streams. This only applies to new listeners connecting on this mountpoint,
not existing listeners falling back to this mountpoint. The default is either the hardcoded
server default or the value passed from a relay.
<p>This optional setting specifies what interval, in bytes, there is between metadata
updates within shoutcast compatible streams. This only applies to new listeners connecting
on this mountpoint, not existing listeners falling back to this mountpoint. The default
is either the hardcoded server default or the value passed from a relay.
</p>
</div>
<h4>hidden</h4>
<div class="indentedbox">
@ -541,12 +544,6 @@ Enable this to prevent this mount from being shown on the xsl pages. This is ma
for cases where a local relay is configured and you do not want the source of the local
relay to be shown
</div>
<h4>mp3-metadata-interval</h4>
<div class="indentedbox">
Listeners connecting to an mp3 stream can request metadata be sent to them. That metadata
is sent every so many bytes, this setting allows for overriding the default for this
mountpoint. A value of 0 means no metadata is sent to the client even if icecast receives it.
</div>
<h4>authentication</h4>
<div class="indentedbox">
This specifies that the named mount point will require listener authentication. Currently, we only support a file-based authentication scheme (type=htpasswd). Users and encrypted password are placed in this file (separated by a :) and all requests for this mountpoint will require that a user and password be supplied for authentication purposes. These values are passed in via normal HTTP Basic Authentication means (i.e. http://user:password@stream:port/mountpoint.ogg). Users and Passwords are maintained via the web admin interface. A mountpoint configured with an authenticator will display a red key next to the mount point name on the admin screens. You can read more about listener authentication <a href="icecast2_listenerauth.html">here</a>.

View File

@ -297,7 +297,6 @@ void admin_send_response(xmlDocPtr doc, client_t *client,
client->respcode = 200;
if (response == RAW) {
// xmlDocDumpMemory(doc, &buff, &len);
xmlDocDumpFormatMemoryEnc (doc, &buff, &len, NULL, 1);
html_write(client, "HTTP/1.0 200 OK\r\n"
"Content-Length: %d\r\n"

View File

@ -73,7 +73,10 @@ typedef struct _client_tag
/* function to call to release format specific resources */
void (*free_client_data)(struct _client_tag *client);
/* write out data associated with client */
int (*write_to_client)(struct _client_tag *client);
/* function to check if refbuf needs updating */
int (*check_buffer)(struct source_tag *source, struct _client_tag *client);

View File

@ -124,6 +124,7 @@ static void find_client_start (source_t *source, client_t *client)
{
client_set_queue (client, refbuf);
client->check_buffer = format_advance_queue;
client->write_to_client = source->format->write_buf_to_client;
client->intro_offset = -1;
break;
}

View File

@ -291,8 +291,17 @@ static int send_mp3_metadata (client_t *client, refbuf_t *associated)
}
else
{
metadata = "\0";
meta_len = 1;
if (associated)
{
metadata = "\0";
meta_len = 1;
}
else
{
char *meta = "\001StreamTitle='';";
metadata = meta + client_mp3->metadata_offset;
meta_len = 17 - client_mp3->metadata_offset;
}
}
ret = client_send_bytes (client, metadata, meta_len);
@ -585,9 +594,6 @@ static int format_mp3_create_client_data(source_t *source, client_t *client)
return -1;
}
client->format_data = client_mp3;
client->free_client_data = free_mp3_client_data;
/* hack for flash player, it wants a length */
if (httpp_getvar(client->parser, "x-flash-version"))
{
@ -596,6 +602,8 @@ static int format_mp3_create_client_data(source_t *source, client_t *client)
ptr += bytes;
}
client->format_data = client_mp3;
client->free_client_data = free_mp3_client_data;
metadata = httpp_getvar(client->parser, "icy-metadata");
if (metadata && atoi(metadata))
{

View File

@ -156,9 +156,7 @@ source_t *source_find_mount (const char *mount)
source = source_find_mount_raw(mount);
if (source)
{
if (source->running)
break;
if (source->on_demand)
if (source->running || source->on_demand)
break;
}
@ -252,7 +250,6 @@ void source_clear_source (source_t *source)
source->intro_file = NULL;
}
source->on_demand = 0;
source->on_demand_req = 0;
}
@ -372,7 +369,6 @@ void source_move_clients (source_t *source, source_t *dest)
dest->listeners += count;
source->listeners = 0;
source->listeners = 0;
stats_event (source->mount, "listeners", "0");
} while (0);
@ -1134,7 +1130,13 @@ void source_update_settings (ice_config_t *config, source_t *source, mount_proxy
if (mountinfo && mountinfo->on_disconnect)
DEBUG1 ("disconnect script \"%s\"", mountinfo->on_disconnect);
if (source->on_demand)
{
DEBUG0 ("on_demand set");
stats_event (source->mount, "on_demand", "1");
}
else
stats_event (source->mount, "on_demand", NULL);
if (source->hidden)
{
stats_event_hidden (source->mount, NULL, 1);
@ -1151,10 +1153,6 @@ void source_update_settings (ice_config_t *config, source_t *source, mount_proxy
snprintf (buf, sizeof (buf), "%ld", source->max_listeners);
stats_event (source->mount, "max_listeners", buf);
}
if (source->on_demand)
stats_event (source->mount, "on_demand", "1");
else
stats_event (source->mount, "on_demand", NULL);
DEBUG1 ("public set to %d", source->yp_public);
DEBUG1 ("max listeners to %ld", source->max_listeners);