encoder_list: add macro _for_each()
This commit is contained in:
@@ -24,6 +24,14 @@
|
||||
|
||||
struct encoder_plugin;
|
||||
|
||||
extern const struct encoder_plugin *const encoder_plugins[];
|
||||
|
||||
#define encoder_plugins_for_each(plugin) \
|
||||
for (const struct encoder_plugin *plugin, \
|
||||
*const*encoder_plugin_iterator = &encoder_plugins[0]; \
|
||||
(plugin = *encoder_plugin_iterator) != NULL; \
|
||||
++encoder_plugin_iterator)
|
||||
|
||||
/**
|
||||
* Looks up an encoder plugin by its name.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user