Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
80580b40
Commit
80580b40
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavi/vf_drawbox: use standard options parsing.
parent
37438d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
vf_drawbox.c
libavfilter/vf_drawbox.c
+3
-15
No files found.
libavfilter/vf_drawbox.c
View file @
80580b40
...
@@ -68,14 +68,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -68,14 +68,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
{
{
DrawBoxContext
*
drawbox
=
ctx
->
priv
;
DrawBoxContext
*
drawbox
=
ctx
->
priv
;
uint8_t
rgba_color
[
4
];
uint8_t
rgba_color
[
4
];
static
const
char
*
shorthand
[]
=
{
"x"
,
"y"
,
"w"
,
"h"
,
"color"
,
"thickness"
,
NULL
};
int
ret
;
drawbox
->
class
=
&
drawbox_class
;
av_opt_set_defaults
(
drawbox
);
if
((
ret
=
av_opt_set_from_string
(
drawbox
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
if
(
!
strcmp
(
drawbox
->
color_str
,
"invert"
))
if
(
!
strcmp
(
drawbox
->
color_str
,
"invert"
))
drawbox
->
invert_color
=
1
;
drawbox
->
invert_color
=
1
;
...
@@ -92,12 +84,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -92,12 +84,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return
0
;
return
0
;
}
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
DrawBoxContext
*
drawbox
=
ctx
->
priv
;
av_opt_free
(
drawbox
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
...
@@ -185,15 +171,17 @@ static const AVFilterPad avfilter_vf_drawbox_outputs[] = {
...
@@ -185,15 +171,17 @@ static const AVFilterPad avfilter_vf_drawbox_outputs[] = {
{
NULL
}
{
NULL
}
};
};
static
const
char
*
const
shorthand
[]
=
{
"x"
,
"y"
,
"w"
,
"h"
,
"color"
,
"thickness"
,
NULL
};
AVFilter
avfilter_vf_drawbox
=
{
AVFilter
avfilter_vf_drawbox
=
{
.
name
=
"drawbox"
,
.
name
=
"drawbox"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Draw a colored box on the input video."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Draw a colored box on the input video."
),
.
priv_size
=
sizeof
(
DrawBoxContext
),
.
priv_size
=
sizeof
(
DrawBoxContext
),
.
init
=
init
,
.
init
=
init
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
.
inputs
=
avfilter_vf_drawbox_inputs
,
.
inputs
=
avfilter_vf_drawbox_inputs
,
.
outputs
=
avfilter_vf_drawbox_outputs
,
.
outputs
=
avfilter_vf_drawbox_outputs
,
.
priv_class
=
&
drawbox_class
,
.
priv_class
=
&
drawbox_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