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
85e8a116
Commit
85e8a116
authored
May 13, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/pad: switch to AV_OPT_TYPE_COLOR
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1d2ecf96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
vf_pad.c
libavfilter/vf_pad.c
+1
-13
No files found.
libavfilter/vf_pad.c
View file @
85e8a116
...
@@ -88,22 +88,11 @@ typedef struct {
...
@@ -88,22 +88,11 @@ typedef struct {
char
*
h_expr
;
///< height expression string
char
*
h_expr
;
///< height expression string
char
*
x_expr
;
///< width expression string
char
*
x_expr
;
///< width expression string
char
*
y_expr
;
///< height expression string
char
*
y_expr
;
///< height expression string
char
*
color_str
;
uint8_t
rgba_color
[
4
];
///< color for the padding area
uint8_t
rgba_color
[
4
];
///< color for the padding area
FFDrawContext
draw
;
FFDrawContext
draw
;
FFDrawColor
color
;
FFDrawColor
color
;
}
PadContext
;
}
PadContext
;
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
{
PadContext
*
s
=
ctx
->
priv
;
if
(
av_parse_color
(
s
->
rgba_color
,
s
->
color_str
,
-
1
,
ctx
)
<
0
)
return
AVERROR
(
EINVAL
);
return
0
;
}
static
int
config_input
(
AVFilterLink
*
inlink
)
static
int
config_input
(
AVFilterLink
*
inlink
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
...
@@ -378,7 +367,7 @@ static const AVOption pad_options[] = {
...
@@ -378,7 +367,7 @@ static const AVOption pad_options[] = {
{
"h"
,
"set the pad area height expression"
,
OFFSET
(
h_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"ih"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"h"
,
"set the pad area height expression"
,
OFFSET
(
h_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"ih"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"x"
,
"set the x offset expression for the input image position"
,
OFFSET
(
x_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"0"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"x"
,
"set the x offset expression for the input image position"
,
OFFSET
(
x_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"0"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"y"
,
"set the y offset expression for the input image position"
,
OFFSET
(
y_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"0"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"y"
,
"set the y offset expression for the input image position"
,
OFFSET
(
y_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"0"
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
{
"color"
,
"set the color of the padded area border"
,
OFFSET
(
color_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
"black"
},
.
flags
=
FLAGS
},
{
"color"
,
"set the color of the padded area border"
,
OFFSET
(
rgba_color
),
AV_OPT_TYPE_COLOR
,
{.
str
=
"black"
},
.
flags
=
FLAGS
},
{
NULL
},
{
NULL
},
};
};
...
@@ -410,7 +399,6 @@ AVFilter avfilter_vf_pad = {
...
@@ -410,7 +399,6 @@ AVFilter avfilter_vf_pad = {
.
priv_size
=
sizeof
(
PadContext
),
.
priv_size
=
sizeof
(
PadContext
),
.
priv_class
=
&
pad_class
,
.
priv_class
=
&
pad_class
,
.
init
=
init
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
.
inputs
=
avfilter_vf_pad_inputs
,
.
inputs
=
avfilter_vf_pad_inputs
,
...
...
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