Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8bfd8781
Commit
8bfd8781
authored
Apr 15, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/select: factorize options definition between select and aselect
parent
dcc1b323
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
f_select.c
libavfilter/f_select.c
+12
-19
No files found.
libavfilter/f_select.c
View file @
8bfd8781
...
...
@@ -141,6 +141,16 @@ typedef struct {
int
nb_outputs
;
}
SelectContext
;
#define OFFSET(x) offsetof(SelectContext, x)
#define DEFINE_OPTIONS(filt_name, FLAGS) \
static const AVOption filt_name##_options[] = { \
{ "expr", "set an expression to use for selecting frames", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "1" }, .flags=FLAGS }, \
{ "e", "set an expression to use for selecting frames", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "1" }, .flags=FLAGS }, \
{ "outputs", "set the number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, .flags=FLAGS }, \
{ "n", "set the number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, .flags=FLAGS }, \
{ NULL } \
}
static
int
request_frame
(
AVFilterLink
*
outlink
);
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
...
...
@@ -416,15 +426,7 @@ static int query_formats(AVFilterContext *ctx)
#if CONFIG_ASELECT_FILTER
#define OFFSET(x) offsetof(SelectContext, x)
#define AFLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
static
const
AVOption
aselect_options
[]
=
{
{
"expr"
,
"An expression to use for selecting frames"
,
OFFSET
(
expr_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
AFLAGS
},
{
"e"
,
"An expression to use for selecting frames"
,
OFFSET
(
expr_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
AFLAGS
},
{
"outputs"
,
"set the number of outputs"
,
OFFSET
(
nb_outputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
INT_MAX
,
AFLAGS
},
{
"n"
,
"set the number of outputs"
,
OFFSET
(
nb_outputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
INT_MAX
,
AFLAGS
},
{
NULL
},
};
DEFINE_OPTIONS
(
aselect
,
AV_OPT_FLAG_AUDIO_PARAM
|
AV_OPT_FLAG_FILTERING_PARAM
);
AVFILTER_DEFINE_CLASS
(
aselect
);
static
av_cold
int
aselect_init
(
AVFilterContext
*
ctx
)
...
...
@@ -468,16 +470,7 @@ AVFilter avfilter_af_aselect = {
#if CONFIG_SELECT_FILTER
#define OFFSET(x) offsetof(SelectContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
select_options
[]
=
{
{
"expr"
,
"An expression to use for selecting frames"
,
OFFSET
(
expr_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
FLAGS
},
{
"e"
,
"An expression to use for selecting frames"
,
OFFSET
(
expr_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
FLAGS
},
{
"outputs"
,
"set the number of outputs"
,
OFFSET
(
nb_outputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
INT_MAX
,
FLAGS
},
{
"n"
,
"set the number of outputs"
,
OFFSET
(
nb_outputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
INT_MAX
,
FLAGS
},
{
NULL
},
};
DEFINE_OPTIONS
(
select
,
AV_OPT_FLAG_VIDEO_PARAM
|
AV_OPT_FLAG_FILTERING_PARAM
);
AVFILTER_DEFINE_CLASS
(
select
);
static
av_cold
int
select_init
(
AVFilterContext
*
ctx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment