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
59d8050d
Commit
59d8050d
authored
Oct 12, 2014
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft
parent
acea53fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
47 deletions
+0
-47
version.h
libavfilter/version.h
+0
-3
vf_drawtext.c
libavfilter/vf_drawtext.c
+0
-44
No files found.
libavfilter/version.h
View file @
59d8050d
...
...
@@ -73,9 +73,6 @@
#ifndef FF_API_OLD_GRAPH_PARSE
#define FF_API_OLD_GRAPH_PARSE (LIBAVFILTER_VERSION_MAJOR < 5)
#endif
#ifndef FF_API_DRAWTEXT_OLD_TIMELINE
#define FF_API_DRAWTEXT_OLD_TIMELINE (LIBAVFILTER_VERSION_MAJOR < 5)
#endif
#ifndef FF_API_NOCONST_GET_NAME
#define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 6)
#endif
...
...
libavfilter/vf_drawtext.c
View file @
59d8050d
...
...
@@ -177,11 +177,6 @@ typedef struct DrawTextContext {
AVExpr
*
x_pexpr
,
*
y_pexpr
;
///< parsed expressions for x and y
int64_t
basetime
;
///< base pts time in the real world for display
double
var_values
[
VAR_VARS_NB
];
#if FF_API_DRAWTEXT_OLD_TIMELINE
char
*
draw_expr
;
///< expression for draw
AVExpr
*
draw_pexpr
;
///< parsed expression for draw
int
draw
;
///< set to zero to prevent drawing
#endif
AVLFG
prng
;
///< random
char
*
tc_opt_string
;
///< specified timecode option string
AVRational
tc_rate
;
///< frame rate for timecode
...
...
@@ -216,9 +211,6 @@ static const AVOption drawtext_options[]= {
{
"borderw"
,
"set border width"
,
OFFSET
(
borderw
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"tabsize"
,
"set tab size"
,
OFFSET
(
tabsize
),
AV_OPT_TYPE_INT
,
{.
i64
=
4
},
0
,
INT_MAX
,
FLAGS
},
{
"basetime"
,
"set base time"
,
OFFSET
(
basetime
),
AV_OPT_TYPE_INT64
,
{.
i64
=
AV_NOPTS_VALUE
},
INT64_MIN
,
INT64_MAX
,
FLAGS
},
#if FF_API_DRAWTEXT_OLD_TIMELINE
{
"draw"
,
"if false do not draw (deprecated)"
,
OFFSET
(
draw_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
,
FLAGS
},
#endif
#if CONFIG_LIBFONTCONFIG
{
"font"
,
"Font name"
,
OFFSET
(
font
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"Sans"
},
.
flags
=
FLAGS
},
#endif
...
...
@@ -596,12 +588,6 @@ static av_cold int init(AVFilterContext *ctx)
DrawTextContext
*
s
=
ctx
->
priv
;
Glyph
*
glyph
;
#if FF_API_DRAWTEXT_OLD_TIMELINE
if
(
s
->
draw_expr
)
av_log
(
ctx
,
AV_LOG_WARNING
,
"'draw' option is deprecated and will be removed soon, "
"you are encouraged to use the generic timeline support through the 'enable' option
\n
"
);
#endif
if
(
!
s
->
fontfile
&&
!
CONFIG_LIBFONTCONFIG
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"No font filename provided
\n
"
);
return
AVERROR
(
EINVAL
);
...
...
@@ -713,12 +699,7 @@ static av_cold void uninit(AVFilterContext *ctx)
av_expr_free
(
s
->
x_pexpr
);
av_expr_free
(
s
->
y_pexpr
);
#if FF_API_DRAWTEXT_OLD_TIMELINE
av_expr_free
(
s
->
draw_pexpr
);
s
->
x_pexpr
=
s
->
y_pexpr
=
s
->
draw_pexpr
=
NULL
;
#else
s
->
x_pexpr
=
s
->
y_pexpr
=
NULL
;
#endif
av_freep
(
&
s
->
positions
);
s
->
nb_positions
=
0
;
...
...
@@ -761,12 +742,7 @@ static int config_input(AVFilterLink *inlink)
av_expr_free
(
s
->
x_pexpr
);
av_expr_free
(
s
->
y_pexpr
);
#if FF_API_DRAWTEXT_OLD_TIMELINE
av_expr_free
(
s
->
draw_pexpr
);
s
->
x_pexpr
=
s
->
y_pexpr
=
s
->
draw_pexpr
=
NULL
;
#else
s
->
x_pexpr
=
s
->
y_pexpr
=
NULL
;
#endif
if
((
ret
=
av_expr_parse
(
&
s
->
x_pexpr
,
s
->
x_expr
,
var_names
,
NULL
,
NULL
,
fun2_names
,
fun2
,
0
,
ctx
))
<
0
||
...
...
@@ -774,12 +750,6 @@ static int config_input(AVFilterLink *inlink)
NULL
,
NULL
,
fun2_names
,
fun2
,
0
,
ctx
))
<
0
)
return
AVERROR
(
EINVAL
);
#if FF_API_DRAWTEXT_OLD_TIMELINE
if
(
s
->
draw_expr
&&
(
ret
=
av_expr_parse
(
&
s
->
draw_pexpr
,
s
->
draw_expr
,
var_names
,
NULL
,
NULL
,
fun2_names
,
fun2
,
0
,
ctx
))
<
0
)
return
ret
;
#endif
return
0
;
}
...
...
@@ -1273,16 +1243,6 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
s
->
x
=
s
->
var_values
[
VAR_X
]
=
av_expr_eval
(
s
->
x_pexpr
,
s
->
var_values
,
&
s
->
prng
);
s
->
y
=
s
->
var_values
[
VAR_Y
]
=
av_expr_eval
(
s
->
y_pexpr
,
s
->
var_values
,
&
s
->
prng
);
s
->
x
=
s
->
var_values
[
VAR_X
]
=
av_expr_eval
(
s
->
x_pexpr
,
s
->
var_values
,
&
s
->
prng
);
#if FF_API_DRAWTEXT_OLD_TIMELINE
if
(
s
->
draw_pexpr
){
s
->
draw
=
av_expr_eval
(
s
->
draw_pexpr
,
s
->
var_values
,
&
s
->
prng
);
if
(
!
s
->
draw
)
return
0
;
}
if
(
ctx
->
is_disabled
)
return
0
;
#endif
box_w
=
FFMIN
(
width
-
1
,
max_text_line_w
);
box_h
=
FFMIN
(
height
-
1
,
y
+
s
->
max_glyph_h
);
...
...
@@ -1375,9 +1335,5 @@ AVFilter ff_vf_drawtext = {
.
inputs
=
avfilter_vf_drawtext_inputs
,
.
outputs
=
avfilter_vf_drawtext_outputs
,
.
process_command
=
command
,
#if FF_API_DRAWTEXT_OLD_TIMELINE
.
flags
=
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
,
#else
.
flags
=
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
,
#endif
};
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