Luca Barbato
98c9ade985
drawtext: Move the strftime expansion in a separate function
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
fe026ba960
drawtext: Drop stray guards
There is a fallback for localtime_r and it is in use already.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
9b2c57bef5
drawtext: Add an alpha option
And document both `draw` and `alpha`.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
10 years ago
Ivan Efimov
2051b401cc
avfilter/drawtext: fix frame mem leak
Signed-off-by: Ivan Efimov <ioefimov@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Paul B Mahol
a0854c084e
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Marton Balint
c84b75c89c
vf_drawtext: add support for setting box border width
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ee7b5d4ef8
avfilter/vf_drawtext: Change enums to int, which are accessed via AVOption as int
This fixes depending on implementation defined behavior
10 years ago
Михаил Муковников
71f29410e7
lavfi: Increase drawtext font size limits
Raise the maximum font size to a larger value.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
013c3eb05c
avfilter/vf_drawtext: use gm_time_r() for thread saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
6b9b42cc55
drawtext: Remove the ifdef for localtime_r
If it isn't available in the system, we've got a fallback to
the normal localtime function, so normal code can assume it is
available as long as time_internal.h is included.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Luca Barbato
f401792595
vf_drawtext: Do not leak the mmapped textfile
And validate its size while at it.
CC: libav-stable@libav.org
Bug-Id: CID 1244189
10 years ago
James Almer
59d8050df1
avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft
10 years ago
Karl Kiniger
903156aa8a
vf_drawtext: add missing clear of pointers after av_expr_free()
Fixes segfault when using sendcmd with drawtext.
Since LIBAVFILTER_VERSION_MAJOR 5 FF_API_DRAWTEXT_OLD_TIMELINE
evaluates to 0.
Signed-off-by: Karl Kiniger <karl.kiniger@med.ge.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
6d7aa437e1
vf_drawtext: move "static const" before "struct".
This is consistent with all other occurrences.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
d9e2aceb7f
Add missing "const" all over the place.
Only "./configure --enable-gpl" on x86 was tested.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Andrey Utkin
cb8cb85da7
lavfi/drawtext: add alias "expr_int_format" to expansion function "eif"
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andrey Utkin
e9ff5df0b5
lavfi/drawtext: add fontcolor_expr option
Allow to dynamically evaluate the font color.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Andrey Utkin
dec87454de
lavfi/drawtext: add expansion function eif()
It evaluates expression and outputs it as integer value, using specified
format.
Address trac ticket #3699 .
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Marc Jeffreys
a0b71e9f3e
avfilter/drawtext: Add basic text shaping using libfribidi
Fixes ticket #3758
Reviewed-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
576ced5530
avfilter/vf_drawtext: Add #if HAVE_UNISTD_H around #include <unistd.h>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
85eabd748b
lavfi/drawtext: do not allocate FT_Glyph, but keep it in the Glyph structure
Slightly simplify.
11 years ago
Leandro Santiago
4582e1162a
avfilter/vf_drawtext: fix resource leak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Andrey Utkin
3bb4d26a5d
drawtext: drop unused draw_glyphs() arg "rgbcolor"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nicolas George
41334fcab4
lavfi/drawtext: allow to format pts as HH:MM:SS.mmm.
11 years ago
Michael Niedermayer
6956b048d8
avfilter/vf_drawtext: fix resource leaks
Fixes CID1206649
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
58400ac133
lavfi: name anonymous structs
11 years ago
Luca Barbato
f1b239ec8b
drawtext: Add fontconfig support
Introduce the `font` option and make it optional to pass a fontfile.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Matt Oliver
3e309c5d18
Fix compilation with msvc/icl due to missing header and define.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Andrey Utkin
6d7119dbd2
lavfi/drawtext: fix reinit command
Problem was that reinit argument wasn't used.
Regression came in at commit fd6228e657
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Ramiro Polla
78a9f185eb
lavfi/drawtext: add option for drawing border around text
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ramiro Polla
222fb8276d
lavfi/drawtext: get bitmap from glyph in a separate step
This change makes it possible to transform the glyph or get its border before
turning it into a bitmap.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
d68dc3c944
drawtext: Drop pointless header
It should be forward compatible with newer freetype.
11 years ago
Alexander Strasser
cea5812fa7
configure: Special case libfreetype test
Include the freetype header, in-directly through a macro, like it
is done in the drawtext filter. Do not break if the header is moved.
Unfortunately the drawtext filter included the file where the include
macros are defined in a wrong way. This is not needed and breaks the
build. Remove that #include line too.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
11 years ago
Anton Khirnov
cd43ca0443
lavfi: do not export the filters from shared objects
11 years ago
Paul B Mahol
ad934bc353
avfilter/vf_drawtext: remove dead initialization
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
b211607b5c
avfilter: various cosmetics
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
b077d8d908
avfilter: remove redundant .get_(audio/video)_buffer initializations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Clément Bœsch
30d40c9e86
lavfi/drawtext: add generic timeline interface and deprecate "draw".
11 years ago
Paul B Mahol
c5a1b18f18
lavfi/drawtext: add support for printing frame metadata
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Mark Visser
2090abcc43
add the start_number offset to var_values[VAR_N] directly, instead of adding it in func_frame_num
12 years ago
Mark Visser
0defc77e9d
added start_number parameter to drawtext to permit an offset to n/frame_num var
12 years ago
Michael Niedermayer
b5be1a7e23
avfilter/vf_drawtext: Fix doxygen comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
1d2ecf9609
lavfi/drawtext: switch to AV_OPT_TYPE_COLOR
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
3fb29588a2
vf_drawtext: don't leak the expressions.
12 years ago
Anton Khirnov
90d9a2a04c
vf_drawtext: do not reset the frame number in config_input.
Frame number should be incremented normally even if the link properties
change.
12 years ago
Anton Khirnov
d3735f7ad6
vf_drawtext: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
12 years ago
Michael Niedermayer
a9a537b154
avfilter/drawtext: add pict_type support
Fixes Ticket2470
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
b8a5c76131
lavfi: add frame counter into AVFilterLink and use it in filters.
12 years ago
Clément Bœsch
de656ea91e
lavfi/drawtext: make options array more readable.
12 years ago