mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
avfilter: use AVFILTER_DEFINE_CLASS()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
6e5864ab29
commit
7ff5a345a4
@ -47,7 +47,7 @@ typedef struct Bs2bContext {
|
||||
#define OFFSET(x) offsetof(Bs2bContext, x)
|
||||
#define A AV_OPT_FLAG_AUDIO_PARAM
|
||||
|
||||
static const AVOption options[] = {
|
||||
static const AVOption bs2b_options[] = {
|
||||
{ "profile", "Apply a pre-defined crossfeed level",
|
||||
OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, INT_MAX, A, "profile" },
|
||||
{ "default", "default profile", 0, AV_OPT_TYPE_CONST, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, 0, A, "profile" },
|
||||
@ -60,12 +60,7 @@ static const AVOption options[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static const AVClass bs2b_class = {
|
||||
.class_name = "bs2b filter",
|
||||
.item_name = av_default_item_name,
|
||||
.option = options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
AVFILTER_DEFINE_CLASS(bs2b);
|
||||
|
||||
static av_cold int init(AVFilterContext *ctx)
|
||||
{
|
||||
|
@ -53,13 +53,7 @@ static const AVOption cover_rect_options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const AVClass cover_rect_class = {
|
||||
.class_name = "cover_rect",
|
||||
.item_name = av_default_item_name,
|
||||
.option = cover_rect_options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
.category = AV_CLASS_CATEGORY_FILTER,
|
||||
};
|
||||
AVFILTER_DEFINE_CLASS(cover_rect);
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ typedef struct FOCContext {
|
||||
|
||||
#define OFFSET(x) offsetof(FOCContext, x)
|
||||
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
|
||||
static const AVOption foc_options[] = {
|
||||
static const AVOption find_rect_options[] = {
|
||||
{ "object", "object bitmap filename", OFFSET(obj_filename), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = FLAGS },
|
||||
{ "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_FLOAT, {.dbl = 0.5}, 0, 1.0, FLAGS },
|
||||
{ "mipmaps", "set mipmaps", OFFSET(mipmaps), AV_OPT_TYPE_INT, {.i64 = 3}, 1, MAX_MIPMAPS, FLAGS },
|
||||
@ -56,13 +56,7 @@ static const AVOption foc_options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const AVClass foc_class = {
|
||||
.class_name = "find_rect",
|
||||
.item_name = av_default_item_name,
|
||||
.option = foc_options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
.category = AV_CLASS_CATEGORY_FILTER,
|
||||
};
|
||||
AVFILTER_DEFINE_CLASS(find_rect);
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
@ -307,5 +301,5 @@ AVFilter ff_vf_find_rect = {
|
||||
.query_formats = query_formats,
|
||||
.inputs = foc_inputs,
|
||||
.outputs = foc_outputs,
|
||||
.priv_class = &foc_class,
|
||||
.priv_class = &find_rect_class,
|
||||
};
|
||||
|
@ -315,7 +315,7 @@ static int request_frame(AVFilterLink *outlink)
|
||||
|
||||
#define OFFSET(x) offsetof(FramepackContext, x)
|
||||
#define V AV_OPT_FLAG_VIDEO_PARAM
|
||||
static const AVOption options[] = {
|
||||
static const AVOption framepack_options[] = {
|
||||
{ "format", "Frame pack output format", OFFSET(format), AV_OPT_TYPE_INT,
|
||||
{ .i64 = AV_STEREO3D_SIDEBYSIDE }, 0, INT_MAX, .flags = V, .unit = "format" },
|
||||
{ "sbs", "Views are packed next to each other", 0, AV_OPT_TYPE_CONST,
|
||||
@ -331,12 +331,7 @@ static const AVOption options[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static const AVClass framepack_class = {
|
||||
.class_name = "framepack",
|
||||
.item_name = av_default_item_name,
|
||||
.option = options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
AVFILTER_DEFINE_CLASS(framepack);
|
||||
|
||||
static const AVFilterPad framepack_inputs[] = {
|
||||
{
|
||||
|
@ -134,12 +134,7 @@ static const AVOption shuffleplanes_options[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static const AVClass shuffleplanes_class = {
|
||||
.class_name = "shuffleplanes",
|
||||
.item_name = av_default_item_name,
|
||||
.option = shuffleplanes_options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
AVFILTER_DEFINE_CLASS(shuffleplanes);
|
||||
|
||||
static const AVFilterPad shuffleplanes_inputs[] = {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user