Muhammad Faiz
6af050d7d0
avfilter: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
8 years ago
Brett Harrison
6442e4ab3c
avfilter/vf_drawtext: added expr evaluation to drawtext fontsize
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Kieran Kunhya
4cca2f74f2
vf_drawtext: Fix memory leak
8 years ago
Steven Liu
90096e42e1
avfilter:vf_drawtext: add new line space size set parameter
add line_spacing parameter to set the space between two lines
Based on an idea by: Leandro Santiago <leandrosansilva@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
8 years ago
Nicolas George
183ce55b0d
lavfi: split frame_count between input and output.
AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.
Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.
8 years ago
Diego Biurrun
8ddfa5ae5e
vf_drawtext: Drop wrong void* cast
libavfilter/vf_drawtext.c:844:49: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
9 years ago
Alex Agranovsky
88db6c2890
avfilter/vf_drawtext: fixed default/flt formatting ignoring offset parameter
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Diego Biurrun
85baef4ff1
vf_drawtext: Move static keyword to beginning of variable declaration
libavfilter/vf_drawtext.c:226:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
9 years ago
Paul B Mahol
9d16e46d9e
avfilter/drawutils: allow drawing opaque text on transparent background
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Michael Niedermayer
2e67a99fbc
avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tobias Rapp
ee104580c5
avfilter/vf_drawtext: add optional default value to metadata function
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
9 years ago
Carl Eugen Hoyos
ae9f2e6f28
lavfi/drawtext: Fix microsecond display.
Fixes ticket #4792 .
9 years ago
Ganesh Ajjanagadde
ff1442a51d
lavfi/vf_drawtext: replace round by llrint
llrint is at least as fast, and avoids an implicit cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Clément Bœsch
d3dbae1c71
lavfi/drawtext: fix shadow[xy] descriptions
9 years ago
Clément Bœsch
1d6308dbc6
lavfi/drawtext: hide first font load warning when fontconfig is present
9 years ago
Clément Bœsch
4cb26c3c35
lavfi/drawtext: fix crash when no text, file or timecode provided
9 years ago
Ganesh Ajjanagadde
7c8fcbbde3
avutil/tree: add additional const qualifier to the comparator
libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.
Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Ganesh Ajjanagadde
4c96985af1
all: remove some casts of function pointer to void *
These casts are unnecessary, and may safely be removed.
Found by enabling -Wpedantic on clang 3.7.
Tested with FATE.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Alex Agranovsky
cf28490e56
avfilter/drawtext: allow to format pts with strftime
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
9 years ago
Clément Bœsch
1cab6a33cd
avfilter/drawtext: use AV_OPT_TYPE_BOOL for a few options
9 years ago
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