lavfi: add avfilter_default_filter_name()

The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.

This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
This commit is contained in:
Stefano Sabatini 2012-06-01 14:46:54 +02:00
parent 7d82020fcb
commit 4d6a8a2bdb
26 changed files with 38 additions and 119 deletions

View file

@ -95,14 +95,9 @@ static const AVOption life_options[] = {
{ NULL },
};
static const char *life_get_name(void *ctx)
{
return "life";
}
static const AVClass life_class = {
"LifeContext",
life_get_name,
avfilter_default_filter_name,
life_options
};