mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/avfilter: Add avfilter_filter_pad_count()
It is intended as replacement for avfilter_pad_count(). In contrast to the latter, it avoids a loop. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8be701d9f7
commit
7c5f998196
|
@ -14,6 +14,9 @@ libavutil: 2021-04-27
|
||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2021-08-20 - xxxxxxxxxx - lavfi 8.3.100 - avfilter.H
|
||||||
|
Add avfilter_filter_pad_count() as a replacement for avfilter_pad_count().
|
||||||
|
|
||||||
2021-08-17 - xxxxxxxxxx - lavu 57.4.101 - opt.h
|
2021-08-17 - xxxxxxxxxx - lavu 57.4.101 - opt.h
|
||||||
av_opt_copy() now guarantees that allocated src and dst options
|
av_opt_copy() now guarantees that allocated src and dst options
|
||||||
don't alias each other even on error.
|
don't alias each other even on error.
|
||||||
|
|
|
@ -556,6 +556,11 @@ int avfilter_pad_count(const AVFilterPad *pads)
|
||||||
av_assert0(!"AVFilterPad list not from a filter");
|
av_assert0(!"AVFilterPad list not from a filter");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output)
|
||||||
|
{
|
||||||
|
return is_output ? filter->nb_outputs : filter->nb_inputs;
|
||||||
|
}
|
||||||
|
|
||||||
static const char *default_filter_name(void *filter_ctx)
|
static const char *default_filter_name(void *filter_ctx)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = filter_ctx;
|
AVFilterContext *ctx = filter_ctx;
|
||||||
|
|
|
@ -325,6 +325,11 @@ typedef struct AVFilter {
|
||||||
int (*activate)(AVFilterContext *ctx);
|
int (*activate)(AVFilterContext *ctx);
|
||||||
} AVFilter;
|
} AVFilter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of elements in an AVFilter's inputs or outputs array.
|
||||||
|
*/
|
||||||
|
unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process multiple parts of the frame concurrently.
|
* Process multiple parts of the frame concurrently.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "libavutil/version.h"
|
#include "libavutil/version.h"
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MAJOR 8
|
#define LIBAVFILTER_VERSION_MAJOR 8
|
||||||
#define LIBAVFILTER_VERSION_MINOR 2
|
#define LIBAVFILTER_VERSION_MINOR 3
|
||||||
#define LIBAVFILTER_VERSION_MICRO 100
|
#define LIBAVFILTER_VERSION_MICRO 100
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue