Commit 9cdbde4f authored by Max Kellermann's avatar Max Kellermann

output: new option "tags" may be used to disable sending tags

Implements Mantis ticket 0003340.
parent f9147a07
...@@ -3,6 +3,8 @@ ver 0.18 (2012/??/??) ...@@ -3,6 +3,8 @@ ver 0.18 (2012/??/??)
- adplug: new decoder plugin using libadplug - adplug: new decoder plugin using libadplug
- opus: new decoder plugin for the Opus codec - opus: new decoder plugin for the Opus codec
- vorbis: skip 16 bit quantisation, provide float samples - vorbis: skip 16 bit quantisation, provide float samples
* output:
- new option "tags" may be used to disable sending tags to output
* improved decoder/output error reporting * improved decoder/output error reporting
ver 0.17.2 (2012/??/??) ver 0.17.2 (2012/??/??)
......
...@@ -438,6 +438,18 @@ systemctl start mpd.socket</programlisting> ...@@ -438,6 +438,18 @@ systemctl start mpd.socket</programlisting>
</row> </row>
<row> <row>
<entry> <entry>
<varname>tags</varname>
<parameter>yes|no</parameter>
</entry>
<entry>
If set to "no", then MPD will not send tags to this
output. This is only useful for output plugins that
can receive tags, for example the
<varname>httpd</varname> output plugin.
</entry>
</row>
<row>
<entry>
<varname>always_on</varname> <varname>always_on</varname>
<parameter>yes|no</parameter> <parameter>yes|no</parameter>
</entry> </entry>
......
...@@ -165,6 +165,7 @@ ao_base_init(struct audio_output *ao, ...@@ -165,6 +165,7 @@ ao_base_init(struct audio_output *ao,
} }
ao->plugin = plugin; ao->plugin = plugin;
ao->tags = config_get_block_bool(param, "tags", true);
ao->always_on = config_get_block_bool(param, "always_on", false); ao->always_on = config_get_block_bool(param, "always_on", false);
ao->enabled = config_get_block_bool(param, "enabled", true); ao->enabled = config_get_block_bool(param, "enabled", true);
ao->really_enabled = false; ao->really_enabled = false;
......
...@@ -73,6 +73,13 @@ struct audio_output { ...@@ -73,6 +73,13 @@ struct audio_output {
struct mixer *mixer; struct mixer *mixer;
/** /**
* Will this output receive tags from the decoder? The
* default is true, but it may be configured to false to
* suppress sending tags to the output.
*/
bool tags;
/**
* Shall this output always play something (i.e. silence), * Shall this output always play something (i.e. silence),
* even when playback is stopped? * even when playback is stopped?
*/ */
......
...@@ -435,7 +435,7 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) ...@@ -435,7 +435,7 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk)
assert(ao != NULL); assert(ao != NULL);
assert(ao->filter != NULL); assert(ao->filter != NULL);
if (gcc_unlikely(chunk->tag != NULL)) { if (ao->tags && gcc_unlikely(chunk->tag != NULL)) {
g_mutex_unlock(ao->mutex); g_mutex_unlock(ao->mutex);
ao_plugin_send_tag(ao, chunk->tag); ao_plugin_send_tag(ao, chunk->tag);
g_mutex_lock(ao->mutex); g_mutex_lock(ao->mutex);
......
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