Commit 89506be8 authored by Philipp Schafft's avatar Philipp Schafft 🦁 Committed by Philipp Schafft

Feature: Allow setting codec for playlist and RoarAudio input

This change allows setting the codec for playlist and RoarAudio input.
It allows setting vorbis and generic Ogg for playlists (all types).
For RoarAudio the ogg_generic type is now mapped to IceS' generic OGG type.
parent f89451a1
......@@ -183,6 +183,14 @@
comments. If a line has a single '-' then standard input is read, which
provides a way of getting some external Ogg Vorbis stream into ices.
</div>
<h4>format</h4>
<div class=indentedbox>
This sets the used codec for input files.
Use "ogg" for generic Ogg handling. In this mode codec specific features
will not available but codec is detected on the fly.
Currently "vorbis" and "ogg" are supported.
By default "vorbis" is used.
</div>
<h4>random</h4>
<div class=indentedbox>
When set to 1, the playlist will be randomised when the playlist is
......
......@@ -231,7 +231,7 @@ input_module_t *playlist_open_module(module_param_t *params)
module_param_t *current;
int (*init)(module_param_t *, playlist_state_t *)=NULL;
mod->type = ICES_INPUT_VORBIS;
mod->type = ICES_INPUT_VORBIS; /* Default as it was the historical value */
mod->getdata = playlist_read;
mod->handle_event = event_handler;
mod->metadata_update = NULL; /* Not used for playlists */
......@@ -262,6 +262,22 @@ input_module_t *playlist_open_module(module_param_t *params)
goto fail;
}
}
else if (!strcmp(current->name, "format"))
{
if (!strcmp(current->value, "vorbis"))
{
mod->type = ICES_INPUT_VORBIS;
}
else if (!strcmp(current->value, "ogg"))
{
mod->type = ICES_INPUT_OGG;
}
else
{
LOG_ERROR1("Unknown playlist format \"%s\"", current->value);
goto fail;
}
}
current = current->next;
}
......
......@@ -293,6 +293,8 @@ input_module_t *roar_open_module(module_param_t *params)
break;
case ROAR_CODEC_OGG_GENERAL:
LOG_WARN0("Codec may not work, specify ogg_vorbis for Vorbis streaming");
mod->type = ICES_INPUT_OGG;
break;
case ROAR_CODEC_OGG_VORBIS:
mod->type = ICES_INPUT_VORBIS;
// we do not set mod->subtype here, strange design ices2 has...
......
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