summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
Commit message (Collapse)AuthorAge
* avfilter/vf_drawtext: only test available exceptionsRosen Penev2020-04-09
| | | | | | | | soft float systems do not define these macros under musl. Fixes: Ticket7102 Signed-off-by: Rosen Penev <rosenp@gmail.com>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-17
| | | | It is not needed at all.
* avfilter/vf_drawtext: do not overread text if the last UTF8 sequence is invalidMarton Balint2020-01-31
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_drawtext: use replacement chars for invalid UTF8 sequencesMarton Balint2020-01-31
| | | | | | | continue is explicitly disallowed for GET_UTF8, so let's fix that as well. Fixes crash with invalid UTF8 sequences. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/drawtext: log why input pad failed to be configuredGyan Doshi2019-12-24
|
* vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variablesCalvin Walton2019-07-07
| | | | | | | | | | | Changes to vf_drawtext.c written by Calvin Walton <calvin.walton@kepstin.ca> Changes to filters.texi written by greg Luce <electron.rotoscope@gmail.com> with lots of help from Moritz Barsnick and Gyan Fixes #7947.
* avfilter/drawtext: stop resource leakGyan Doshi2019-05-16
| | | | Fixes Coverity CID 1445099
* avfilter/drawtext: make command processing error-resilientGyan Doshi2019-05-13
| | | | | Prevents crash or interruption in text rendering if new option string contains invalid values.
* avfilter/drawtext: fix box sizingGyan Doshi2018-07-13
| | | | | | | | | At present, box size is clipped to frame size before being drawn, which can lead to the box not fully covering animated text which is longer than one or both frame dimensions. Since ff_blend_rectangle correctly takes care of clipping, it is skipped here which results in correct box sizing
* avfilter/drawtext: present 'hms' formatted 'pts' in 24h formatVishwanath Dixit2018-06-04
| | | | | | | | | | | | HMS is formatted as HH:MM:SS.mmm, but, HH part is not limited to 24 hours. For example, the the drawn text may look like this: 243029:20:30.342. To present the timestamp in more readable and user friendly format, this patch provides an additional option to limit the hour part in the range 0-23. Note: Actually the above required format can be obtained with format options 'localtime' and 'gmtime', but, milliseconds part is not supported in those formats.
* avfilter: add comments for duplicate lineSteven Liu2018-02-01
| | | | | | | | | comment about the looks like a duplicate line. but that is used to reason x is expressed from y Suggested-by: Paul B Mahol Suggested-by: Michael Niedermayer Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avfilter/drawtext - implement fix_boundsGyan Doshi2018-01-20
| | | | | | | | | | | When enabled, text, including effects like shadow or box, will be completely bound within the video frame. Default value changed to false to keep continuity of behaviour. Fixes #6960. Signed-off-by: Kyle Swanson <k@ylo.ph>
* avfilter: do not use AVFrame accessorMuhammad Faiz2017-04-23
| | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* avfilter/vf_drawtext: added expr evaluation to drawtext fontsizeBrett Harrison2017-04-19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '85baef4ff1512bcc2544928bfa5f42072903a691'Clément Bœsch2017-03-29
|\ | | | | | | | | | | | | | | | | | | | | * commit '85baef4ff1512bcc2544928bfa5f42072903a691': vf_drawtext: Move static keyword to beginning of variable declaration This commit is mostly a noop, see: d9e2aceb7f1c712a52672129ca7971872b030e1e 6d7aa437e1108dd8142ae5b850a00c109f95f07f Merged-by: Clément Bœsch <u@pkh.me>
| * vf_drawtext: Move static keyword to beginning of variable declarationDiego Biurrun2016-11-02
| | | | | | | | libavfilter/vf_drawtext.c:226:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
| * drawtext: Move the strftime expansion in a separate functionLuca Barbato2015-08-02
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * drawtext: Drop stray guardsLuca Barbato2015-08-02
| | | | | | | | | | | | There is a fallback for localtime_r and it is in use already. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | vf_drawtext: Fix memory leakKieran Kunhya2017-03-21
| |
* | avfilter:vf_drawtext: add new line space size set parameterSteven Liu2017-01-19
| | | | | | | | | | | | | | | | 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>
* | lavfi: split frame_count between input and output.Nicolas George2016-11-13
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avfilter/vf_drawtext: fixed default/flt formatting ignoring offset parameterAlex Agranovsky2016-11-06
| | | | | | | | | | Signed-off-by: Alex Agranovsky <alex@sighthound.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avfilter/drawutils: allow drawing opaque text on transparent backgroundPaul B Mahol2016-09-21
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avfilter/vf_drawtext: Check return code of load_glyph()Michael Niedermayer2016-04-24
| | | | | | | | | | | | | | Fixes segfault Fixes Ticket5347 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avfilter/vf_drawtext: add optional default value to metadata functionTobias Rapp2016-04-13
| | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | lavfi/drawtext: Fix microsecond display.Carl Eugen Hoyos2016-01-03
| | | | | | | | Fixes ticket #4792.
* | lavfi/vf_drawtext: replace round by llrintGanesh Ajjanagadde2015-12-21
| | | | | | | | | | | | llrint is at least as fast, and avoids an implicit cast. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | lavfi/drawtext: fix shadow[xy] descriptionsClément Bœsch2015-12-21
| |
* | lavfi/drawtext: hide first font load warning when fontconfig is presentClément Bœsch2015-12-21
| |
* | lavfi/drawtext: fix crash when no text, file or timecode providedClément Bœsch2015-12-21
| |
* | avutil/tree: add additional const qualifier to the comparatorGanesh Ajjanagadde2015-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | all: remove some casts of function pointer to void *Ganesh Ajjanagadde2015-10-24
| | | | | | | | | | | | | | | | | | | | 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>
* | avfilter/drawtext: allow to format pts with strftimeAlex Agranovsky2015-10-12
| | | | | | | | Signed-off-by: Alex Agranovsky <alex@sighthound.com>
* | avfilter/drawtext: use AV_OPT_TYPE_BOOL for a few optionsClément Bœsch2015-09-08
| |
* | Merge commit '9b2c57bef5e2f3f61a5fd708ba7d5351f5b3f386'Michael Niedermayer2015-04-21
|\| | | | | | | | | | | | | | | | | | | | | * commit '9b2c57bef5e2f3f61a5fd708ba7d5351f5b3f386': drawtext: Add an alpha option Conflicts: doc/filters.texi libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * drawtext: Add an alpha optionLuca Barbato2015-04-21
| | | | | | | | | | | | And document both `draw` and `alpha`. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
| * lavfi: Increase drawtext font size limitsМихаил Муковников2014-12-07
| | | | | | | | | | | | Raise the maximum font size to a larger value. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avfilter/drawtext: fix frame mem leakIvan Efimov2015-04-14
| | | | | | | | | | Signed-off-by: Ivan Efimov <ioefimov@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | vf_drawtext: add support for setting box border widthMarton Balint2015-03-31
| | | | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/vf_drawtext: Change enums to int, which are accessed via AVOption ↵Michael Niedermayer2015-03-08
| | | | | | | | | | | | as int This fixes depending on implementation defined behavior
* | avfilter/vf_drawtext: use gm_time_r() for thread safteyMichael Niedermayer2014-11-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6b9b42cc5576e1819ad1e29d98940066fd14b2d6'Michael Niedermayer2014-10-26
|\| | | | | | | | | | | | | | | | | | | * commit '6b9b42cc5576e1819ad1e29d98940066fd14b2d6': drawtext: Remove the ifdef for localtime_r Conflicts: libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * drawtext: Remove the ifdef for localtime_rMartin Storsjö2014-10-26
| | | | | | | | | | | | | | | | 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>
* | Merge commit 'f401792595dd7760f531e8a3bd2336e9033bd45a'Michael Niedermayer2014-10-18
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f401792595dd7760f531e8a3bd2336e9033bd45a': vf_drawtext: Do not leak the mmapped textfile Conflicts: libavfilter/vf_drawtext.c See: 6956b048d8198dce5126c8942dece21cfb1a7978 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_drawtext: Do not leak the mmapped textfileLuca Barbato2014-10-18
| | | | | | | | | | | | | | And validate its size while at it. CC: libav-stable@libav.org Bug-Id: CID 1244189
* | avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruftJames Almer2014-10-12
| |
* | vf_drawtext: add missing clear of pointers after av_expr_free()Karl Kiniger2014-10-11
| | | | | | | | | | | | | | | | | | | | 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>
* | vf_drawtext: move "static const" before "struct".Reimar Döffinger2014-08-31
| | | | | | | | | | | | This is consistent with all other occurrences. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>