Commit 2b7cb1c6 authored by Philipp Schafft's avatar Philipp Schafft 🦁

LOG_{ERROR|WARN|INFO|DEBUG}() -> ICECAST_LOG_{ERROR|WARN|INFO|DEBUG}(); this...

LOG_{ERROR|WARN|INFO|DEBUG}() -> ICECAST_LOG_{ERROR|WARN|INFO|DEBUG}(); this is to avoid collision with LOG_INFO that is defined as part of syslog.

svn path=/icecast/trunk/icecast/; revision=19257
parent cf419cc1
This diff is collapsed.
This diff is collapsed.
......@@ -115,7 +115,7 @@ static void htpasswd_recheckfile (htpasswd_auth_state *htpasswd)
return;
if (stat (htpasswd->filename, &file_stat) < 0)
{
LOG_WARN("failed to check status of %s", htpasswd->filename);
ICECAST_LOG_WARN("failed to check status of %s", htpasswd->filename);
/* Create a dummy users tree for things to use later */
thread_rwlock_wlock (&htpasswd->file_rwlock);
......@@ -131,11 +131,11 @@ static void htpasswd_recheckfile (htpasswd_auth_state *htpasswd)
/* common case, no update to file */
return;
}
LOG_INFO("re-reading htpasswd file \"%s\"", htpasswd->filename);
ICECAST_LOG_INFO("re-reading htpasswd file \"%s\"", htpasswd->filename);
passwdfile = fopen (htpasswd->filename, "rb");
if (passwdfile == NULL)
{
LOG_WARN("Failed to open authentication database \"%s\": %s",
ICECAST_LOG_WARN("Failed to open authentication database \"%s\": %s",
htpasswd->filename, strerror(errno));
return;
}
......@@ -155,7 +155,7 @@ static void htpasswd_recheckfile (htpasswd_auth_state *htpasswd)
sep = strrchr (line, ':');
if (sep == NULL)
{
LOG_WARN("No separator on line %d (%s)", num, htpasswd->filename);
ICECAST_LOG_WARN("No separator on line %d (%s)", num, htpasswd->filename);
continue;
}
entry = calloc (1, sizeof (htpasswd_user));
......@@ -189,7 +189,7 @@ static auth_result htpasswd_auth (auth_client *auth_user)
if (htpasswd->filename == NULL)
{
LOG_ERROR("No filename given in options for authenticator.");
ICECAST_LOG_ERROR("No filename given in options for authenticator.");
return AUTH_FAILED;
}
htpasswd_recheckfile (htpasswd);
......@@ -209,10 +209,10 @@ static auth_result htpasswd_auth (auth_client *auth_user)
return AUTH_OK;
}
free (hashed_pw);
LOG_DEBUG("incorrect password for client");
ICECAST_LOG_DEBUG("incorrect password for client");
return AUTH_FAILED;
}
LOG_DEBUG("no such username: %s", client->username);
ICECAST_LOG_DEBUG("no such username: %s", client->username);
thread_rwlock_unlock (&htpasswd->file_rwlock);
return AUTH_FAILED;
}
......@@ -240,10 +240,10 @@ int auth_get_htpasswd_auth (auth_t *authenticator, config_options_t *options)
}
if (state->filename)
LOG_INFO("Configured htpasswd authentication using password file \"%s\"",
ICECAST_LOG_INFO("Configured htpasswd authentication using password file \"%s\"",
state->filename);
else
LOG_ERROR("No filename given in options for authenticator.");
ICECAST_LOG_ERROR("No filename given in options for authenticator.");
authenticator->state = state;
......@@ -278,7 +278,7 @@ static auth_result htpasswd_adduser (auth_t *auth, const char *username, const c
if (passwdfile == NULL)
{
thread_rwlock_unlock (&state->file_rwlock);
LOG_WARN("Failed to open authentication database \"%s\": %s",
ICECAST_LOG_WARN("Failed to open authentication database \"%s\": %s",
state->filename, strerror(errno));
return AUTH_FAILED;
}
......@@ -312,7 +312,7 @@ static auth_result htpasswd_deleteuser(auth_t *auth, const char *username)
passwdfile = fopen(state->filename, "rb");
if(passwdfile == NULL) {
LOG_WARN("Failed to open authentication database \"%s\": %s",
ICECAST_LOG_WARN("Failed to open authentication database \"%s\": %s",
state->filename, strerror(errno));
thread_rwlock_unlock (&state->file_rwlock);
return AUTH_FAILED;
......@@ -322,7 +322,7 @@ static auth_result htpasswd_deleteuser(auth_t *auth, const char *username)
snprintf (tmpfile, tmpfile_len, "%s.tmp", state->filename);
if (stat (tmpfile, &file_info) == 0)
{
LOG_WARN("temp file \"%s\" exists, rejecting operation", tmpfile);
ICECAST_LOG_WARN("temp file \"%s\" exists, rejecting operation", tmpfile);
free (tmpfile);
fclose (passwdfile);
thread_rwlock_unlock (&state->file_rwlock);
......@@ -332,7 +332,7 @@ static auth_result htpasswd_deleteuser(auth_t *auth, const char *username)
tmp_passwdfile = fopen(tmpfile, "wb");
if(tmp_passwdfile == NULL) {
LOG_WARN("Failed to open temporary authentication database \"%s\": %s",
ICECAST_LOG_WARN("Failed to open temporary authentication database \"%s\": %s",
tmpfile, strerror(errno));
fclose(passwdfile);
free(tmpfile);
......@@ -347,7 +347,7 @@ static auth_result htpasswd_deleteuser(auth_t *auth, const char *username)
sep = strchr(line, ':');
if(sep == NULL) {
LOG_DEBUG("No separator in line");
ICECAST_LOG_DEBUG("No separator in line");
continue;
}
......@@ -367,12 +367,12 @@ static auth_result htpasswd_deleteuser(auth_t *auth, const char *username)
/* Windows won't let us rename a file if the destination file
exists...so, lets remove the original first */
if (remove(state->filename) != 0) {
LOG_ERROR("Problem moving temp authentication file to original \"%s\" - \"%s\": %s",
ICECAST_LOG_ERROR("Problem moving temp authentication file to original \"%s\" - \"%s\": %s",
tmpfile, state->filename, strerror(errno));
}
else {
if (rename(tmpfile, state->filename) != 0) {
LOG_ERROR("Problem moving temp authentication file to original \"%s\" - \"%s\": %s",
ICECAST_LOG_ERROR("Problem moving temp authentication file to original \"%s\" - \"%s\": %s",
tmpfile, state->filename, strerror(errno));
}
}
......
......@@ -109,7 +109,7 @@ static void auth_url_clear(auth_t *self)
{
auth_url *url;
LOG_INFO("Doing auth URL cleanup");
ICECAST_LOG_INFO("Doing auth URL cleanup");
url = self->state;
self->state = NULL;
curl_easy_cleanup (url->handle);
......@@ -263,7 +263,7 @@ static auth_result url_remove_listener (auth_client *auth_user)
curl_easy_setopt (url->handle, CURLOPT_WRITEHEADER, auth_user);
if (curl_easy_perform (url->handle))
LOG_WARN("auth to server %s failed with %s", url->removeurl, url->errormsg);
ICECAST_LOG_WARN("auth to server %s failed with %s", url->removeurl, url->errormsg);
free (userpwd);
......@@ -394,13 +394,13 @@ static auth_result url_add_listener (auth_client *auth_user)
if (res)
{
LOG_WARN("auth to server %s failed with %s", url->addurl, url->errormsg);
ICECAST_LOG_WARN("auth to server %s failed with %s", url->addurl, url->errormsg);
return AUTH_FAILED;
}
/* we received a response, lets see what it is */
if (client->authenticated)
return AUTH_OK;
LOG_INFO("client auth (%s) failed with \"%s\"", url->addurl, url->errormsg);
ICECAST_LOG_INFO("client auth (%s) failed with \"%s\"", url->addurl, url->errormsg);
return AUTH_FAILED;
}
......@@ -452,7 +452,7 @@ static void url_stream_start (auth_client *auth_user)
curl_easy_setopt (url->handle, CURLOPT_WRITEHEADER, auth_user);
if (curl_easy_perform (url->handle))
LOG_WARN("auth to server %s failed with %s", stream_start_url, url->errormsg);
ICECAST_LOG_WARN("auth to server %s failed with %s", stream_start_url, url->errormsg);
auth_release (auth);
free (stream_start_url);
......@@ -504,7 +504,7 @@ static void url_stream_end (auth_client *auth_user)
curl_easy_setopt (url->handle, CURLOPT_WRITEHEADER, auth_user);
if (curl_easy_perform (url->handle))
LOG_WARN("auth to server %s failed with %s", stream_end_url, url->errormsg);
ICECAST_LOG_WARN("auth to server %s failed with %s", stream_end_url, url->errormsg);
auth_release (auth);
free (stream_end_url);
......@@ -554,7 +554,7 @@ static void url_stream_auth (auth_client *auth_user)
client->authenticated = 0;
if (curl_easy_perform (url->handle))
LOG_WARN("auth to server %s failed with %s", url->stream_auth, url->errormsg);
ICECAST_LOG_WARN("auth to server %s failed with %s", url->stream_auth, url->errormsg);
}
......@@ -683,7 +683,7 @@ int auth_get_url_auth (auth_t *authenticator, config_options_t *options)
snprintf (url_info->userpwd, len, "%s:%s", url_info->username, url_info->password);
}
LOG_INFO("URL based authentication setup");
ICECAST_LOG_INFO("URL based authentication setup");
return 0;
}
......@@ -417,7 +417,7 @@ static void _parse_root(xmlDocPtr doc, xmlNodePtr node,
_parse_authentication(doc, node->xmlChildrenNode, configuration);
} else if (xmlStrcmp (node->name, XMLSTR("source-password")) == 0) {
/* TODO: This is the backwards-compatibility location */
LOG_WARN("<source-password> defined outside <authentication>. This is deprecated.");
ICECAST_LOG_WARN("<source-password> defined outside <authentication>. This is deprecated.");
if (configuration->source_password) xmlFree(configuration->source_password);
configuration->source_password = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
} else if (xmlStrcmp (node->name, XMLSTR("icelogin")) == 0) {
......@@ -572,7 +572,7 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
mount->mounttype = MOUNT_TYPE_DEFAULT;
}
else {
LOG_WARN("Unknown mountpoint type: %s", tmp);
ICECAST_LOG_WARN("Unknown mountpoint type: %s", tmp);
config_clear_mount (mount);
return;
}
......@@ -718,7 +718,7 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
}
else if (mount->mountname != NULL && mount->mounttype == MOUNT_TYPE_DEFAULT)
{
LOG_WARN("Default mount %s has mount-name set. This is not supported. Behavior may not be consistent.", mount->mountname);
ICECAST_LOG_WARN("Default mount %s has mount-name set. This is not supported. Behavior may not be consistent.", mount->mountname);
}
if (mount->auth && mount->mountname) {
mount->auth->mount = strdup ((char *)mount->mountname);
......@@ -732,7 +732,7 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
if (!mount->fallback_mount && (mount->fallback_when_full || mount->fallback_override))
{
LOG_WARN("Config for mount %s contains fallback options but no fallback mount.", mount->mountname);
ICECAST_LOG_WARN("Config for mount %s contains fallback options but no fallback mount.", mount->mountname);
}
if(last)
......@@ -896,7 +896,7 @@ static void _parse_authentication(xmlDocPtr doc, xmlNodePtr node,
if (xmlStrcmp (node->name, XMLSTR("source-password")) == 0) {
if (xmlGetProp(node, XMLSTR("mount"))) {
LOG_ERROR("Mount level source password defined within global <authentication> section.");
ICECAST_LOG_ERROR("Mount level source password defined within global <authentication> section.");
}
else {
if (configuration->source_password)
......@@ -934,7 +934,7 @@ static void _parse_directory(xmlDocPtr doc, xmlNodePtr node,
char *tmp;
if (configuration->num_yp_directories >= MAX_YP_DIRECTORIES) {
LOG_ERROR("Maximum number of yp directories exceeded!");
ICECAST_LOG_ERROR("Maximum number of yp directories exceeded!");
return;
}
do {
......
......@@ -65,7 +65,7 @@ int client_create (client_t **c_ptr, connection_t *con, http_parser_t *parser)
global.clients++;
if (config->client_limit < global.clients)
LOG_WARN("server client limit reached (%d/%d)", config->client_limit, global.clients);
ICECAST_LOG_WARN("server client limit reached (%d/%d)", config->client_limit, global.clients);
else
ret = 0;
......@@ -178,7 +178,7 @@ int client_read_bytes (client_t *client, void *buf, unsigned len)
bytes = client->con->read (client->con, buf, len);
if (bytes == -1 && client->con->error)
LOG_DEBUG("reading from connection has failed");
ICECAST_LOG_DEBUG("reading from connection has failed");
return bytes;
}
......@@ -235,7 +235,7 @@ int client_send_bytes (client_t *client, const void *buf, unsigned len)
int ret = client->con->send (client->con, buf, len);
if (client->con->error)
LOG_DEBUG("Client connection died");
ICECAST_LOG_DEBUG("Client connection died");
return ret;
}
......
This diff is collapsed.
......@@ -40,20 +40,20 @@ void event_config_read(void *arg)
xmlSetGenericErrorFunc ("config", log_parse_failure);
ret = config_parse_file(config->config_filename, &new_config);
if(ret < 0) {
LOG_ERROR("Error parsing config, not replacing existing config");
ICECAST_LOG_ERROR("Error parsing config, not replacing existing config");
switch(ret) {
case CONFIG_EINSANE:
LOG_ERROR("Config filename null or blank");
ICECAST_LOG_ERROR("Config filename null or blank");
break;
case CONFIG_ENOROOT:
LOG_ERROR("Root element not found in %s", config->config_filename);
ICECAST_LOG_ERROR("Root element not found in %s", config->config_filename);
break;
case CONFIG_EBADROOT:
LOG_ERROR("Not an icecast2 config file: %s",
ICECAST_LOG_ERROR("Not an icecast2 config file: %s",
config->config_filename);
break;
default:
LOG_ERROR("Parse error in reading %s", config->config_filename);
ICECAST_LOG_ERROR("Parse error in reading %s", config->config_filename);
break;
}
config_release_config();
......
......@@ -79,7 +79,7 @@ format_type_t format_get_type (const char *contenttype)
/* We default to the Generic format handler, which
can handle many more formats than just mp3.
Let's warn that this is not well supported */
LOG_WARN("Unsupported or legacy stream type: \"%s\". Falling back to generic minimal handler for best effort.", contenttype);
ICECAST_LOG_WARN("Unsupported or legacy stream type: \"%s\". Falling back to generic minimal handler for best effort.", contenttype);
return FORMAT_TYPE_GENERIC;
}
......@@ -221,11 +221,11 @@ int format_check_http_buffer (source_t *source, client_t *client)
if (client->respcode == 0)
{
LOG_DEBUG("processing pending client headers");
ICECAST_LOG_DEBUG("processing pending client headers");
if (format_prepare_headers (source, client) < 0)
{
LOG_ERROR("internal problem, dropping client");
ICECAST_LOG_ERROR("internal problem, dropping client");
client->con->error = 1;
return -1;
}
......
......@@ -201,7 +201,7 @@ static refbuf_t *ebml_get_buffer (source_t *source)
format->read_bytes += bytes;
ret = ebml_wrote (ebml_source_state->ebml, bytes);
if (ret != bytes) {
LOG_ERROR("Problem processing stream");
ICECAST_LOG_ERROR("Problem processing stream");
source->running = 0;
return NULL;
}
......@@ -244,7 +244,7 @@ static void ebml_free_client_data (client_t *client)
static void ebml_write_buf_to_file_fail (source_t *source)
{
LOG_WARN("Write to dump file failed, disabling");
ICECAST_LOG_WARN("Write to dump file failed, disabling");
fclose (source->dumpfile);
source->dumpfile = NULL;
}
......@@ -420,7 +420,7 @@ static int ebml_wrote(ebml_t *ebml, int len)
{
if ((ebml->header_position + len) > EBML_HEADER_MAX_SIZE)
{
LOG_ERROR("EBML Header too large, failing");
ICECAST_LOG_ERROR("EBML Header too large, failing");
return -1;
}
......
......@@ -34,7 +34,7 @@ typedef struct source_tag source_t;
static void flac_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
LOG_DEBUG("freeing FLAC codec");
ICECAST_LOG_DEBUG("freeing FLAC codec");
stats_event (ogg_info->mount, "FLAC_version", NULL);
ogg_stream_clear (&codec->os);
free (codec);
......@@ -93,7 +93,7 @@ ogg_codec_t *initial_flac_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for FLAC codec");
ICECAST_LOG_DEBUG("checking for FLAC codec");
do
{
unsigned char *parse = packet.packet;
......@@ -106,7 +106,7 @@ ogg_codec_t *initial_flac_page (format_plugin_t *plugin, ogg_page *page)
if (memcmp (parse, "FLAC", 4) != 0)
break;
LOG_INFO("seen initial FLAC header");
ICECAST_LOG_INFO("seen initial FLAC header");
parse += 4;
stats_event_args (ogg_info->mount, "FLAC_version", "%d.%d", parse[0], parse[1]);
......
......@@ -54,7 +54,7 @@ static void kate_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
kate_codec_t *kate = codec->specific;
LOG_DEBUG("freeing kate codec");
ICECAST_LOG_DEBUG("freeing kate codec");
/* TODO: should i replace with something or just remove
stats_event (ogg_info->mount, "video_bitrate", NULL);
stats_event (ogg_info->mount, "video_quality", NULL);
......@@ -98,7 +98,7 @@ static refbuf_t *process_kate_page (ogg_state_t *ogg_info, ogg_codec_t *codec, o
if (ret < 0)
{
ogg_info->error = 1;
LOG_WARN("problem with kate header");
ICECAST_LOG_WARN("problem with kate header");
return NULL;
}
header_page = 1;
......@@ -139,7 +139,7 @@ static refbuf_t *process_kate_page (ogg_state_t *ogg_info, ogg_codec_t *codec, o
if (codec->headers < kate->num_headers)
{
ogg_info->error = 1;
LOG_ERROR("Not enough header packets");
ICECAST_LOG_ERROR("Not enough header packets");
return NULL;
}
}
......@@ -150,7 +150,7 @@ static refbuf_t *process_kate_page (ogg_state_t *ogg_info, ogg_codec_t *codec, o
}
refbuf = make_refbuf_with_page (page);
/* LOG_DEBUG("refbuf %p has pageno %ld, %llu", refbuf, ogg_page_pageno (page), (uint64_t)granulepos); */
/* ICECAST_LOG_DEBUG("refbuf %p has pageno %ld, %llu", refbuf, ogg_page_pageno (page), (uint64_t)granulepos); */
if (codec->possible_start)
{
......@@ -196,7 +196,7 @@ ogg_codec_t *initial_kate_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for kate codec");
ICECAST_LOG_DEBUG("checking for kate codec");
#ifdef HAVE_KATE
if (kate_ogg_decode_headerin (&kate_codec->ki, &kate_codec->kc, &packet) < 0)
{
......@@ -218,7 +218,7 @@ ogg_codec_t *initial_kate_page (format_plugin_t *plugin, ogg_page *page)
}
#endif
LOG_INFO("seen initial kate header");
ICECAST_LOG_INFO("seen initial kate header");
codec->specific = kate_codec;
codec->process_page = process_kate_page;
codec->codec_free = kate_codec_free;
......
......@@ -34,7 +34,7 @@ typedef struct source_tag source_t;
static void midi_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
LOG_DEBUG("freeing MIDI codec");
ICECAST_LOG_DEBUG("freeing MIDI codec");
ogg_stream_clear (&codec->os);
free (codec);
}
......@@ -68,7 +68,7 @@ ogg_codec_t *initial_midi_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for MIDI codec");
ICECAST_LOG_DEBUG("checking for MIDI codec");
do
{
if (packet.bytes < 9)
......@@ -78,7 +78,7 @@ ogg_codec_t *initial_midi_page (format_plugin_t *plugin, ogg_page *page)
if (packet.bytes != 12)
break;
LOG_INFO("seen initial MIDI header");
ICECAST_LOG_INFO("seen initial MIDI header");
codec->process_page = process_midi_page;
codec->codec_free = midi_codec_free;
codec->headers = 1;
......
......@@ -227,8 +227,8 @@ static void format_mp3_apply_settings (client_t *client, format_plugin_t *format
if (format->charset == NULL)
format->charset = strdup ("ISO8859-1");
LOG_DEBUG("sending metadata interval %d", source_mp3->interval);
LOG_DEBUG("charset %s", format->charset);
ICECAST_LOG_DEBUG("sending metadata interval %d", source_mp3->interval);
ICECAST_LOG_DEBUG("charset %s", format->charset);
}
......@@ -267,7 +267,7 @@ static void mp3_set_title (source_t *source)
if (len > MAX_META_LEN)
{
thread_mutex_unlock (&source_mp3->url_lock);
LOG_WARN("Metadata too long at %d chars", len);
ICECAST_LOG_WARN("Metadata too long at %d chars", len);
return;
}
/* work out the metadata len byte */
......@@ -302,7 +302,7 @@ static void mp3_set_title (source_t *source)
else if (source_mp3->url)
snprintf (p->data+r, size-r, "StreamUrl='%s';", source_mp3->url);
}
LOG_DEBUG("shoutcast metadata block setup with %s", p->data+1);
ICECAST_LOG_DEBUG("shoutcast metadata block setup with %s", p->data+1);
filter_shoutcast_metadata (source, p->data, size);
refbuf_release (source_mp3->metadata);
......@@ -621,7 +621,7 @@ static refbuf_t *mp3_get_filter_meta (source_t *source)
memcpy (meta->data, source_mp3->build_metadata,
source_mp3->build_metadata_len);
LOG_DEBUG("shoutcast metadata %.*s", 4080, meta->data+1);
ICECAST_LOG_DEBUG("shoutcast metadata %.*s", 4080, meta->data+1);
if (strncmp (meta->data+1, "StreamTitle=", 12) == 0)
{
filter_shoutcast_metadata (source, source_mp3->build_metadata,
......@@ -632,7 +632,7 @@ static refbuf_t *mp3_get_filter_meta (source_t *source)
}
else
{
LOG_ERROR("Incorrect metadata format, ending stream");
ICECAST_LOG_ERROR("Incorrect metadata format, ending stream");
source->running = 0;
refbuf_release (refbuf);
refbuf_release (meta);
......@@ -724,7 +724,7 @@ static void write_mp3_to_file (struct source_tag *source, refbuf_t *refbuf)
return;
if (fwrite (refbuf->data, 1, refbuf->len, source->dumpfile) < (size_t)refbuf->len)
{
LOG_WARN("Write to dump file failed, disabling");
ICECAST_LOG_WARN("Write to dump file failed, disabling");
fclose (source->dumpfile);
source->dumpfile = NULL;
}
......
......@@ -92,7 +92,7 @@ void format_ogg_attach_header (ogg_state_t *ogg_info, ogg_page *page)
if (ogg_page_bos (page))
{
LOG_DEBUG("attaching BOS page");
ICECAST_LOG_DEBUG("attaching BOS page");
if (*ogg_info->bos_end == NULL)
ogg_info->header_pages_tail = refbuf;
refbuf->next = *ogg_info->bos_end;
......@@ -100,7 +100,7 @@ void format_ogg_attach_header (ogg_state_t *ogg_info, ogg_page *page)
ogg_info->bos_end = &refbuf->next;
return;
}
LOG_DEBUG("attaching header page");
ICECAST_LOG_DEBUG("attaching header page");
if (ogg_info->header_pages_tail)
ogg_info->header_pages_tail->next = refbuf;
ogg_info->header_pages_tail = refbuf;
......@@ -115,7 +115,7 @@ void format_ogg_free_headers (ogg_state_t *ogg_info)
refbuf_t *header;
/* release the header pages first */
LOG_DEBUG("releasing header pages");
ICECAST_LOG_DEBUG("releasing header pages");
header = ogg_info->header_pages;
while (header)
{
......@@ -141,7 +141,7 @@ static void free_ogg_codecs (ogg_state_t *ogg_info)
/* now free the codecs */
codec = ogg_info->codecs;
LOG_DEBUG("freeing codecs");
ICECAST_LOG_DEBUG("freeing codecs");
while (codec)
{
ogg_codec_t *next = codec->next;
......@@ -219,7 +219,7 @@ static int process_initial_page (format_plugin_t *plugin, ogg_page *page)
{
if (ogg_info->codec_count > 10)
{
LOG_ERROR("many codecs in stream, playing safe, dropping source");
ICECAST_LOG_ERROR("many codecs in stream, playing safe, dropping source");
ogg_info->error = 1;
return -1;
}
......@@ -253,7 +253,7 @@ static int process_initial_page (format_plugin_t *plugin, ogg_page *page)
break;
/* any others */
LOG_ERROR("Seen BOS page with unknown type");
ICECAST_LOG_ERROR("Seen BOS page with unknown type");
ogg_info->error = 1;
return -1;
} while (0);
......@@ -430,7 +430,7 @@ static refbuf_t *ogg_get_buffer (source_t *source)
}
if (ogg_info->error)
{
LOG_ERROR("Problem processing stream");
ICECAST_LOG_ERROR("Problem processing stream");
source->running = 0;
return NULL;
}
......@@ -564,7 +564,7 @@ static int write_ogg_data (struct source_tag *source, refbuf_t *refbuf)
if (fwrite (refbuf->data, 1, refbuf->len, source->dumpfile) != refbuf->len)
{
LOG_WARN("Write to dump file failed, disabling");
ICECAST_LOG_WARN("Write to dump file failed, disabling");
fclose (source->dumpfile);
source->dumpfile = NULL;
ret = 0;
......
......@@ -70,14 +70,14 @@ ogg_codec_t *initial_opus_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for opus codec");
ICECAST_LOG_DEBUG("checking for opus codec");
if (strncmp((char *)packet.packet, "OpusHead", 8) != 0)
{
ogg_stream_clear (&codec->os);
free (codec);
return NULL;
}
LOG_INFO("seen initial opus header");
ICECAST_LOG_INFO("seen initial opus header");
codec->process_page = process_opus_page;
codec->codec_free = opus_codec_free;
codec->headers = 1;
......
......@@ -35,7 +35,7 @@ typedef struct source_tag source_t;
static void skeleton_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
LOG_DEBUG("freeing skeleton codec");
ICECAST_LOG_DEBUG("freeing skeleton codec");
ogg_stream_clear (&codec->os);
free (codec);
}
......@@ -79,7 +79,7 @@ ogg_codec_t *initial_skeleton_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for skeleton codec");
ICECAST_LOG_DEBUG("checking for skeleton codec");
if ((packet.bytes<8) || memcmp(packet.packet, "fishead\0", 8))
{
......@@ -88,7 +88,7 @@ ogg_codec_t *initial_skeleton_page (format_plugin_t *plugin, ogg_page *page)
return NULL;
}
LOG_INFO("seen initial skeleton header");
ICECAST_LOG_INFO("seen initial skeleton header");
codec->process_page = process_skeleton_page;
codec->codec_free = skeleton_codec_free;
codec->headers = 1;
......
......@@ -73,7 +73,7 @@ ogg_codec_t *initial_speex_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for speex codec");
ICECAST_LOG_DEBUG("checking for speex codec");
header = speex_packet_to_header ((char*)packet.packet, packet.bytes);
if (header == NULL)
{
......@@ -82,7 +82,7 @@ ogg_codec_t *initial_speex_page (format_plugin_t *plugin, ogg_page *page)
free (codec);
return NULL;
}
LOG_INFO("seen initial speex header");
ICECAST_LOG_INFO("seen initial speex header");
codec->process_page = process_speex_page;
codec->codec_free = speex_codec_free;
codec->headers = 1;
......
......@@ -47,7 +47,7 @@ static void theora_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
theora_codec_t *theora = codec->specific;
LOG_DEBUG("freeing theora codec");
ICECAST_LOG_DEBUG("freeing theora codec");
stats_event (ogg_info->mount, "video_bitrate", NULL);
stats_event (ogg_info->mount, "video_quality", NULL);
stats_event (ogg_info->mount, "frame_rate", NULL);
......@@ -86,7 +86,7 @@ static refbuf_t *process_theora_page (ogg_state_t *ogg_info, ogg_codec_t *codec,
if (theora_decode_header (&theora->ti, &theora->tc, &packet) < 0)
{
ogg_info->error = 1;
LOG_WARN("problem with theora header");
ICECAST_LOG_WARN("problem with theora header");
return NULL;
}
header_page = 1;
......@@ -109,7 +109,7 @@ static refbuf_t *process_theora_page (ogg_state_t *ogg_info, ogg_codec_t *codec,
if (codec->headers < 3)
{
ogg_info->error = 1;
LOG_ERROR("Not enough header packets");
ICECAST_LOG_ERROR("Not enough header packets");
return NULL;
}
if (theora_packet_iskeyframe (&packet))
......@@ -122,7 +122,7 @@ static refbuf_t *process_theora_page (ogg_state_t *ogg_info, ogg_codec_t *codec,
}
refbuf = make_refbuf_with_page (page);
/* LOG_DEBUG("refbuf %p has pageno %ld, %llu", refbuf, ogg_page_pageno (page), (uint64_t)granulepos); */
/* ICECAST_LOG_DEBUG("refbuf %p has pageno %ld, %llu", refbuf, ogg_page_pageno (page), (uint64_t)granulepos); */
if (granulepos != theora->prev_granulepos || granulepos == 0)
{
......@@ -162,7 +162,7 @@ ogg_codec_t *initial_theora_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for theora codec");
ICECAST_LOG_DEBUG("checking for theora codec");
if (theora_decode_header (&theora_codec->ti, &theora_codec->tc, &packet) < 0)
{
theora_info_clear (&theora_codec->ti);
......@@ -172,7 +172,7 @@ ogg_codec_t *initial_theora_page (format_plugin_t *plugin, ogg_page *page)
free (codec);
return NULL;
}
LOG_INFO("seen initial theora header");
ICECAST_LOG_INFO("seen initial theora header");
codec->specific = theora_codec;
codec->process_page = process_theora_page;
codec->codec_free = theora_codec_free;
......
......@@ -84,7 +84,7 @@ static void vorbis_codec_free (ogg_state_t *ogg_info, ogg_codec_t *codec)
{
vorbis_codec_t *vorbis = codec->specific;
LOG_DEBUG("freeing vorbis codec");
ICECAST_LOG_DEBUG("freeing vorbis codec");
stats_event (ogg_info->mount, "audio_bitrate", NULL);
stats_event (ogg_info->mount, "audio_channels", NULL);
stats_event (ogg_info->mount, "audio_samplerate", NULL);
......@@ -195,7 +195,7 @@ static refbuf_t *get_buffer_finished (ogg_state_t *ogg_info, ogg_codec_t *codec)
source_vorbis->prev_page_samples = ogg_page_granulepos (&page);
refbuf = make_refbuf_with_page (&page);
LOG_DEBUG("flushing page");
ICECAST_LOG_DEBUG("flushing page");
return refbuf;
}
ogg_stream_clear (&source_vorbis->new_os);
......@@ -221,7 +221,7 @@ static void initiate_flush (vorbis_codec_t *source_vorbis)
if (source_vorbis->prev_packet)
{
/* insert prev_packet with eos */
LOG_DEBUG("adding EOS packet");
ICECAST_LOG_DEBUG("adding EOS packet");
source_vorbis->prev_packet->e_o_s = 1;
add_audio_packet (source_vorbis, source_vorbis->prev_packet);
source_vorbis->prev_packet->e_o_s = 0;
......@@ -318,7 +318,7 @@ static int process_vorbis_headers (ogg_state_t *ogg_info, ogg_codec_t *codec)
if (source_vorbis->header [0] == NULL)
return 0;
LOG_DEBUG("Adding the 3 header packets");
ICECAST_LOG_DEBUG("Adding the 3 header packets");
ogg_stream_packetin (&source_vorbis->new_os, source_vorbis->header [0]);
/* NOTE: we could build a separate comment packet each time */
if (source_vorbis->rebuild_comment)
......@@ -373,7 +373,7 @@ ogg_codec_t *initial_vorbis_page (format_plugin_t *plugin, ogg_page *page)
ogg_stream_packetout (&codec->os, &packet);
LOG_DEBUG("checking for vorbis codec");
ICECAST_LOG_DEBUG("checking for vorbis codec");
if (vorbis_synthesis_headerin (&vorbis->vi, &vorbis->vc, &packet) < 0)
{
ogg_stream_clear (&codec->os);
......@@ -383,7 +383,7 @@ ogg_codec_t *initial_vorbis_page (format_plugin_t *plugin, ogg_page *page)
free (codec);
return NULL;
}
LOG_INFO("seen initial vorbis header");
ICECAST_LOG_INFO("seen initial vorbis header");