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
3f807288
Commit
3f807288
authored
Mar 24, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/blackframe: use standard options parsing.
parent
67ad9fd0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
vf_blackframe.c
libavfilter/vf_blackframe.c
+3
-15
No files found.
libavfilter/vf_blackframe.c
View file @
3f807288
...
@@ -73,14 +73,6 @@ static int query_formats(AVFilterContext *ctx)
...
@@ -73,14 +73,6 @@ static int query_formats(AVFilterContext *ctx)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
BlackFrameContext
*
blackframe
=
ctx
->
priv
;
BlackFrameContext
*
blackframe
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"amount"
,
"thresh"
,
NULL
};
int
ret
;
blackframe
->
class
=
&
blackframe_class
;
av_opt_set_defaults
(
blackframe
);
if
((
ret
=
av_opt_set_from_string
(
blackframe
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"bamount:%u bthresh:%u
\n
"
,
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"bamount:%u bthresh:%u
\n
"
,
blackframe
->
bamount
,
blackframe
->
bthresh
);
blackframe
->
bamount
,
blackframe
->
bthresh
);
...
@@ -88,12 +80,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -88,12 +80,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return
0
;
return
0
;
}
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
BlackFrameContext
*
blackframe
=
ctx
->
priv
;
av_opt_free
(
blackframe
);
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
frame
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
frame
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
...
@@ -142,13 +128,14 @@ static const AVFilterPad avfilter_vf_blackframe_outputs[] = {
...
@@ -142,13 +128,14 @@ static const AVFilterPad avfilter_vf_blackframe_outputs[] = {
{
NULL
}
{
NULL
}
};
};
static
const
char
*
const
shorthand
[]
=
{
"amount"
,
"thresh"
,
NULL
};
AVFilter
avfilter_vf_blackframe
=
{
AVFilter
avfilter_vf_blackframe
=
{
.
name
=
"blackframe"
,
.
name
=
"blackframe"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Detect frames that are (almost) black."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Detect frames that are (almost) black."
),
.
priv_size
=
sizeof
(
BlackFrameContext
),
.
priv_size
=
sizeof
(
BlackFrameContext
),
.
init
=
init
,
.
init
=
init
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
...
@@ -157,4 +144,5 @@ AVFilter avfilter_vf_blackframe = {
...
@@ -157,4 +144,5 @@ AVFilter avfilter_vf_blackframe = {
.
outputs
=
avfilter_vf_blackframe_outputs
,
.
outputs
=
avfilter_vf_blackframe_outputs
,
.
priv_class
=
&
blackframe_class
,
.
priv_class
=
&
blackframe_class
,
.
shorthand
=
shorthand
,
};
};
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