Commit e8cd4b71 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Cleanup: Do not use any deprecated libshout functions

parent 883649ca
......@@ -75,14 +75,14 @@ void *ices_instance_stream(void *arg)
return NULL;
break;
case ICES_INPUT_VORBIS:
shout_set_format(sdsc->shout, SHOUT_FORMAT_VORBIS);
shout_set_content_format(sdsc->shout, SHOUT_FORMAT_OGG, SHOUT_USAGE_AUDIO|SHOUT_USAGE_UNKNOWN, NULL);
reencoding = stream->encode;
break;
case ICES_INPUT_OGG:
shout_set_format(sdsc->shout, SHOUT_FORMAT_OGG);
shout_set_content_format(sdsc->shout, SHOUT_FORMAT_OGG, SHOUT_USAGE_UNKNOWN, NULL);
break;
case ICES_INPUT_PCM:
shout_set_format(sdsc->shout, SHOUT_FORMAT_VORBIS);
shout_set_content_format(sdsc->shout, SHOUT_FORMAT_OGG, SHOUT_USAGE_AUDIO, NULL);
encoding = stream->encode;
break;
}
......@@ -192,25 +192,25 @@ void *ices_instance_stream(void *arg)
stream_url = ices_config->stream_url;
if(stream_name)
if (shout_set_name(sdsc->shout, stream_name) != SHOUTERR_SUCCESS) {
if (shout_set_meta(sdsc->shout, SHOUT_META_NAME, stream_name) != SHOUTERR_SUCCESS) {
LOG_ERROR1("libshout error: %s\n", shout_get_error(sdsc->shout));
stream->died = 1;
return NULL;
}
if (stream_genre)
if (shout_set_genre(sdsc->shout, stream_genre) != SHOUTERR_SUCCESS) {
if (shout_set_meta(sdsc->shout, SHOUT_META_GENRE, stream_genre) != SHOUTERR_SUCCESS) {
LOG_ERROR1("libshout error: %s\n", shout_get_error(sdsc->shout));
stream->died = 1;
return NULL;
}
if (stream_description)
if (shout_set_description(sdsc->shout, stream_description) != SHOUTERR_SUCCESS) {
if (shout_set_meta(sdsc->shout, SHOUT_META_DESCRIPTION, stream_description) != SHOUTERR_SUCCESS) {
LOG_ERROR1("libshout error: %s\n", shout_get_error(sdsc->shout));
stream->died = 1;
return NULL;
}
if (stream_url)
if (shout_set_url(sdsc->shout, stream_url) != SHOUTERR_SUCCESS) {
if (shout_set_meta(sdsc->shout, SHOUT_META_URL, stream_url) != SHOUTERR_SUCCESS) {
LOG_ERROR1("libshout error: %s\n", shout_get_error(sdsc->shout));
stream->died = 1;
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment