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
4c8fc6a2
Commit
4c8fc6a2
authored
Aug 01, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/testsrc: use AVFILTER_DEFINE_CLASS for defining the filter classes
Factorize.
parent
33474eb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+6
-15
No files found.
libavfilter/vsrc_testsrc.c
View file @
4c8fc6a2
...
...
@@ -61,7 +61,7 @@ typedef struct {
#define OFFSET(x) offsetof(TestSourceContext, x)
static
const
AVOption
testsrc_options
[]
=
{
static
const
AVOption
options
[]
=
{
{
"size"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"320x240"
},
0
,
0
},
{
"s"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"320x240"
},
0
,
0
},
{
"rate"
,
"set video rate"
,
OFFSET
(
rate
),
AV_OPT_TYPE_STRING
,
{.
str
=
"25"
},
0
,
0
},
...
...
@@ -186,13 +186,8 @@ static int request_frame(AVFilterLink *outlink)
#if CONFIG_NULLSRC_FILTER
static
const
AVClass
nullsrc_class
=
{
.
class_name
=
"nullsrc"
,
.
item_name
=
av_default_item_name
,
.
option
=
testsrc_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
.
category
=
AV_CLASS_CATEGORY_FILTER
,
};
#define nullsrc_options options
AVFILTER_DEFINE_CLASS
(
nullsrc
);
static
void
nullsrc_fill_picture
(
AVFilterContext
*
ctx
,
AVFilterBufferRef
*
picref
)
{
}
...
...
@@ -224,6 +219,7 @@ AVFilter avfilter_vsrc_nullsrc = {
#if CONFIG_TESTSRC_FILTER
#define testsrc_options options
AVFILTER_DEFINE_CLASS
(
testsrc
);
/**
...
...
@@ -443,13 +439,8 @@ AVFilter avfilter_vsrc_testsrc = {
#if CONFIG_RGBTESTSRC_FILTER
static
const
AVClass
rgbtestsrc_class
=
{
.
class_name
=
"rgbtestsrc"
,
.
item_name
=
av_default_item_name
,
.
option
=
testsrc_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
.
category
=
AV_CLASS_CATEGORY_FILTER
,
};
#define rgbtestsrc_options options
AVFILTER_DEFINE_CLASS
(
rgbtestsrc
);
#define R 0
#define G 1
...
...
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