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
4fe54487
Commit
4fe54487
authored
Mar 12, 2012
by
Clément Bœsch
Committed by
Clément Bœsch
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/drawtext: add 24 hours wrapping option for timecode.
Fixes ticket #1044.
parent
88c76c7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
vf_drawtext.c
libavfilter/vf_drawtext.c
+4
-0
No files found.
libavfilter/vf_drawtext.c
View file @
4fe54487
...
...
@@ -161,6 +161,7 @@ typedef struct {
char
*
tc_opt_string
;
///< specified timecode option string
AVRational
tc_rate
;
///< frame rate for timecode
AVTimecode
tc
;
///< timecode context
int
tc24hmax
;
///< 1 if timecode is wrapped to 24 hours, 0 otherwise
int
frame_id
;
}
DrawTextContext
;
...
...
@@ -183,6 +184,7 @@ static const AVOption drawtext_options[]= {
{
"basetime"
,
"set base time"
,
OFFSET
(
basetime
),
AV_OPT_TYPE_INT64
,
{.
dbl
=
AV_NOPTS_VALUE
},
INT64_MIN
,
INT64_MAX
},
{
"draw"
,
"if false do not draw"
,
OFFSET
(
d_expr
),
AV_OPT_TYPE_STRING
,
{.
str
=
"1"
},
CHAR_MIN
,
CHAR_MAX
},
{
"timecode"
,
"set initial timecode"
,
OFFSET
(
tc_opt_string
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"tc24hmax"
,
"set 24 hours max (timecode only)"
,
OFFSET
(
tc24hmax
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
"r"
,
"set rate (timecode only)"
,
OFFSET
(
tc_rate
),
AV_OPT_TYPE_RATIONAL
,
{.
dbl
=
0
},
0
,
INT_MAX
},
{
"rate"
,
"set rate (timecode only)"
,
OFFSET
(
tc_rate
),
AV_OPT_TYPE_RATIONAL
,
{.
dbl
=
0
},
0
,
INT_MAX
},
{
"fix_bounds"
,
"if true, check and fix text coords to avoid clipping"
,
...
...
@@ -351,6 +353,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
dtext
->
tc_opt_string
,
ctx
);
if
(
ret
<
0
)
return
ret
;
if
(
dtext
->
tc24hmax
)
dtext
->
tc
.
flags
|=
AV_TIMECODE_FLAG_24HOURSMAX
;
if
(
!
dtext
->
text
)
dtext
->
text
=
av_strdup
(
""
);
}
...
...
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