- filter_chain_Reset(vout->p->filter.chain, &fmt, &fmt);
- if (filter_chain_AppendFromString(vout->p->filter.chain,
- filters) < 0)
- msg_Err(vout, "Video filter chain creation failed");
+ filter_chain_Reset(vout->p->filter.chain_static, &fmt, &fmt);
+ filter_chain_Reset(vout->p->filter.chain_interactive, &fmt, &fmt);
+
+ for (int a = 0; a < 2; a++) {
+ vlc_array_t *array = a == 0 ? &array_static :
+ &array_interactive;
+ filter_chain_t *chain = a == 0 ? vout->p->filter.chain_static :
+ vout->p->filter.chain_interactive;
+
+ for (int i = 0; i < vlc_array_count(array); i++) {
+ vout_filter_t *e = vlc_array_item_at_index(array, i);
+ msg_Dbg(vout, "Adding '%s' as %s", e->name, a == 0 ? "static" : "interactive");
+ if (!filter_chain_AppendFilter(chain, e->name, e->cfg, NULL, NULL)) {
+ msg_Err(vout, "Failed to add filter '%s'", e->name);
+ config_ChainDestroy(e->cfg);
+ }
+ free(e->name);
+ free(e);
+ }
+ vlc_array_clear(array);
+ }