mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
This will allow making AVFilterPad opaque for the calling apps, since those are the only two fields that can be useful to the users.
This commit is contained in:
@@ -429,6 +429,16 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *avfilter_pad_get_name(AVFilterPad *pads, int pad_idx)
|
||||
{
|
||||
return pads[pad_idx].name;
|
||||
}
|
||||
|
||||
enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx)
|
||||
{
|
||||
return pads[pad_idx].type;
|
||||
}
|
||||
|
||||
#if FF_API_DEFAULT_CONFIG_OUTPUT_LINK
|
||||
int avfilter_default_config_output_link(AVFilterLink *link)
|
||||
{
|
||||
|
||||
@@ -359,6 +359,28 @@ struct AVFilterPad {
|
||||
int (*config_props)(AVFilterLink *link);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the name of an AVFilterPad.
|
||||
*
|
||||
* @param pads an array of AVFilterPads
|
||||
* @param pad_idx index of the pad in the array it; is the caller's
|
||||
* responsibility to ensure the index is valid
|
||||
*
|
||||
* @return name of the pad_idx'th pad in pads
|
||||
*/
|
||||
const char *avfilter_pad_get_name(AVFilterPad *pads, int pad_idx);
|
||||
|
||||
/**
|
||||
* Get the type of an AVFilterPad.
|
||||
*
|
||||
* @param pads an array of AVFilterPads
|
||||
* @param pad_idx index of the pad in the array; it is the caller's
|
||||
* responsibility to ensure the index is valid
|
||||
*
|
||||
* @return type of the pad_idx'th pad in pads
|
||||
*/
|
||||
enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx);
|
||||
|
||||
#if FF_API_FILTERS_PUBLIC
|
||||
/** default handler for start_frame() for video inputs */
|
||||
attribute_deprecated
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "libavutil/avutil.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MAJOR 2
|
||||
#define LIBAVFILTER_VERSION_MINOR 21
|
||||
#define LIBAVFILTER_VERSION_MINOR 22
|
||||
#define LIBAVFILTER_VERSION_MICRO 0
|
||||
|
||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||
|
||||
Reference in New Issue
Block a user